-
Notifications
You must be signed in to change notification settings - Fork 966
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=text/markdown doesn't always work #3664
Comments
@di will know which bug I'm talking about. |
Yep, this is due to building with an old version of |
That worked - I ran |
I might have a similar problem: https://pypi.org/project/shortcountrynames/
|
@rgieseke Lookng at the latest release for that project, the Can you confirm that you have |
I have the same problem: https://pypi.org/project/ConceptNet/5.6.2/ . Repo: https://github.com/commonsense/conceptnet5 I have setuptools 39.0.1, twine 1.11.0, and wheel 0.31.0, and I ran I even deleted ConceptNet 5.6.1 and incremented the version to 5.6.2 when I updated all the above dependencies. However, I'm not just going to keep incrementing the version number for the sake of PyPI. |
@di Updating setuptools did the trick! Thanks for the quick reply and so much for the PyPI update! @rspeer You can use the https://test.pypi.org/ instance to test as well ... (and delete tags later or re-try) |
Apparently |
@rspeer Can you link us to the documentation that showed you to use |
https://docs.python.org/3.6/distutils/packageindex.html#the-upload-command Also a decade of habit. If you want to change people's habits, you could at least tell them they need to change. |
To clarify something: I'm not claiming that PyPI is linking to the Python documentation. PyPI links to packaging.python.org, of course. However, one way that people learn about PyPI in the first place is the Python documentation, where PyPI is described as that place that If you want to update people's understanding about how to upload Python packages, talking about it on your own blog and mentioning Twine twice on a very long documentation page isn't enough. You need to make getting the new tools part of the new PyPI user experience. |
As per pypi/warehouse#3664 Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
The intention is to provide requirements for the Python installer. There are features in the setup process which require specific setuptools, wheels and pip versions. Currently it seems that also older versions are able to handle the install process. The topic is complicated and not fully understood by the author. But the intention is to provide more robust and well defined installation and to understand the concept better. Required functionalities PEP 508 defines python_version as one of the environment markers which requires setuptools 36.2.0 (released Jul 13, 2017) or later [1]. This is used to select PyYAML version as well as one test dependency. PEP 566 added new metadata fields including Description- Content-Type which requires setuptools 38.6.0 (released Mar 15, 2018) or later [1]. This is used to define the long description as rst formatted text. This seems to require also wheel version 0.31.0 of greater [4]. Pip 9.1 added support for pyproject.toml. [1] https://setuptools.readthedocs.io/en/latest/history.html [2] https://pip.pypa.io/en/stable/news/ [3] https://hynek.me/articles/conditional-python-dependencies/ [4] pypi/warehouse#3664 (comment) Signed-off-by: Heikki Laaksonen <laaksonen.heikki.j@gmail.com>
I actually have this problem right now, and using both |
Hi @osilkin98, can you link to the release with a broken description? Can you tell us how you uploaded the release to PyPI? |
@di I was typing out a response documenting how to replicate the issue and in doing so I realized that the version of wheel that was being used during the setup was installed to I fixed the issue simply by verbosely running |
This problem is still occurring when running Tested ubuntu 18.04 and windows 10. Ubuntu uploads everything fine, but running the exact same commands from a windows machine causes the above issue to appear with the exact same files. setuptools, wheel, and twine are all at or beyond the levels specified in the above comments, and are at the same level for both machines. |
@scruffystuffs Can you point me to a distribution on PyPI that you've uploaded that has this problem? |
Uploaded two example cases to test.pypi.org. Uploaded from Windows The files for these distributions should be identical, other than the version number, yet they render entirely differently on the project page. If any more info is needed, let me know and I will be happy to provide it. |
@scruffystuffs Looking at the metadata of the source distribution of your package, it has Windows-style line endings in the |
I'm still experiencing this issue trying to upload a package on Linux (Ubuntu):
setup.py long_description=readme,
long_description_content_type="text/markdown", running: python3 setup.py sdist bdist_wheel
python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/* error 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/ @di please advise |
@wesinator Can you attach the distributions you're trying to upload? |
attached: |
The problem is likely in your It's possible to indicate that the license is GPL v3 in a machine-readable way using a classifier such as
|
@jamadden I already have that exact classifier - https://github.com/wesinator/domainbigdata-python/blob/c4c3b12a37ba6e86931f0c4575406cf42cdcd090/setup.py#L23 also, not sure why the error would say |
@wesinator It's a bug: pypa/setuptools#1390 |
btw, the license was pulled directly from https://www.gnu.org/licenses/gpl-3.0.txt Ok, removing |
newlines in https://www.gnu.org/licenses/gpl-3.0.txt was causing description failed to render error pypi/warehouse#3664 (comment) pypa/setuptools#1390
* add files for setup / pip #2 * remove license field newlines in https://www.gnu.org/licenses/gpl-3.0.txt was causing description failed to render error pypi/warehouse#3664 (comment) pypa/setuptools#1390
running into similar issues with my team for relative links |
Relative links are not currently supported: pypa/readme_renderer#163 |
This page does not show correctly rendered markdown: https://pypi.org/project/datasette/
The setup.py file looks like this:
https://github.com/simonw/datasette/blob/fb988ace7c7e2bee5ac142a0eab22431d0675a77/setup.py#L13-L18
According to @ambv on Twitter this is caused by a bug: https://twitter.com/llanga/status/984866099886895104 "There's a bug now where you need to upload just the tar.gz first with Twine and only then upload the rest of the files."
The text was updated successfully, but these errors were encountered: