-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
setuptools ==69.3.0 builds my-package
CLI as my_package
(69.2.0 would build my-package
CLI as my-package
#4300
Comments
my-package
as my_package
my-package
CLI as my_package
(69.2.0 would build my-package
CLI as my-package
I think it was due to this? It's unfortunate that this affects any CLI tool that wants to be from setuptools import setup
setup(
# ...,
entry_points={
'console_scripts': [
'hello-world = timmins:hello_world',
]
}
) |
Yup, this broke our CI as well. I would argue this is probably not a patch release. |
Please note that the specific name of the built file is subject to change according to the changes Packaging PEPs (that is what happened in this case). Depending on the exact name, without considering that it might be cannonicalised to a different but corresponding form, will likely introduce points of failure in your CI. So this is not a bug, but an intentional change that was required to align to the latest standardisation efforts. @kmcquade, @mikealfare, could you please try to use patterns/regexes in your CI scripts to make them robust to name normalisation? |
my-package
CLI as my_package
(69.2.0 would build my-package
CLI as my-package
my-package
CLI as my_package
(69.2.0 would build my-package
CLI as my-package
Yeah, we're making those updates currently. |
I only expect the name of the package as reflected by the package metadata to be affected. It should not affect the package's true name nor its import name nor the names of any console scripts. It's unfortunate that applications were depending on this naming convention, but since it was merely an implementation detail and had no backing tests or specifications, the transition to something that is specified and standardized means you can now start to rely on the naming. |
The issue was that the names of the artifacts also changed. So if you want to do anything with them locally (e.g. verify them, log the generated files that fit a regex, etc.) prior to publishing them, then you rely on the names to some extent.
I agree that we should move towards standardization. However, here are the changes we wound up making as a result of this change:
|
`setuptools` made a decision to change the artifact name it builds (from `grpcio-health-checking` to `grpcio_health_checking`) in their latest release (pypa/setuptools#4300). As a result, we need broaden our regex so that our tests can pickup the correct files. ### Note * Using `[_-]*` instead of `[_-]?` to match one character since `bash` uses a different flavor of regular expressions called basic regular expressions (BREs) which do not support the optional quantifier `?`. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. --> Closes #36352 COPYBARA_INTEGRATE_REVIEW=#36352 from XuanWang-Amos:fix_distribution_test 8dfcc4e PiperOrigin-RevId: 625083784
`setuptools` made a decision to change the artifact name it builds (from `grpcio-health-checking` to `grpcio_health_checking`) in their latest release (pypa/setuptools#4300). As a result, we need broaden our regex so that our tests can pickup the correct files. ### Note * Using `[_-]*` instead of `[_-]?` to match one character since `bash` uses a different flavor of regular expressions called basic regular expressions (BREs) which do not support the optional quantifier `?`. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. --> Closes grpc#36352 COPYBARA_INTEGRATE_REVIEW=grpc#36352 from XuanWang-Amos:fix_distribution_test 8dfcc4e PiperOrigin-RevId: 625083784
Backport of #36352 to v1.63.x. --- `setuptools` made a decision to change the artifact name it builds (from `grpcio-health-checking` to `grpcio_health_checking`) in their latest release (pypa/setuptools#4300). As a result, we need broaden our regex so that our tests can pickup the correct files. ### Note * Using `[_-]*` instead of `[_-]?` to match one character since `bash` uses a different flavor of regular expressions called basic regular expressions (BREs) which do not support the optional quantifier `?`. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. -->
Is this update is only intended to canonicalize The binary-distribution-format specification seems to suggest a similar naming standardization (i.e., no periods or hyphens). However, for our packages, while
|
@piehld, likely to be related to the update in the standard:
This update is not implemented yet, only PEP 625 is in the process of being adopted by setuptools. |
setuptools version
setuptools==69.3.0
Python version
Python 3.11
OS
Linux, Mac
Additional environment information
No response
Description
We have a CLI that is built with setuptools. We didn't have our version pinned. Right after setuptools==69.3.0 was released to PyPi, our automated jobs started failing that use this package.
Let's call the package
my-package
.We install the CLI with:
I noticed that setuptools came out with a release less than an hour ago (at the time of this writing) so I tried pinning the setuptools version to the prior version (69.2.0). It worked.
Changing
make build
to this fixed the error:build: setup-env clean python3 -m pip install setuptools==69.2.0 wheel==0.43.0 python3 -m setup -q sdist bdist_wheel
The setup.py script is like this:
Before the downgrade, we were getting messages like this in GitHub Actions when we would try to install the package
And I saw that if you checked out the contents of the
dist/
folder, the file that was there was titledmy_package-420.69.tar.gz
, notmy-package-420.69.tar.gz
as it was before 69.3.0.Hope this helps. Our current workaround of pinning the version works, but wanted to flag as soon as possible. Thanks.
Expected behavior
See the description
How to Reproduce
See the description
Output
See the description
The text was updated successfully, but these errors were encountered: