-
Notifications
You must be signed in to change notification settings - Fork 308
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
DeprecationWarning: Implicit None on return values is deprecated and will raise KeyErrors. #977
DeprecationWarning: Implicit None on return values is deprecated and will raise KeyErrors. #977
Comments
Thanks for the report. This was fixed in #968, and will be included in the next Twine release. |
Today I tried to release
It looks like twine is still reliant on the deprecated behavior. I'm unsure if we should re-open this issue or start a new one, since the concerns are very closely related. |
When running the current test suite, I see that the DeprecationWarnings were apparent:
|
same error got from gitlab-ci. twine 5.1.0
|
This command fixed the issue. pip install importlib_metadata==7.2.1 Add this line to github action name: Publish Python 🐍 distributions 📦 to PyPI
on:
push:
tags:
- '*'
branches:
- main
jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
+ pip install importlib_metadata==7.2.1
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/* |
yes, the bug happens with importlib_metadata 8.0.0 |
Ah, release season is so fun! The amount of hair I've pulled out where something that was working an hour ago is no longer working... Glad to know the issue is being tracked! |
- Pin importlib_metadata per pypa/twine#977 - Update changelog
5.1.0 reverted the (fixed) reliance on this behavior. |
2.0.0 tagged deploy failed due to: pypa/twine#977
FYI: A PR to fix this KeyError issue is at #1115 |
The twine issue was resolved in 5.1.1 and is published on PyPI: https://pypi.org/project/twine/ |
For context, see: pypa/twine#977
* Fix dialect xpath selector * Update changelog * Fix bug with "ib-content" classes not using contains specifier * Updates requirements to fix Twine issue For context, see: pypa/twine#977 --------- Co-authored-by: Kyle Gorman <[email protected]>
Twine is the library used to deploy dbt-materialize to PyPi. Recent versions are broken with missing metadata keys. The issue has been resolved in the latest release. Example failure: https://buildkite.com/materialize/deploy/builds/15079#0190cc52-c16a-4ea4-8020-e1df5daed947 Twine issue: pypa/twine#977
Twine is the library used to deploy dbt-materialize to PyPi. Recent versions are broken with missing metadata keys. The issue has been resolved in the latest release. Example failure: https://buildkite.com/materialize/deploy/builds/15079#0190cc52-c16a-4ea4-8020-e1df5daed947 Twine issue: pypa/twine#977
Twine is the library used to deploy dbt-materialize to PyPi. Recent versions are broken with missing metadata keys. The issue has been resolved in the latest release. Example failure: https://buildkite.com/materialize/deploy/builds/15079#0190cc52-c16a-4ea4-8020-e1df5daed947 Twine issue: pypa/twine#977 <!-- Describe the contents of the PR briefly but completely. If you write detailed commit messages, it is acceptable to copy/paste them here, or write "see commit messages for details." If there is only one commit in the PR, GitHub will have already added its commit message above. --> ### Motivation <!-- Which of the following best describes the motivation behind this PR? * This PR fixes a recognized bug. [Ensure issue is linked somewhere.] * This PR adds a known-desirable feature. [Ensure issue is linked somewhere.] * This PR fixes a previously unreported bug. [Describe the bug in detail, as if you were filing a bug report.] * This PR adds a feature that has not yet been specified. [Write a brief specification for the feature, including justification for its inclusion in Materialize, as if you were writing the original feature specification.] * This PR refactors existing code. [Describe what was wrong with the existing code, if it is not obvious.] --> ### Tips for reviewer <!-- Leave some tips for your reviewer, like: * The diff is much smaller if viewed with whitespace hidden. * [Some function/module/file] deserves extra attention. * [Some function/module/file] is pure code movement and only needs a skim. Delete this section if no tips. --> ### Checklist - [ ] This PR has adequate test coverage / QA involvement has been duly considered. ([trigger-ci for additional test/nightly runs](https://trigger-ci.dev.materialize.com/)) - [ ] This PR has an associated up-to-date [design doc](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/README.md), is a design doc ([template](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/00000000_template.md)), or is sufficiently small to not require a design. <!-- Reference the design in the description. --> - [ ] If this PR evolves [an existing `$T ⇔ Proto$T` mapping](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/command-and-response-binary-encoding.md) (possibly in a backwards-incompatible way), then it is tagged with a `T-proto` label. - [ ] If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label ([example](MaterializeInc/cloud#5021)). <!-- Ask in #team-cloud on Slack if you need help preparing the cloud PR. --> - [ ] This PR includes the following [user-facing behavior changes](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/guide-changes.md#what-changes-require-a-release-note): - <!-- Add release notes here or explicitly state that there are no user-facing behavior changes. -->
Packaging opda with importlib_metadata 8.0.0 and twine 4.0.2 raises an exception: "KeyError: 'license'". The exception results from a change in importlib_metadata where requesting missing metadata used to return None but now raises a KeyError. Upgrading twine to 5.1.1 resolves the issue. For more information, see pypa/twine#977 which discusses the missing license metadata in twine 4.0.2, and see pypa/twine#1125 for how the release of importlib_metadata 8.0.0 triggered the issue.
The pinned version of twine appears to be incompatible with the version of importlib-metadata it pulls in transitively ( pypa/twine#977 ) Upgrade twine to 5.1.1 where this issue should be fixed.
Your Environment
Thank you for taking the time to report an issue.
To more efficiently resolve this issue, we'd like to know some basic information about your system and setup.
Ubuntu 20.04
Python 3.8.10
pip (via tox)
twine version 4.0.2 (importlib-metadata: 6.0.0, keyring: 23.13.1, pkginfo: 1.9.6, requests: 2.28.2, requests-toolbelt: 0.10.1, urllib3: 1.26.14)
PyPI
The Issue
Please describe the issue that you are experiencing.
Running twine emits a deprecation warning:
It appears that twine's metadata does not include the License key. As a result, the
metadata
"dictionary" twine is getting fromimportlib_metadata
doesn't contain a keylicense
.The metadata in the wheel uploaded to PyPI can be seen here: https://www.wheelodex.org/projects/twine/#metadata
Steps to Reproduce
If the issue is predictable and consistently reproducible, please list the steps here.
python3 -Walways -m twine --version
The text was updated successfully, but these errors were encountered: