diff --git a/CHANGES.rst b/CHANGES.rst index 86e4fb1..a39a1d4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,12 @@ Changelog --------- +Release 5.0.8 +""""""""""""" + +* fixing/test for a regression introduced in 5.0.7 that prevented ``import validate`` from working + + Release 5.0.7 """"""""""""" diff --git a/docs/configobj.rst b/docs/configobj.rst index 66005d3..1463bd7 100644 --- a/docs/configobj.rst +++ b/docs/configobj.rst @@ -2383,6 +2383,12 @@ CHANGELOG This is an abbreviated changelog showing the major releases up to version 4. From version 4 it lists all releases and changes. +2023/01/18 - Version 5.0.8 +-------------------------- + +* fixing/test for a regression introduced in 5.0.7 that prevented ``import validate`` from working + + 2023/01/17 - Version 5.0.7 -------------------------- diff --git a/setup.cfg b/setup.cfg index fccba36..a94f058 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,12 +3,12 @@ # [egg_info] -tag_build = .dev0 +#tag_build = .dev0 tag_date = false [sdist] -formats = zip, gztar +formats = gztar [bdist_wheel] diff --git a/setup.py b/setup.py index fcdecc0..f18451c 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ NAME = 'configobj' MODULES = [] -PACKAGES = ['configobj'] +PACKAGES = ['configobj', 'validate'] DESCRIPTION = 'Config file reading, writing and validation.' URL = 'https://github.com/DiffSK/configobj' @@ -105,7 +105,7 @@ AUTHOR = 'Rob Dennis, Eli Courtwright (Michael Foord & Nicola Larosa original maintainers)' -AUTHOR_EMAIL = 'rdennis+configobj@gmail.com, eli@courtwright.org, fuzzyman@voidspace.co.uk, nico@tekNico.net' +AUTHOR_EMAIL = 'rdennis+configobj@gmail.com, eli@courtwright.org, michael@python.org, nico@tekNico.net' KEYWORDS = "config, ini, dictionary, application, admin, sysadmin, configuration, validation".split(', ') @@ -121,7 +121,7 @@ package_dir={'': 'src'}, packages=PACKAGES, install_requires=[i.strip() for i in REQUIRES.splitlines() if i.strip()], - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', classifiers=CLASSIFIERS, keywords=KEYWORDS, license='BSD (2 clause)', diff --git a/src/configobj/_version.py b/src/configobj/_version.py index 3379d0a..f9d71a5 100644 --- a/src/configobj/_version.py +++ b/src/configobj/_version.py @@ -1 +1 @@ -__version__ = '5.0.7' \ No newline at end of file +__version__ = '5.0.8' \ No newline at end of file diff --git a/src/configobj/validate.py b/src/configobj/validate.py index b7a964c..9267a3f 100644 --- a/src/configobj/validate.py +++ b/src/configobj/validate.py @@ -158,7 +158,6 @@ 'is_ip_addr_list', 'is_mixed_list', 'is_option', - '__docformat__', ) diff --git a/src/tests/test_validate.py b/src/tests/test_validate.py index 07c1de7..2d72821 100644 --- a/src/tests/test_validate.py +++ b/src/tests/test_validate.py @@ -5,6 +5,20 @@ from configobj.validate import Validator, VdtValueTooSmallError +class TestImporting(object): + def test_top_level(self, val): + import validate + assert val.__class__ is validate.Validator + + def test_within_configobj_using_from(self, val): + from configobj import validate + assert val.__class__ is validate.Validator + + def test_within_configobj(self, val): + import configobj.validate + assert val.__class__ is configobj.validate.Validator + + class TestBasic(object): def test_values_too_small(self, val): config = ''' diff --git a/src/validate/__init__.py b/src/validate/__init__.py new file mode 100644 index 0000000..7a88747 --- /dev/null +++ b/src/validate/__init__.py @@ -0,0 +1,22 @@ +""" +This is a backwards compatibility-shim to support: + + ``` + import validate + ``` + + in a future release, we'd expect this to no longer work and + instead using: + + ``` + import configobj.validate + ``` + + or: + + ``` + from configobj import validate + ``` +""" +from configobj.validate import * +