-
Notifications
You must be signed in to change notification settings - Fork 90
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
Don't allow using third-party lexers #168
Comments
I filed an issue at the pypa warehouse repo: https://github.com/pypa/warehouse/issues/8144
Can you attach the distributions you're trying to upload here, or put them somewhere I can take a look at them? |
I went back to my earlier commit that failed to upload and re-built the dist. I just figured out that you can see the "long_description" that gets generated by When I tried this, it passed both http://rst.ninjs.org/ and the distribution passed I've attached my sdist. Github won't take my wheel, but if it helps I can share it from a Google Drive or something. Thank you!!! |
==>Maybe PyPI shouldn't reject files due to rst errors. It seems like a good idea at first, but it doesn't fix the problem of projects with messed up homepages, and it creates new problems. |
Here's what I get when I run
|
I just created a new environment with Python 3.7, hydrofunctions, and twine. When I ran Do you have any ideas for how I can reproduce this? The error comes from a change I made in how I display example code in the rst file. The code that works uses the double colon syntax with the greater than signs,
The file that doesn't work uses this notation:
I appreciate your help! |
What version of |
Twine 3.1.1 |
The "file that is generated" is just whatever you pass as the
This is what
I think this is the source of our issues 🙂
Not sure what the suggestion is here, sorry! |
OK, how about
|
The environment that I used to look at the distribution I sent you has pygments 2.6.1 & docutils 0.16. |
Hmm, it appears that IPython installs its own lexers: Running |
twine check dist/*
I figured out why my package failed on PyPI but not when I ran My package requires Jupyter, which installs it's own lexer, apparently. If I run twine from the same environment that I build my distribution from, twine will pass my rst files. But if I run twine from a bare environment that hasn't installed my package, then twine will fail my distribution. This will reproduce the issue::
So, sure enough, I had updated my README.rst file from the last functioning version, to show code examples that look like they were run in Jupyter notebooks:
|
Took a look at this today, and it appears that passing Using I'm going to assume this was fixed sometime in the past two years and recommend closure. |
Closing for now but happy to revisit if this is still reproducible. |
Thank you for looking into this! |
In previous versions, this example would error, but now emits a code block. If the end user includes a syntax that Pygments does not implement yet, or makes a mistake, the resulting HTML will be valid and succeed, but may not be as pretty as other code blocks. Resolves: pypa#116 Refs: pypa#168 Signed-off-by: Mike Fiedler <miketheman@gmail.com>
In previous versions, this example would error, but now emits a code block. If the end user includes a syntax that Pygments does not implement yet, or makes a mistake, the resulting HTML will be valid and succeed, but may not be as pretty as other code blocks. Resolves: pypa#116 Refs: pypa#168 Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Describe the bug
PyPI returned an error, "400 The description failed to render for 'text/x-rst'."
Yet my package passes
twine check dist/*
Expected behavior
In the past, my README.rst file uploaded just fine. You can see it here https://pypi.org/project/HydroFunctions/
To Reproduce
The package I am trying to upload is located in https://github.com/mroberge/hydrofunctions
python setup.py sdist bdist_wheel
This produces "hydrofunctions-0.2.2.tar.gz" and "hydrofunctions-0.2.0-py3-none-any-whl".
Everything seems fine and has passed so far.
HTTPError: 400 Client Error: The description failed to render for 'text/x-rst'.
full error below.Things I've Tried
long_description_content_type="text/x-rst",
AND leaving it out to rely on the default (same results)git checkout SHA
.My final solution, which worked, was to create a simplified readme file, 'pypi_readme.rst' for upload as my
long_description
.Somehow my .rst works for Sphinx, readthedocs, github, and ninjs.org, but not on PyPI.
My Platform
twine version: 3.1.1
wheel version: 0.34.2
setuptools version: 47.3.0
Python version: 3.7.1
Windows 10
Similar Issues
Additional context
Full Error message:
The text was updated successfully, but these errors were encountered: