-
Notifications
You must be signed in to change notification settings - Fork 308
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
Twine not properly uploading long_description #262
Comments
The issue is a common one: You are specifying the license text here which breaks rendering. That is now how you're supposed to specify the license. It should be a single line, e.g., |
Huh. That's odd for a few reasons:
|
Twine uploads what the (sdist/wheel)s given. The warning would be generated if you used
This is PyPI behaviour. I don't fully understand it.
Again, unclear as the behaviour is primarily PyPI's. It could be the way the tools order the fields. I really haven't bothered to look into it since it's not the correct usage of the field.
That custom licensing should be included in the long description.
A thing worked once upon a time but is no longer the correct way of doing things. The official documentation and sample project demonstrate the appropriate usage of the field. |
Okay. For the record, there aren't any warnings generated:
|
My mistake then. I thought that caught this. |
Why is this closed when the problem hasn't been addressed? Twine should not be the recommended tool if it cannot upload long_descriptions. After several hours of debugging, I also had to resort to using |
I also don't have a custom license. |
In my case, only the first line of my long_description was uploaded. If the long_description started with a blank first line, I would get the error This happened with test.pypi.org, pypi.org, and pypi.python.org. |
Twine can and does upload long_descriptions. You seem to have a separate bug which deserves its own issue. |
I'm having trouble isolating the bug to create a minimum example, but the version of my library on test.pypi.org is the same as the one on pypi.org with the only difference being how it was uploaded ( |
@sixpearls Thanks for reporting the issue. Could you try using Twine 1.9.1 to (I also want to check the slim possibility that Warehouse was messing things up but has fixed the bug somewhere in the past ~6 months.) |
@brainwane I've encountered the same problem as @sixpearls and stumbled upon this article in search for solution.
|
@tmirzoev Can you give us the exact output of |
Sorry, @brainwane / others: I've been swamped at school. Next time I release a version (of any project) I'll circle back to help debug if it hasn't been addressed yet. At any rate, I think this issue (or one attempting to address this bug) should remain open since this is clearly a problem. |
It is not clearly an issue @sixpearls. No one has given us the information to determine clearly whether it's a real issue or one of an outdated version. |
Thanks, I will stick with using |
@sixpearls, hey, I hope you try Twine again (the current release is 1.11.0) and let us know if you're running into the same problem so we can fix it. @sigmavirus24 is right that we don't yet know enough about the bug to know where it's coming from, but clearly you are experiencing a problem, and the more we know, the more reliably we can reproduce and track it down. |
twine version 1.11.0 (pkginfo: 1.4.2, requests: 2.12.4, setuptools: 39.0.1, requests-toolbelt: 0.8.0, tqdm: 4.20.0) I've simply checked the readme.rst for errors
built dist with
and then uploaded it with
There was no errors output on any of the steps, but long_description didn't make its way to the package page. |
What version of 'wheel' is installed? |
wheel 0.31.0 |
There's a new version of readme_renderer in case you'd like to try with that. |
That's enough info to re-open this in my opinion (it's reported against reasonably recently released versions since we thought we'd fixed this). |
Confirm similar problem happens for my project as well (uploads fine with setup.py upload, but bad with twine): Previous attempts:
Previous attempts of tweaking the license tag:
All ended the same way (uploaded successfully, without any warning, but showing raw text and tags instead of proper html) Please let me know what if any more info is required to debug this. |
|
@di could you take a look at this? |
The problem can be seen here in the
Specifically the extra newline is causing Twine to (correctly) interpret everything after this as the message body, which becomes the long description. Distutils doesn't support the message-body-as-long-description feature yet (I believe) so it's probably just ignoring this extra empty line. It's not clear to me where in the It's also possible this bug has already been fixed, the wheel in question was built with |
wheel 0.31.1 still generates that empty line (did not try uploading yet - just rebuilt the wheel and checked)... re: tracking the issue into wheel package: How should we proceed with this (fwd the issue to wheel/setuptools? further debugging? ideas on how to make twine/other tool/ detect and warn about such issues?) |
hmm I think I got it: there's a newline at the end of the short description ( Is newline allowed within the description field? If yes, something (wheel? setuptools? twine?) should take measures to avoid this issue. If not, we can check for it and fail/warn. |
I don't think it should have newlines in the description field. That's not something twine can warn about until we start building things for you. We might be able to warn after the fact but this is probably also something @jaraco might consider for setuptools |
Agreed - any build tool, including Setuptools, should validate all metadata fields. See pypa/setuptools#1390 where that work is happening. |
I'm not totally sure, but I think we could close this issue in favor of pypa/setuptools#1390 (as a duplicate). If setuptools generates the related metadata that's where the validation should go. There's no need to duplicate the efforts, is it? |
I agree, this can be closed as a duplicate of pypa/setuptools#1390 |
Closing as a duplicate of pypa/setuptools#1390. |
I've been trying to upload a package with twine, and no matter what I do, I can't get the
long_description
to render. I'm left with the genericThe author of this package has not provided a project description.
. There is no error message during the twine upload process.However, if I upload the package via
python setup.py sdist upload
, thelong_description
renders just fine, as you can see here.Does anyone have any idea what's going on?
Code is here.
The text was updated successfully, but these errors were encountered: