tripleo-validations package upload to pypi fails

Bug #1983405 reported by Elod Illes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Undecided
Elod Illes

Bug Description

With twine 4.0.0 release the tripleo-validations package upload to pypi fails with the error [1]:

Uploading distributions to https://upload.pypi.org/legacy/
Uploading tripleo_validations-14.3.0-py3-none-any.whl
...
WARNING Error during upload. Retry with the --verbose option for more details.
ERROR HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
         'text/rst-x' is an invalid value for Description-Content-Type. Error:
         Invalid description content type: type/subtype is not valid See
         https://packaging.python.org/specifications/core-metadata for more
         information.

This is due to wrong metadata in setup.cfg [2], which is rst-x however it should be x-rst [3]. Previously this caused that pypi added simply 'UNKNOWN' to metadata (see whl files from former releases), but now pypi refuses the upload as this was fixed with PR #887 in twine [4].

This needs to be fixed at least in master and wallaby, as those are the branches that can get releases and published in pypi.

[1] https://zuul.opendev.org/t/openstack/build/8063918ab5f3401fae4d13d105694660
[2] https://opendev.org/openstack/tripleo-validations/src/commit/d5b5458e46c38fedbf8c30835dc1a6e36c9f5434/setup.cfg#L5
[3] https://packaging.python.org/en/latest/specifications/core-metadata/#description-content-type
[4] https://github.com/pypa/twine/pull/887

Elod Illes (elod-illes)
Changed in tripleo:
assignee: nobody → Elod Illes (elod-illes)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-validations (master)
Changed in tripleo:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-validations (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-validations/+/851925

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-validations/+/851923
Committed: https://opendev.org/openstack/tripleo-validations/commit/896dcbdbc5cff78810c734f7eb39843364ef596d
Submitter: "Zuul (22348)"
Branch: master

commit 896dcbdbc5cff78810c734f7eb39843364ef596d
Author: Elod Illes <email address hidden>
Date: Tue Aug 2 19:49:37 2022 +0200

    Fix package metadata for pypi upload

    pypi upload is failing as now metadata check is more strict and
    formerly ignored wrong long_description_content_type (rst-x instead of
    x-rst) now results error during pypi upload. This patch sets the
    proper content type that pypi accepts.

    Closes-Bug: #1983405
    Change-Id: I084e8061523d59bb4855a0db1a19873a85fda57b

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-validations/+/851925
Committed: https://opendev.org/openstack/tripleo-validations/commit/d74d3fc952aea6eda73192eb235217c3ba1052f3
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit d74d3fc952aea6eda73192eb235217c3ba1052f3
Author: Elod Illes <email address hidden>
Date: Tue Aug 2 19:49:37 2022 +0200

    Fix package metadata for pypi upload

    pypi upload is failing as now metadata check is more strict and
    formerly ignored wrong long_description_content_type (rst-x instead of
    x-rst) now results error during pypi upload. This patch sets the
    proper content type that pypi accepts.

    Closes-Bug: #1983405
    Change-Id: I084e8061523d59bb4855a0db1a19873a85fda57b
    (cherry picked from commit 896dcbdbc5cff78810c734f7eb39843364ef596d)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-validations 14.3.1

This issue was fixed in the openstack/tripleo-validations 14.3.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-validations 16.0.0

This issue was fixed in the openstack/tripleo-validations 16.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.