-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Upload wheel fails with: "'pkginfo.distribution' has no attribute 'must_decode'" #107
Comments
This is due to pypa/twine#940, and should be temporarily resolved by the hotfix release of https://pypi.org/project/pkginfo/1.9.1/, and eventually by pypa/twine#941. |
🤦🏼 I should really invest in #101 |
I think I can attempt pinning the deps now, partially resolving #101. |
@ryeleo one suspicious thing in your traceback is the use of Python 3.7. Our action currently uses Python 3.9, so you must be using Twine directly, meaning this issue tracker is not the right one, and you need to take it up with Twine. |
@webknjaz should I change anything with my workflow: - uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }} |
@ryeleo not really, except maybe delete This should be enough as of today: - python -m
- build
- --sdist
- --wheel
- --outdir dist/
- .
+ python -m build (but, of course, this won't fix the traceback in twine) |
@ryeleo one more thing you could add to the job definition is environment:
name: pypi
url: https://pypi.org/p/${{ your_package_name }} and store the secret just under that env, not globally. This will also let you require approvals for running the job. |
I think this is public: |
sure, one moment |
@webknjaz it fails in the dockerfile step: |
Ah, sorry about that. I'll check building it locally next time. |
@ydekel6 please, make another attempt. I've made sure that it builds locally. |
@webknjaz did you by chance remove |
That's weird. I changed the installation target to |
Running in interactive mode (i.e. |
This doesn't traceback locally 🤔 $ podman run --rm -it -v "$(pwd):/app" -e INPUT_REPOSITORY_URL= -e INPUT_PASSWORD= -e INPUT_PRINT_HASH= -e INPUT_VERBOSE= -e INPUT_SKIP_EXISTING= -e INPUT_USER= -e INPUT_PACKAGES_DIR=dist/ -e INPUT_VERIFY_METADATA= localhost/gh-action-pypi-publish:latest
ERRO[0000] User-selected graph driver "vfs" overwritten by graph driver "overlay" from database - delete libpod local files to resolve
Checking dist/six-1.16.0-py2.py3-none-any.whl: PASSED with warnings
WARNING `long_description_content_type` missing. defaulting to `text/x-rst`.
Showing hash values of files to be uploaded:
/app/dist/six-1.16.0-py2.py3-none-any.whl
SHA256: 8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
MD5: 529d7fd7e14612ccde86417b4402d6f3
BLAKE2-256: d95ae7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11
Uploading distributions to https://upload.pypi.org/legacy/
INFO dist/six-1.16.0-py2.py3-none-any.whl (10.8 KB)
INFO username set by command options
INFO password set by command options
INFO username: <empty>
INFO password: <empty>
WARNING Skipping six-1.16.0-py2.py3-none-any.whl because it appears to already exist |
@ydekel6 I've gone ahead and just set |
Thanks @webknjaz it worked now :) |
Alright, I've cut v1.5.2. You can now revert to using |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [pypa/gh-action-pypi-publish](https://togithub.com/pypa/gh-action-pypi-publish) | action | minor | `v1.5.1` -> `v1.6.1` | --- ### Release Notes <details> <summary>pypa/gh-action-pypi-publish</summary> ### [`v1.6.1`](https://togithub.com/pypa/gh-action-pypi-publish/releases/tag/v1.6.1) [Compare Source](https://togithub.com/pypa/gh-action-pypi-publish/compare/v1.6.0...v1.6.1) #### What's happened?! There was a sneaky bug in v1.6.0 which caused Twine to be outside the import path in the Python runtime. It is fixed in v1.6.1 by updating `$PYTHONPATH` to point to a correct location of the user-global `site-packages/` directory. **Full Diff**: pypa/gh-action-pypi-publish@v1.6.0...v1.6.1 ### [`v1.6.0`](https://togithub.com/pypa/gh-action-pypi-publish/releases/tag/v1.6.0) [Compare Source](https://togithub.com/pypa/gh-action-pypi-publish/compare/v1.5.2...v1.6.0) #### Anything's changed? The only update is that the Python runtime has been upgraded from 3.9 to 3.11. There are no functional changes in this release. **Full Changelog**: pypa/gh-action-pypi-publish@v1.5.2...v1.6.0 ### [`v1.5.2`](https://togithub.com/pypa/gh-action-pypi-publish/releases/tag/v1.5.2) [Compare Source](https://togithub.com/pypa/gh-action-pypi-publish/compare/v1.5.1...v1.5.2) #### What's Improved - Implemented the Twine transitive dependency tree pinning using pip-tools-generated constraint files. See [https://github.com/pypa/gh-action-pypi-publish/issues/107](https://togithub.com/pypa/gh-action-pypi-publish/issues/107) and [https://github.com/pypa/gh-action-pypi-publish/issues/101](https://togithub.com/pypa/gh-action-pypi-publish/issues/101) for details. **Full Diff**: pypa/gh-action-pypi-publish@v1.5.1...v1.5.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 6am on monday" in timezone Australia/Sydney, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/google/osv.dev). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC40OC4xIiwidXBkYXRlZEluVmVyIjoiMzQuNDguMSJ9-->
I'm trying to upload my wheel and source package to PyPI. For some reason, when I try to upload the wheel file, I get an error:
'pkginfo.distribution' has no attribute 'must_decode'
setup.py
Output from Packaging sdist + bdist
Traceback
The text was updated successfully, but these errors were encountered: