Browse Source

Fix various warnings.

Dan Helfman 6 năm trước cách đây
mục cha
commit
984702b3b2
3 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 2 2
      borgmatic/borg/check.py
  2. 1 1
      borgmatic/tests/integration/config/test_legacy.py
  3. 1 1
      setup.py

+ 2 - 2
borgmatic/borg/check.py

@@ -60,9 +60,9 @@ def _make_check_flags(checks, check_last=None, prefix=None):
         last_flags = ()
         prefix_flags = ()
         if check_last:
-            logger.warn('Ignoring check_last option, as "archives" is not in consistency checks.')
+            logger.warning('Ignoring check_last option, as "archives" is not in consistency checks.')
         if prefix:
-            logger.warn('Ignoring consistency prefix option, as "archives" is not in consistency checks.')
+            logger.warning('Ignoring consistency prefix option, as "archives" is not in consistency checks.')
         
     if set(DEFAULT_CHECKS).issubset(set(checks)):
         return last_flags + prefix_flags

+ 1 - 1
borgmatic/tests/integration/config/test_legacy.py

@@ -8,7 +8,7 @@ from borgmatic.config import legacy as module
 
 def test_parse_section_options_with_punctuation_should_return_section_options():
     parser = module.RawConfigParser()
-    parser.readfp(StringIO('[section]\nfoo: {}\n'.format(string.punctuation)))
+    parser.read_file(StringIO('[section]\nfoo: {}\n'.format(string.punctuation)))
 
     section_format = module.Section_format(
         'section',

+ 1 - 1
setup.py

@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 
 
-VERSION = '1.2.4'
+VERSION = '1.2.5'
 
 
 setup(