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

Wrong Version detected with project_wheel_metadata #3088

Closed
finswimmer opened this issue Feb 5, 2022 · 4 comments · Fixed by #3230
Closed

Wrong Version detected with project_wheel_metadata #3088

finswimmer opened this issue Feb 5, 2022 · 4 comments · Fixed by #3230

Comments

@finswimmer
Copy link

Hello,

I'm not sure whether this is a problem with build, pep517, importlib.metadata or something different.

I triaged a potential bug in poetry 1.2.0a2 and realized the following:

When I build a wheel for the current sqlalchemy from it's main branch - after cloning the repo - by python -m build the Version field in METADATA is 2.0.0b1.dev0.

But when I run this in a python console the result is different:

import build.util
meta = build.util.project_wheel_metadata(".")
meta.get("Version")
'2.0.0b1.dev0dev'

As you can see there's an additional dev at the end of the version.

Any ideas what's going on?

Python: 3.10.2
build: 0.7.0

fin swimmer

@layday
Copy link
Member

layday commented Feb 5, 2022

project_wheel_metadata doesn't build an intermediate sdist so I'd start by checking what the version for python -m build -w is.

@layday
Copy link
Member

layday commented Feb 5, 2022

Okay, the prepare_metadata_for_build_wheel hook produces '2.0.0b1.dev0dev'. This is most likely a bug in how dist_info processes tag_build - I can reproduce it with python setup.py dist_info.

@FFY00
Copy link
Member

FFY00 commented Feb 7, 2022

Yeah, it seems like a bug in setuptools.

@jaraco could you transfer the issue?

@jaraco jaraco transferred this issue from pypa/build Feb 7, 2022
@jaraco
Copy link
Member

jaraco commented Feb 7, 2022

A similar issue was reported in this comment. There may already be a bug reported about it. I'd appreciate help to triage.

jcmdln added a commit to jcmdln/snagem that referenced this issue Mar 19, 2022
Poetry 1.2.x introduces a new feature, package groups, which allows us
to split our dependencies much like how you might see projects use
requirements-*.txt or requirements/*.txt to split and/or bundle them
into groups.

Making this change required downgrading to SQLAlchemy==1.4 and
replacing psycopg with psycopg2 as I hit the following bug after
updating poetry: pypa/setuptools#3088

Once this is resolved (or an SQLAlchemy==2 release happens) we'll
return to using sqlalchemy2+psycopg.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants