#209 Fix or ignore all deprecation warnings
Merged 6 months ago by zlopez. Opened 6 months ago by carlwgeorge.
fedora-infra/ carlwgeorge/toddlers clear_warnings  into  main

file modified
+6
@@ -10,3 +10,9 @@ 

  

  [tool:pytest]

  addopts = --cov-config .coveragerc --cov=toddlers --cov-report=term-missing --cov-report xml --cov-report html

+ # ignore deprecation warnings that are out of our control

+ filterwarnings =

+     ignore::DeprecationWarning:bravado_core.*

+     ignore::DeprecationWarning:pdc_client.*

+     ignore::DeprecationWarning:pkg_resources.*

+     ignore::DeprecationWarning:swagger_spec_validator.*

@@ -1270,7 +1270,9 @@ 

          # Prepare user cache

          data = {

              "khorne@fedoraproject.org": {

-                 "last_update": time.mktime(datetime.datetime.utcnow().timetuple())

+                 "last_update": time.mktime(

+                     datetime.datetime.now(datetime.timezone.utc).timetuple()

+                 )

              }

          }

          with open(os.path.join(tmpdir, "user_cache.json"), "w") as stream:

file modified
+1 -1
@@ -84,7 +84,7 @@ 

          )

          msg = fedora_messaging.api.Message(

              topic="toddlers.trigger.{}".format(args.name),

-             body={"date": datetime.datetime.utcnow().isoformat()},

+             body={"date": datetime.datetime.now(datetime.timezone.utc).isoformat()},

          )

          fedora_messaging.api.publish(msg)

          _log.debug("Message sent!")

@@ -20,10 +20,7 @@ 

  from typing import Mapping, Optional

  import xml

  

- try:

-     from defusedxml import cElementTree as etree

- except ImportError:

-     from defusedxml import ElementTree as etree

+ from defusedxml import ElementTree as etree

  

  from .requests import make_session

  
@@ -84,7 +81,7 @@ 

                  # Let's assume that there is only one file in archive

                  tarinfo = tar.next()

                  if tarinfo:

-                     tar.extract(tarinfo, path=os.path.dirname(location))

+                     tar.extract(tarinfo, path=os.path.dirname(location), filter="data")

                      os.rename(

                          os.path.join(os.path.dirname(location), tarinfo.name), location

                      )
@@ -231,7 +228,7 @@ 

  

          # iterate over the rest of the primary.xml tree

          for event, elem in context:

-             if not root:

+             if root is None:

                  root = elem

                  continue

  

See individual commit messages for more details.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/55dd1fa695dd443b85b5660c68b827af

rebased onto 7f29d09

6 months ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/85a3cd7a15f8440a82427fbaeb22b976

Pull-Request has been merged by zlopez

6 months ago