-
Notifications
You must be signed in to change notification settings - Fork 963
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
long_description_content_type
flag in setup.py seems to be ignored on upload.
#4079
Comments
… something. See pypi/warehouse#4079 (I think?). Siiiiigh.
Note. https://pypi.org/help/#description-content-type also claims you can use other formats (and specifically mentions markdown!), but after installing
Is markdown support a feature that's not actually been implemented yet? Did the documentation get released too early or something? |
You might try using the latest version of twine to handle the upload. Also, more metadata is available when you upload a wheel first, IIRC. $ python setup.py sdist
$ pip install -U wheel
$ python setup.py bdist_wheel
$ twine upload dist/*whl dist/*gz |
@jamadden Nope, it's definitely broken with the latest twine/uploading a wheel first. I think the issue is caused by a bug in https://github.com/pypa/readme_renderer - it's exiting with an error when it checks packages with a markdown readme (when it should not):
|
I actually think this is due to #3980, I'll investigate now. Thank you for finding this! |
@theacodes - No worries! And yeah, that does seem more likely: it matches the timeframe of @fake-name 's original issue much more closely. |
@fake-name I can't reproduce this. See https://test.pypi.org/project/WebRequest/. I'm using setuptools 39.2.0 and twine 1.11.0. If you wouldn't mind uploading your wheel and sdist somewhere else, I'd love to take a look. |
Also I see you tried using |
I think I found the issue - it's actually a problem with |
Gotcha. Makes sense. Shall we close this?
…On Mon, May 28, 2018, 8:23 PM Jeff Stafford ***@***.***> wrote:
I think I found the issue - it's actually a problem with wheel. Spent a
lot of time just now trying to make a reproducible example with one of my
own repositories, only to find that my issues magically disappeared on
creating a new Python environment and updating all my packages. It turns
out that updating wheel from 0.30.0 to 0.31.0 fixes things (setuptools
was 39.2.0 and twine was 1.11.0 in both cases).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4079 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPUc0qjc8sbdeqtJImtSwP8C8FHv90Qks5t3L87gaJpZM4UNuAe>
.
|
Go for it! (also thanks for looking into this!) |
Still fails at my end. I manually updated wheel, setuptools was already up-to-date (Setuptools 39.2.0, wheel 0.31.1).
Ok, uploading with twine works, using Some built packages: SDist: WebRequest-0.0.30.tar.gz |
Waf checking in the chromium fetch interface. Revs have implemented a bunch more then would otherwise be reasonable due to debugging for pypi/warehouse#4079
Having the same issue. I have all requirements updated: $ pip install --upgrade setuptools wheel twine
Requirement already up-to-date: setuptools in c:\python27\lib\site-packages (39.2.0)
Requirement already up-to-date: wheel in c:\python27\lib\site-packages (0.31.1)
Requirement already up-to-date: twine in c:\python27\lib\site-packages (1.11.0) setup.py: from setuptools import setup
basedir = path.abspath(path.dirname(__file__))
with open(path.join(basedir, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
...
long_description=long_description,
long_description_content_type='text/markdown',
...
) PKG_INFO:
Here is the error output when upload: $ twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
Uploading Flask_CKEditor-0.4-py2.py3-none-any.whl
100%|##########################################################################################################################################| 4.95M/4.95M [01:15<00:00, 22.7KB/s]
Uploading Flask-CKEditor-0.4.tar.gz
100%|##########################################################################################################################################| 3.70M/3.70M [00:55<00:00, 33.8KB/s]
HTTPError: 400 Client Error: The description failed to render in the default format of reStructuredText. See https://pypi.org/help/#description-content-type for more information. fo
r url: https://upload.pypi.org/legacy/ Any idea? It seems that only the wheel file ( |
Can you send over your sdist? I'd like to take a look at it. |
Just to provide another data point, Travis-CI auto deployment is also broken when using Markdown READMEs. Here is the setup.py and as Travis-CI is using The error message:
makes me think that something somewhere is ignoring that this is a Markdown file even though it is explicitly declared in |
Works:
Does not work:
Pacakges:
|
@rpkilby based on your message I guess that Travis-CI is using I'm trying to find the proper channel there to file an issue but it would be nice if |
We're reverting this behavior in #4099, hang tight. |
A package I originally uploaded with no content type set, and then attempted to change to markdown by adding Is it possible to change the content type for an existing package? |
Hi @frmdstryr, it's not possible to change anything about a published package -- they are essentially immutable. It's likely that you have an out-of-date version of either
Once you do that, you can either increment the version number and make a new release, or make a post release to fix your description. |
Sorry, by existing I meant the package was originally uploaded without a content type set, it was a new release with an incremented version number. Also setuptools and twine are already up to date
|
@frmdstryr Can you share a link to the release in question? |
Please update |
I have setuptools upgraded to version 41.0.1 |
I updated the libraries locally and was able to create the package successfully. I'm sending the PR directly to master so we see if it is really fixing the issue. also see: pypi/warehouse#4079 (comment) fixes #149
I updated the libraries locally and was able to create the package successfully. I'm sending the PR directly to master so we see if it is really fixing the issue. also see: pypi/warehouse#4079 (comment) fixes #149
I updated the libraries locally and was able to create the package successfully. I'm sending the PR directly to master so we see if it is really fixing the issue. also see: pypi/warehouse#4079 (comment) fixes #149
Still have the issue with latest packages installed: HTTPError: 400 Client Error: The description failed to render in the default format of reStructuredText. See https://pypi.org/help/#description-content-type for more information. for url: https://upload.pypi.org/legacy/ |
Seems I can make it working by modifying the to some code |
This is blocking publishing to pypi; see pypi/warehouse#4079 had to give up after trying a few times.
This is blocking publishing to pypi; see pypi/warehouse#4079 had to give up after trying a few times.
This is blocking publishing to pypi; see pypi/warehouse#4079 had to give up after trying a few times.
This comment has been minimized.
This comment has been minimized.
PyPI has supported markdown long descriptions since March 2018, so there's no need to convert. |
Checking dist\xx-1.1-py2.py3-none-any.whl: FAILED |
I have same issue, e.g. like @jagadeesh-l describes, on version 3.2.0 of twine. |
i have the same issue. even after updating using |
Im still having this issue as well. Anyone found a fix? |
I ran sudo pip3 install --upgrade pip
sudo pip3 install --upgrade setuptools
sudo pip3 install --upgrade wheel
sudo pip3 install --upgrade twine
sudo pip3 install --upgrade setuptools_scm and then, I ran python3 setup.py sdist
twine upload -r testpypi -u <myusername> -p <mypassword> dist/* and I still get
even though I correctly specified
in my It's also worth noting that uploading works just fine from my own machine, and used to work in GitHub actions too for the previous release, but I did not figure out where this difference in behavior comes from (probably because of different versions of Python modules). The code in question is this GitHub actions pipeline (link points to the exact lines where the package is supposed to be pushed to PyPi for convenience). Thanks in advance! |
Anyone still having an issue with |
Describe the bug
I have a python package on PyPi that just (as of the last ~4-5 days) now fails to upload, with a new error:
Ok, that's clear enough. My readme is in markdown, let's see how to fix this.
Going to https://packaging.python.org/tutorials/packaging-projects/#description, it states you can add
long_description_content_type="text/markdown",
to yoursetup.py
file, and it'll be processed as markdown.What?
Expected behavior
I expect if I specify the readme is markdown, as the documentation says to do so, the readme should be treated as markdown.
To Reproduce
Attempt to upload a package with a readme that is valid markdown, but not valid reStructuredText.
My Platform
Actual project in question is here. The readme.md in question is here, and the setup.py is here
The text was updated successfully, but these errors were encountered: