Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dogpile.cache 0.9.1 introduced pep517 regression #178

Closed
ssbarnea opened this issue Apr 30, 2020 · 17 comments
Closed

dogpile.cache 0.9.1 introduced pep517 regression #178

ssbarnea opened this issue Apr 30, 2020 · 17 comments
Labels
question Further information is requested

Comments

@ssbarnea
Copy link

dogpile.cache 0.9.1 introduced pep517 regression which prevented its installation on some setups:

Collecting dogpile.cache>=0.6.5
  Downloading http://mirror.gra1.ovh.openstack.org/pypifiles/packages/e6/65/fa4a947926034cb4af5f469c376a21728b7fd8de4668fed757c3586f0eef/dogpile.cache-0.9.1.tar.gz (329 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'

:stderr:   ERROR: Command errored out with exit status 1:
   command: /home/zuul/test-python/bin/python /home/zuul/test-python/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpx9zntfdw
       cwd: /tmp/pip-install-9ep3va87/dogpile.cache
  Complete output (10 lines):
  Traceback (most recent call last):
    File "/home/zuul/test-python/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
      main()
    File "/home/zuul/test-python/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/zuul/test-python/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 85, in get_requires_for_build_wheel
      backend = _build_backend()
    File "/home/zuul/test-python/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 76, in _build_backend
      obj = getattr(obj, path_part)
  AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /home/zuul/test-python/bin/python /home/zuul/test-python/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpx9zntfdw Check the logs for full command output.
WARNING: You are using pip version 20.0.2; however, version 20.1 is available.

Full report at https://zuul.opendev.org/t/openstack/build/0a2a5ca6414f4e56b9508322cf01c9f4

@zzzeek zzzeek added the question Further information is requested label Apr 30, 2020
@zzzeek
Copy link
Member

zzzeek commented Apr 30, 2020

hi there -

there's been extended discussion about the pep517 issue here: sqlalchemy/sqlalchemy#5207

short answer is that dogpile.cache has added pyproject.toml as well, which turns on pip's pep517 mode, which then has all kinds of issues that overall will have to be resolved on the pip side and/or the community at large. however there is no documented incompatibility about including a pyproject.toml file alongside setup.py .

we can seek to remove pyproject.toml from the build but for now, however this is only a workaround. it is likely that there is something in your build environment that's stale or incompatible with pep517, try using a fresh install environment. If you run pip with --no-use-pep517 that would allow the install to proceed.

@ssbarnea
Copy link
Author

@zzzeek Thanks for the quick reply. Lets keep issue open until we find a better solution. Use of pyproject.toml should not break installation, for example I already use it in projects like https://github.com/ansible-community/molecule/blob/master/pyproject.toml or https://github.com/ansible/ansible-lint/blob/master/pyproject.toml and they are not failing to install, on the same setups as dogpile.cache.

I think we may need bit of tuning to make both worlds happy.

@zzzeek
Copy link
Member

zzzeek commented Apr 30, 2020

on the SQLAlchemy side we simply removed pyproject.toml from the MANIFEST file so that it's not in the build. SQLAlchemy however builds C extensions so has a much more complicated situation.

for dogpile, there's nothing unusual in setup.py, it's about as vanilla as it gets. What sort of "tunings" did you have in mind?

@CaselIT
Copy link
Member

CaselIT commented Apr 30, 2020

I think that the problem may be an old version of setuptools.
Probably removing it like in alembic/sqlalchemy for now should be ok.

Another option is to use pep517 specifying in the pyproject.toml

[build-system]	
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

Likely also specifying a min version for setuptools.

@CaselIT
Copy link
Member

CaselIT commented Apr 30, 2020

But I'm not sure if the bug on debian regarding the broken pep517 package would still happen with that configuration.

All things considered it's probably best to sit out until it's in general use, since each time it was enabled, we got multiple issues regarding it, so it's clearly not ready for prime time yet.

openstack-gerrit pushed a commit to openstack-archive/tripleo-ansible that referenced this issue Apr 30, 2020
openstack-gerrit pushed a commit to openstack/openstack that referenced this issue Apr 30, 2020
* Update tripleo-ansible from branch 'master'
  - Avoid broken dogpile.cache
    
    Bug: sqlalchemy/dogpile.cache#178
    Bug: https://bugs.launchpad.net/tripleo/+bug/1876073
    Change-Id: Ibdf42045421bb0adfde7905645140acb1cb33f5c
@ssbarnea
Copy link
Author

I am already testing patch that adds required missing bits to pyproject.toml from the #179 at https://review.opendev.org/#/c/724691/ -- we will know soon.

It is a very common mistake to forget to add [build-system] when adding this file and we do know that missing these produces lots of failures. The proposed values where taken from molecule, as the packaging installation is tested across a wide range of distros.

@zzzeek
Copy link
Member

zzzeek commented Apr 30, 2020

I dont understand why this is needed when pip states they have set up a sensible default for this: https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support is their default broken ?

@CaselIT
Copy link
Member

CaselIT commented Apr 30, 2020

the problem here is that I think that the sensible default does not install an updated version of setuptools. ops I guess

