-
Notifications
You must be signed in to change notification settings - Fork 134
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
Traceback exposed if upload fails #558
Comments
In that case, the traceback clearly isn't helpful - there's a problem with the package we're uploading, not the uploader code. I'm wary of hiding tracebacks in general, though, because they can be useful to understand what's going on. Some possible ways to address that:
|
P.S. Sorry this one went unanswered for so long |
Thank you, @takluyver for answering and for sharing this clear analysis. I really appreciate your comments: they are very insightful. I would be in favour of not doing a very clever checking. I don't see a practical way to address your point 1. My winner is point 2: if flit is doing things right and the hosting is legitimately answering "No, you can't do that", I think this is a case that should be properly addressed by flit. Simply preventing the exception to propagate and printing an error similar to what's displayed in the last line should be enough (maybe adding some more generic explanation). What do you think? Should I do a PR? |
I think that's reasonable, yeah. What we do for other scenarios like this is that the main CLI code catches a group of errors where we just want to display the message, not the traceback - e.g. here it is for Lines 178 to 182 in f5704ea
So I would define a new exception like |
I like it. It makes sense. |
Hello,
I got a traceback in flit while trying to publish a package:
the problem is that PyPI rejects it (seems to be related to their policy, see #555).
However my question is: is the display of the traceback a feature, or a bug? Should I make a PR?
The text was updated successfully, but these errors were encountered: