GrahamDumpleton / wrapt

A Python module for decorators, wrappers and monkey patching.
BSD 2-Clause "Simplified" License
2.04k stars 230 forks source link

Version 1.13.0 incorrectly declares Python 3.3 and 3.4 as supported #188

Closed andy-maier closed 2 years ago

andy-maier commented 2 years ago

Version 1.13.0 released today declares its Python requirements as !=3.0.*, !=3.1.*, !=3.2.*, >=2.7. This causes it to be picked by Pip on Python 3.4 as an eligible version. The subsequent installation on Python 3.4 fails with:

Collecting wrapt (from astroid==2.1.0->-c minimum-constraints.txt (line 194))
  Downloading https://files.pythonhosted.org/packages/6d/91/7c6f9475c5a1dbafe2d1cf725a56b1b3438bbc38dd9397cd9cfaa0f3302e/wrapt-1.13.0.tar.gz (48kB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-zrdjnomc/wrapt/setup.py", line 34, in <module>
        ext_modules=[] if disable_extensions else extensions
      File "/opt/hostedtoolcache/Python/3.4.10/x64/lib/python3.4/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/opt/hostedtoolcache/Python/3.4.10/x64/lib/python3.4/distutils/core.py", line 121, in setup
        dist.parse_config_files()
      File "/opt/hostedtoolcache/Python/3.4.10/x64/lib/python3.4/site-packages/setuptools/dist.py", line 494, in parse_config_files
        ignore_option_errors=ignore_option_errors)
      File "/opt/hostedtoolcache/Python/3.4.10/x64/lib/python3.4/site-packages/setuptools/config.py", line 106, in parse_configuration
        meta.parse()
      File "/opt/hostedtoolcache/Python/3.4.10/x64/lib/python3.4/site-packages/setuptools/config.py", line 382, in parse
        section_parser_method(section_options)
      File "/opt/hostedtoolcache/Python/3.4.10/x64/lib/python3.4/site-packages/setuptools/config.py", line 355, in parse_section
        self[name] = value
      File "/opt/hostedtoolcache/Python/3.4.10/x64/lib/python3.4/site-packages/setuptools/config.py", line 173, in __setitem__
        value = parser(value)
      File "/opt/hostedtoolcache/Python/3.4.10/x64/lib/python3.4/site-packages/setuptools/config.py", line 430, in _parse_version
        version = self._parse_attr(value)
      File "/opt/hostedtoolcache/Python/3.4.10/x64/lib/python3.4/site-packages/setuptools/config.py", line 305, in _parse_attr
        module = import_module(module_name)
      File "/opt/hostedtoolcache/Python/3.4.10/x64/lib/python3.4/importlib/__init__.py", line 109, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
      File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
      File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
    ImportError: No module named 'wrapt'

This can be circumvented by packages using wrapt by pinning it to <1.13 on Python 3.4, but it should be fixed by wrapt by adjusting its "python_requires" attribute in setup.cfg accordingly.

GrahamDumpleton commented 2 years ago

Might have been nice to know why Python 3.4 breaks, but others did all the packaging changes for me in the latest version and isn't obvious what the issue is to me, so have changed python_requires to only specifically include those versions which automated testing is done for. The 1.13.0 version has been yanked on PyPi and 1.13.1 has the new classifier, so if you remove any pinning of your own you may have added, should now hopefully use <1.13.0 for Python 3.4.

GrahamDumpleton commented 2 years ago

Closing on presumption this is all good now.