@zzzeek
Copy link
Member

zzzeek commented Apr 30, 2020

e.g., just like last time, this REALLY looks like a bug in pip/ setuptools / etc. they have documented a default, and it seems to break all over the place. if their default is unworkable, they should change it, or fix setuptools, or whatever.

@zzzeek
Copy link
Member

zzzeek commented Apr 30, 2020

but their default includes a minimum version of setuptools "setuptools>=40.8.0" - is that wrong ? did they mean to update it?

@ssbarnea
Copy link
Author

@zzzeek I did not test this project with older setuptools, I only copy/pasted values that I needed on other projects (which where raised due to specific bugs).

So, shortly it may work file even with older versions of both pip and setuptools. Still, who has time to test all possible combinations? Considering that these are not runtime requirements, it should be safer to use more recent versions when building the wheel.

Just to be clear for everyone: these requirements will not alter your system pip/setuptools when you build or install the package.

@zzzeek
Copy link
Member

zzzeek commented Apr 30, 2020

as mentioned on the PR safest approach as we did in SQLAlchemy seems to omit this file from the builds. I just remain pretty frustrated that this ongoing issue is not considered to be a bug in pip.

openstack-gerrit pushed a commit to openstack-archive/tripleo-upgrade that referenced this issue May 1, 2020
Bug: sqlalchemy/dogpile.cache#178

Related-Bug: #1876073

Change-Id: Ia3f7940e836d4bd90b73c7f82fc7203bfe76f2c5
openstack-gerrit pushed a commit to openstack/openstack that referenced this issue May 1, 2020
* Update tripleo-upgrade from branch 'master'
  - Merge "Avoid broken dogpile.cache"
  - Avoid broken dogpile.cache
    
    Bug: sqlalchemy/dogpile.cache#178
    
    Related-Bug: #1876073
    
    Change-Id: Ia3f7940e836d4bd90b73c7f82fc7203bfe76f2c5
@FedericoRessi
Copy link

I created this workaround for OpenStack projects: https://review.opendev.org/725209

@zzzeek
Copy link
Member

zzzeek commented May 4, 2020

the irony is dogpile.cache is actually CI tested in centos8 containers, so no intrinsic incompatibility there. ill just release without the pyproject.toml in the dist.

@sqla-tester
Copy link
Collaborator

Mike Bayer has proposed a fix for this issue in the master branch:

Omit pyproject.toml from installation https://gerrit.sqlalchemy.org/c/sqlalchemy/dogpile.cache/+/1941

@FedericoRessi
Copy link

I can confirm the problem is also happening when installing dogpile.cache on RHEL 8

@zzzeek
Copy link
Member

zzzeek commented May 5, 2020

0.9.2 is released which should not include this file

openstack-gerrit pushed a commit to openstack/requirements that referenced this issue May 5, 2020
dogpile.cache package 0.9.1 seam to have a compatibility
issue when using on CentOS 8 systems [1]

0.9.2 is expected to fix the issue as soon it is released

[1] Issue #178 - sqlalchemy/dogpile.cache#178

Change-Id: Iccc9f1346a25ade34f1482081d5c7a4d0deefbf3
openstack-gerrit pushed a commit to openstack/openstack that referenced this issue May 5, 2020
* Update requirements from branch 'master'
  - Pin dogpile.cache!=0.9.1 version
    
    dogpile.cache package 0.9.1 seam to have a compatibility
    issue when using on CentOS 8 systems [1]
    
    0.9.2 is expected to fix the issue as soon it is released
    
    [1] Issue #178 - sqlalchemy/dogpile.cache#178
    
    Change-Id: Iccc9f1346a25ade34f1482081d5c7a4d0deefbf3
openstack-mirroring pushed a commit to openstack-archive/validations-common that referenced this issue May 14, 2020
Bug: sqlalchemy/dogpile.cache#178
Bug: https://bugs.launchpad.net/tripleo/+bug/1876073

Change-Id: I2932eddd7afebe3a1ed45d7bc86dfbd89b6e3b79
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
openstack-mirroring pushed a commit to openstack/openstack that referenced this issue May 15, 2020
* Update tripleo-validations from branch 'master'
  - Merge "Avoid broken dogpile.cache"
  - Avoid broken dogpile.cache
    
    Bug: sqlalchemy/dogpile.cache#178
    Bug: https://bugs.launchpad.net/tripleo/+bug/1876073
    
    This patch also fixes a pep8 issue:
         doc/source/_exts/generate_validations_doc.py:99:0:
         F522 '...'.format(...) has unused named argument(s): metadata
    
    Change-Id: I9a79fdac81239b79010598e462e64b116040ec09
    Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
openstack-mirroring pushed a commit to openstack-archive/tripleo-validations that referenced this issue May 15, 2020
Bug: sqlalchemy/dogpile.cache#178
Bug: https://bugs.launchpad.net/tripleo/+bug/1876073

This patch also fixes a pep8 issue:
     doc/source/_exts/generate_validations_doc.py:99:0:
     F522 '...'.format(...) has unused named argument(s): metadata

Change-Id: I9a79fdac81239b79010598e462e64b116040ec09
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
openstack-mirroring pushed a commit to openstack-archive/validations-common that referenced this issue Dec 10, 2020
- dogpile.cache workaround
Bug: sqlalchemy/dogpile.cache#178
Bug: https://bugs.launchpad.net/tripleo/+bug/1876073

- The lower-constraints.txt file has been removed because it is not
useful for TripleO anymore.

Change-Id: I17388fa82618cc881d6886a9328616de4350c38b
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
openstack-mirroring pushed a commit to openstack-archive/tripleo-validations that referenced this issue Dec 10, 2020
- dogpile.cache workaround
Bug: sqlalchemy/dogpile.cache#178
Bug: https://bugs.launchpad.net/tripleo/+bug/1876073

- The lower-constraints.txt file has been removed because it is not
useful for TripleO anymore.

Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Change-Id: I00e2e252700d0229113cc6ee1c4efff0504fb005
openstack-mirroring pushed a commit to openstack/openstack that referenced this issue Dec 10, 2020
* Update validations-common from branch 'master'
  to ba5db95b09bc653dceb10bba1f8d34793f39fe4e
  - Remove workaround for broken dogpile.cache and lower-constraints file
    
    - dogpile.cache workaround
    Bug: sqlalchemy/dogpile.cache#178
    Bug: https://bugs.launchpad.net/tripleo/+bug/1876073
    
    - The lower-constraints.txt file has been removed because it is not
    useful for TripleO anymore.
    
    Change-Id: I17388fa82618cc881d6886a9328616de4350c38b
    Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
openstack-mirroring pushed a commit to openstack/openstack that referenced this issue Dec 10, 2020
* Update tripleo-validations from branch 'master'
  to b8bb9a5f2c6e2e8ca5fb8aea8ed0da5df5464078
  - Remove workaround for broken dogpile.cache and lower-constraints file
    
    - dogpile.cache workaround
    Bug: sqlalchemy/dogpile.cache#178
    Bug: https://bugs.launchpad.net/tripleo/+bug/1876073
    
    - The lower-constraints.txt file has been removed because it is not
    useful for TripleO anymore.
    
    Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
    Change-Id: I00e2e252700d0229113cc6ee1c4efff0504fb005
openstack-mirroring pushed a commit to openstack-archive/tripleo-validations that referenced this issue Dec 21, 2020
- dogpile.cache workaround
Bug: sqlalchemy/dogpile.cache#178
Bug: https://bugs.launchpad.net/tripleo/+bug/1876073

- The lower-constraints.txt file has been removed because it is not
useful for TripleO anymore.

Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Change-Id: I00e2e252700d0229113cc6ee1c4efff0504fb005
(cherry picked from commit b8bb9a5)
openstack-mirroring pushed a commit to openstack-archive/tripleo-validations that referenced this issue Jan 20, 2021
- dogpile.cache workaround
Bug: sqlalchemy/dogpile.cache#178
Bug: https://bugs.launchpad.net/tripleo/+bug/1876073

- The lower-constraints.txt file has been removed because it is not
useful for TripleO anymore. The .zuul.yaml doesn't exists in ussuri
the modification was reported in zuul.d/layout.yaml file.

Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Change-Id: I00e2e252700d0229113cc6ee1c4efff0504fb005
(cherry picked from commit b8bb9a5)
(cherry picked from commit 3977997)
openstack-mirroring pushed a commit to openstack-archive/tripleo-upgrade that referenced this issue Jun 24, 2021
The issue described in [1] is not present from 0.9.2 and higher version

[1] sqlalchemy/dogpile.cache#178

Change-Id: I5b6660dfb11c9a1aee0f0270be0554a782db8005
openstack-mirroring pushed a commit to openstack/openstack that referenced this issue Jun 24, 2021
* Update tripleo-upgrade from branch 'master'
  to 2e66fa311784ed6bdfeafb4d23314dc0be861e06
  - Merge "Bump dogpile to >=0.9.2"
  - Bump dogpile to >=0.9.2
    
    The issue described in [1] is not present from 0.9.2 and higher version
    
    [1] sqlalchemy/dogpile.cache#178
    
    Change-Id: I5b6660dfb11c9a1aee0f0270be0554a782db8005
tanaypf9 pushed a commit to tanaypf9/pf9-requirements that referenced this issue May 20, 2024
dogpile.cache package 0.9.1 seam to have a compatibility
issue when using on CentOS 8 systems [1]

[1] Issue #178 - sqlalchemy/dogpile.cache#178

Change-Id: Iccc9f1346a25ade34f1482081d5c7a4d0deefbf3
tanaypf9 pushed a commit to tanaypf9/pf9-requirements that referenced this issue May 20, 2024
dogpile.cache package 0.9.1 seam to have a compatibility
issue when using on CentOS 8 systems [1]

0.9.2 is expected to fix the issue as soon it is released

[1] Issue #178 - sqlalchemy/dogpile.cache#178

Change-Id: Iccc9f1346a25ade34f1482081d5c7a4d0deefbf3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants