[Piuparts-devel] [Git][debian/piuparts][develop] 2 commits: Replace deprecated logging.warn

Nicolas Dandrimont (@olasd) gitlab at salsa.debian.org
Sat May 3 17:59:11 BST 2025



Nicolas Dandrimont pushed to branch develop at Debian / piuparts


Commits:
b802c696 by Lee Garrett at 2025-05-03T17:38:34+02:00
Replace deprecated logging.warn

piuparts warned with:
/usr/bin/piuparts:2375: DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead
  logging.warn(changes_path + " is not readable. Skipping.")

And https://docs.python.org/3/library/logging.html#logging.Logger.warning
mentions this deprecated function should be replaced by warning()

- - - - -
40785da5 by Nicolas Dandrimont at 2025-05-03T16:59:03+00:00
Merge branch 'develop' into 'develop'

Replace deprecated logging.warn

See merge request debian/piuparts!75
- - - - -


1 changed file:

- piuparts.py


Changes:

=====================================
piuparts.py
=====================================
@@ -1697,7 +1697,7 @@ class Chroot:
         'reference_chroot_state'."""
 
         if reference_chroot_state["avail_md5"] != self.avail_md5_history:
-            logging.warn("History of available packages does not match - reference chroot may be outdated")
+            logging.warning("History of available packages does not match - reference chroot may be outdated")
             logging.debug(" reference: %s" % " ".join(reference_chroot_state["avail_md5"]))
             logging.debug(" current  : %s" % " ".join(self.avail_md5_history))
 
@@ -2372,7 +2372,7 @@ def process_changes(changes):
         dir_path = os.path.dirname(changes) + "/"
         changes_path = os.path.abspath(changes)
     if not os.access(changes_path, os.R_OK):
-        logging.warn(changes_path + " is not readable. Skipping.")
+        logging.warning(changes_path + " is not readable. Skipping.")
         return
 
     # Determine the packages in the changes file through the 'Files' stanza.
@@ -2741,7 +2741,7 @@ def install_and_upgrade_between_distros(package_files, packages_qualified):
 
     if chroot_state is not None:
         if chroot.initial_selections != chroot_state["initial_selections"]:
-            logging.warn("Initial package selections do not match - ignoring loaded reference chroot state")
+            logging.warning("Initial package selections do not match - ignoring loaded reference chroot state")
             refsel = [(s, p, v) for p, (s, v) in chroot_state["initial_selections"].items()]
             cursel = [(s, p, v) for p, (s, v) in chroot.initial_selections.items()]
             rsel = [x for x in refsel if x not in cursel]



View it on GitLab: https://salsa.debian.org/debian/piuparts/-/compare/d4f829cd2955750b7b9f873f77cb5508aa142dea...40785da5c1d8d041b79ba25782b05a9df2f181cd

-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/-/compare/d4f829cd2955750b7b9f873f77cb5508aa142dea...40785da5c1d8d041b79ba25782b05a9df2f181cd
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20250503/e6cccc8e/attachment-0001.htm>


More information about the Piuparts-devel mailing list