aws / jsii

jsii allows code in any language to naturally interact with JavaScript classes. It is the technology that enables the AWS Cloud Development Kit to deliver polyglot libraries from a single codebase!
https://aws.github.io/jsii
Apache License 2.0
2.63k stars 244 forks source link

Twine 5.1.0 has been yanked leading to errors when publishing to PyPI with jsii-pacmak #4553

Closed SamuelBucheliZ closed 3 months ago

SamuelBucheliZ commented 3 months ago

Describe the bug

twine version 5.1.0 has been yanked (see https://pypi.org/project/twine/5.1.0/ ). More details in https://github.com/pypa/twine/issues/1125

However, version 5.1.0 is hardcoded in https://github.com/aws/jsii/blob/a32eb911e55d0c508df0d13cbd6a48dbb43415e4/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt#L9

This leads to errors when publishing to PyPI with jsii-pacmak, e.g., in projen projects.

See also https://github.com/projen/projen/issues/3674

Expected Behavior

jsii-pacmak uses a twine version that is available or makes it possible to override/configure the used twine version in order to deal with scenarios where a version is yanked.

Current Behavior

The publish step in projen using jsii-pacmak fails, because twine 5.1.0 has been yanked

👾 package-all » package:python | jsii-pacmak -v --target python
[jsii-pacmak] [INFO] Found 1 modules to package
[jsii-pacmak] [INFO] Packaging NPM bundles
[jsii-pacmak] [INFO] Loading jsii assemblies and translations
[jsii-pacmak] [INFO] Packaging 'python' for <redacted>
[jsii-pacmak] [INFO] Command "/tmp/npm-packpXQzYg/.env-vXVMJg/bin/python -m pip install --no-input -r /<redacted>/node_modules/jsii-pacmak/lib/targets/python/requirements-dev.txt" failed with Command (/tmp/npm-packpXQzYg/.env-vXVMJg/bin/python -m pip install --no-input -r /<redacted>/node_modules/jsii-pacmak/lib/targets/python/requirements-dev.txt) failed with status 1:
#STDERR> ERROR: Could not find a version that satisfies the requirement twine~=5.1.0 (from versions: 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.2, 1.2.3, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.11.0rc1, 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.14.0, 1.15.0, 2.0.0, 3.0.0, 3.1.0, 3.1.1, 3.2.0rc1, 3.2.0, 3.3.0rc1, 3.3.0, 3.4.0, 3.4.1, 3.4.2, 3.5.0, 3.6.0, 3.7.0, 3.7.1, 3.8.0, 4.0.0, 4.0.1, 4.0.2, 5.0.0, 5.1.0)
#STDERR> ERROR: No matching distribution found for twine~=5.1.0
#STDERR> 
#STDOUT> Collecting setuptools~=67.3.2
#STDOUT>   Using cached setuptools-67.3.3-py3-none-any.whl (1.1 MB)
#STDOUT> Collecting wheel~=0.42
#STDOUT>   Using cached wheel-0.43.0-py3-none-any.whl (65 kB)
#STDOUT> . Waiting 150 ms before retrying (4 attempts left).

Reproduction Steps

  1. Create an AwsCdkConstructLibrary projen project
  2. Configure publishToPypi
  3. Run yarn build

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.100.0

Environment details (OS name and version, etc.)

Linux 5688aa804527 6.6.22-linuxkit #1 SMP Fri Mar 29 12:21:27 UTC 2024 x86_64 GNU/Linux

SamuelBucheliZ commented 3 months ago

PR https://github.com/aws/jsii/pull/4554 seems to address the issue?

mrgrain commented 3 months ago

PR #4554 seems to address the issue?

Yes. Will close this once the release is out.

mrgrain commented 3 months ago

Release PR is out: https://github.com/aws/jsii/pull/4556

mrgrain commented 3 months ago

jsii-pacmak@1.101.0 is released (still verifying the fix really does work with some package)

mrgrain commented 3 months ago

Verified this release fix the issue. Closing.

Thanks to @SamuelBucheliZ for reporting this.

github-actions[bot] commented 3 months ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.