ionelmc/python-lazy-object-proxy

Install of 1.4.3 fails on Python 3.5

andy-maier opened this issue · 7 comments

We are using version 1.4.3 for testing on Python 3.5 (that is the minimum version we test with, we test with both a defined minimum and latest versions of our package dependencies). Version 1.4.3 does not yet pin setuptools-scm to <6.0 as the master branch does (in setup.cfg). This causes the following installation error on Python 3.5 (strangely enough just on macos, but not on ubuntu and windows):

Collecting lazy-object-proxy==1.4.3 (from -c minimum-constraints.txt (line 180))
  Downloading https://files.pythonhosted.org/packages/07/3f/a3d687f83c7d44970f70ff0400677746c8860b11f0c08f6b4e07205f0cdc/lazy-object-proxy-1.4.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-t5odplke/lazy-object-proxy/setup.py", line 130, in <module>
        for root, _, _ in os.walk('src')
      File "/Users/runner/hostedtoolcache/Python/3.5.10/x64/lib/python3.5/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/Users/runner/hostedtoolcache/Python/3.5.10/x64/lib/python3.5/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/Users/runner/hostedtoolcache/Python/3.5.10/x64/lib/python3.5/site-packages/setuptools/dist.py", line 372, in __init__
        _Distribution.__init__(self, attrs)
      File "/Users/runner/hostedtoolcache/Python/3.5.10/x64/lib/python3.5/distutils/dist.py", line 281, in __init__
        self.finalize_options()
      File "/Users/runner/hostedtoolcache/Python/3.5.10/x64/lib/python3.5/site-packages/setuptools/dist.py", line 528, in finalize_options
        ep.load()(self, ep.name, value)
      File "/Users/runner/hostedtoolcache/Python/3.5.10/x64/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2324, in load
        return self.resolve()
      File "/Users/runner/hostedtoolcache/Python/3.5.10/x64/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2330, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-t5odplke/lazy-object-proxy/.eggs/setuptools_scm-6.0.1-py3.5.egg/setuptools_scm/__init__.py", line 15, in <module>
        from .version import format_version, meta
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-t5odplke/lazy-object-proxy/.eggs/setuptools_scm-6.0.1-py3.5.egg/setuptools_scm/version.py", line 42
        trace(f"tag '{tag}' parsed to {result}")
                                              ^
    SyntaxError: invalid syntax
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-t5odplke/lazy-object-proxy/

Test runs, with the failing run opened: https://github.com/pywbem/pywbem/runs/2158223117?check_suite_focus=true

We can work around the issue by pinning setuptools-scm in the development dependencies of our package (it only comes in via pylint), but that package is not used so far. The use of setuptools-scm by your package is only during its installation and therefore disappears again once the installation is complete. So it would introduce a new package dependency for us. I was wondering whether you would be willing to release a 1.4.x version that still supports Python 3.5 and has the fix with the pinning of setuptools-scm to <6.0 in setup.cfg?

Update: Installing the right version of setuptools-scm before installing lazy-object-proxy does not solve the problem. See here: https://github.com/pywbem/pywbem/runs/2158775353?check_suite_focus=true#step:7:210. Pip still uses the latest version of setuptools-scm during setup of lazy-object-proxy. So I think we depend on a new release of 1.4.x with the pinning.

For now, we have disabled the use of pylint on Python 3.5 to circumvent the problem.

It is still a mystery to me as to why this fails only on macos but not on ubuntu. I made a new run in which all of the following was equal on both OSs:

  • Python 3.5.10
  • pip 9.0.3
  • setuptools 39.0.1
  • lazy-object-proxy 1.4.3

Still it fails on macos and succeeds on ubuntu: https://github.com/pywbem/pywbem/runs/2158991576?check_suite_focus=true

@ionelmc Sorry for the delay. Releasing an sdist is sufficient, as long as it is on Pypi.

Just uploaded 1.4.4

Just for completeness: Due to #56, version 1.4.4 had to be yanked again from Pypi. We can live with that by not running pylint on Python 3.5, which is acceptable on such an old and meanwhile unsupported Python version. Sorry for causing the extra work for you.

Further update: It turns out that the issue no longer occurs on Python 3.5. I don't understand the reasons for that, but it may be related to better dependency checking in pip (my suspicion). This allowed us to re-enable pylint on Python 3.5.

More importantly for you though, it means the proposed pinning of setuptools-scm to <6.0 is not needed to have your versions up to 1.5.2 working on Python 3.5.