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

Inconsistent error handling in case of twine upload fails #17343

Closed
gbtami opened this issue Dec 31, 2024 · 3 comments
Closed

Inconsistent error handling in case of twine upload fails #17343

gbtami opened this issue Dec 31, 2024 · 3 comments

Comments

@gbtami
Copy link

gbtami commented Dec 31, 2024

I wanted to upload our artifacts from https://github.com/fairy-stockfish/Fairy-Stockfish/actions/runs/12547320652#artifacts
I uploaded several releases before without any problem, but today I get this:

tamas@tami:~/Fairy-Stockfish$ twine check dist/*
Checking dist/pyffish-0.0.85-cp310-cp310-macosx_10_14_x86_64.whl: PASSED
Checking dist/pyffish-0.0.85-cp310-cp310-macosx_11_0_arm64.whl: PASSED
Checking dist/pyffish-0.0.85-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: PASSED
Checking dist/pyffish-0.0.85-cp310-cp310-win_amd64.whl: PASSED
Checking dist/pyffish-0.0.85-cp311-cp311-macosx_10_14_x86_64.whl: PASSED
Checking dist/pyffish-0.0.85-cp311-cp311-macosx_11_0_arm64.whl: PASSED
Checking dist/pyffish-0.0.85-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: PASSED
Checking dist/pyffish-0.0.85-cp311-cp311-win_amd64.whl: PASSED
Checking dist/pyffish-0.0.85-cp312-cp312-macosx_10_14_x86_64.whl: PASSED
Checking dist/pyffish-0.0.85-cp312-cp312-macosx_11_0_arm64.whl: PASSED
Checking dist/pyffish-0.0.85-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: PASSED
Checking dist/pyffish-0.0.85-cp312-cp312-win_amd64.whl: PASSED
Checking dist/pyffish-0.0.85-cp38-cp38-macosx_10_14_x86_64.whl: PASSED
Checking dist/pyffish-0.0.85-cp38-cp38-macosx_11_0_arm64.whl: PASSED
Checking dist/pyffish-0.0.85-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: PASSED
Checking dist/pyffish-0.0.85-cp38-cp38-win_amd64.whl: PASSED
Checking dist/pyffish-0.0.85-cp39-cp39-macosx_10_14_x86_64.whl: PASSED
Checking dist/pyffish-0.0.85-cp39-cp39-macosx_11_0_arm64.whl: PASSED
Checking dist/pyffish-0.0.85-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: PASSED
Checking dist/pyffish-0.0.85-cp39-cp39-win_amd64.whl: PASSED
Checking dist/pyffish-0.0.85.tar.gz: PASSED
tamas@tami:~/Fairy-Stockfish$ twine upload dist/* --verbose --repository pyffish
INFO     Using configuration from /home/tamas/.pypirc                                                                                               
Uploading distributions to https://upload.pypi.org/legacy/
INFO     dist/pyffish-0.0.85-cp310-cp310-macosx_10_14_x86_64.whl (531.9 KB)                                                                         
INFO     dist/pyffish-0.0.85-cp310-cp310-macosx_11_0_arm64.whl (517.8 KB)                                                                           
INFO     dist/pyffish-0.0.85-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB)                                                    
INFO     dist/pyffish-0.0.85-cp310-cp310-win_amd64.whl (363.4 KB)                                                                                   
INFO     dist/pyffish-0.0.85-cp311-cp311-macosx_10_14_x86_64.whl (531.9 KB)                                                                         
INFO     dist/pyffish-0.0.85-cp311-cp311-macosx_11_0_arm64.whl (517.9 KB)                                                                           
INFO     dist/pyffish-0.0.85-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB)                                                    
INFO     dist/pyffish-0.0.85-cp311-cp311-win_amd64.whl (363.4 KB)                                                                                   
INFO     dist/pyffish-0.0.85-cp312-cp312-macosx_10_14_x86_64.whl (531.9 KB)                                                                         
INFO     dist/pyffish-0.0.85-cp312-cp312-macosx_11_0_arm64.whl (517.9 KB)                                                                           
INFO     dist/pyffish-0.0.85-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB)                                                    
INFO     dist/pyffish-0.0.85-cp312-cp312-win_amd64.whl (363.4 KB)                                                                                   
INFO     dist/pyffish-0.0.85-cp38-cp38-macosx_10_14_x86_64.whl (531.9 KB)                                                                           
INFO     dist/pyffish-0.0.85-cp38-cp38-macosx_11_0_arm64.whl (517.8 KB)                                                                             
INFO     dist/pyffish-0.0.85-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB)                                                      
INFO     dist/pyffish-0.0.85-cp38-cp38-win_amd64.whl (363.4 KB)                                                                                     
INFO     dist/pyffish-0.0.85-cp39-cp39-macosx_10_14_x86_64.whl (531.9 KB)                                                                           
INFO     dist/pyffish-0.0.85-cp39-cp39-macosx_11_0_arm64.whl (517.8 KB)                                                                             
INFO     dist/pyffish-0.0.85-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB)                                                      
INFO     dist/pyffish-0.0.85-cp39-cp39-win_amd64.whl (363.4 KB)                                                                                     
INFO     dist/pyffish-0.0.85.tar.gz (317.5 KB)                                                                                                      
INFO     username set by command options                                                                                                            
INFO     password set from config file                                                                                                              
INFO     username: __token__                                                                                                                        
INFO     password: <hidden>                                                                                                                         
Uploading pyffish-0.0.85-cp310-cp310-macosx_10_14_x86_64.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 576.5/576.5 kB • 00:00 • 1.0 MB/s
INFO     Response from https://upload.pypi.org/legacy/:                                                                                             
         400 'License :: OSI Approved :: GNU General Public License v3 or later (GPL-3.0-or-later)' is not a valid classifier. See                  
         https://packaging.python.org/specifications/core-metadata for more information.                                                            
INFO     <html>                                                                                                                                     
          <head>                                                                                                                                    
           <title>400 'License :: OSI Approved :: GNU General Public License v3 or later (GPL-3.0-or-later)' is not a valid classifier. See         
         https://packaging.python.org/specifications/core-metadata for more information.</title>                                                    
          </head>                                                                                                                                   
          <body>                                                                                                                                    
           <h1>400 'License :: OSI Approved :: GNU General Public License v3 or later (GPL-3.0-or-later)' is not a valid classifier. See            
         https://packaging.python.org/specifications/core-metadata for more information.</h1>                                                       
           The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>                              
         &#x27;License :: OSI Approved :: GNU General Public License v3 or later (GPL-3.0-or-later)&#x27; is not a valid classifier. See            
         https://packaging.python.org/specifications/core-metadata for more information.                                                            
                                                                                                                                                    
                                                                                                                                                    
          </body>                                                                                                                                   
         </html>                                                                                                                                    
ERROR    HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/                                                                            
         'License :: OSI Approved :: GNU General Public License v3 or later (GPL-3.0-or-later)' is not a valid classifier. See                      
         https://packaging.python.org/specifications/core-metadata for more information.                                                            
tamas@tami:~/Fairy-Stockfish$ twine --version
twine version 6.0.1 (keyring: 24.3.1, pkginfo: 1.10.0, requests: 2.31.0, requests-toolbelt: 1.0.0, urllib3: 2.0.7)
tamas@tami:~/Fairy-Stockfish$ 
@gbtami gbtami added bug 🐛 requires triaging maintainers need to do initial inspection of issue labels Dec 31, 2024
@miketheman
Copy link
Member

The error message is clear with the problem - the classifier updated 2 days ago is non conformant with the allowed classifiers.

See https://pypi.org/classifiers/

@miketheman miketheman removed requires triaging maintainers need to do initial inspection of issue bug 🐛 labels Dec 31, 2024
@gbtami gbtami changed the title twine upload fails Inconsistent error handling in case of twine upload fails Dec 31, 2024
@gbtami
Copy link
Author

gbtami commented Dec 31, 2024

You are absolutely right. I completely forgot about that change, sorry for the noise.

I have to note that twine error handling could be better and cleaner.

  1. twine check passed. I expect it to tell me about this error early, not in twine upload phase.
  2. The response formatting could be better somehow.
    First it talked about the license in a paragraph started with "INFO", then comes another "INFO" paragraph and finally an "ERROR"
    As a Python programmer I find this a bit confusing and misleading.

@di
Copy link
Member

di commented Dec 31, 2024

Those issues probably belong in the twine issue tracker here instead: https://github.com/pypa/twine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants