-
Notifications
You must be signed in to change notification settings - Fork 318
Can't use twine unless it is on PATH #32
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
Comments
Hm, I don't think twine would have ever worked like that, it uses git style dispatching to sub commands. You can just do |
Out of curiosity, why git-style many-programs distpatch instead of argparse subparsers? |
At the time I had this idea that twine would turn into this cool little utility for doing all sorts of packaging things and that people would want to make their own twine plugins. So I used the git-style dispatch to make that easier. Turns out that was probably a dumb idea in general and I don't see it getting more than maybe one other command for register. |
:‑) I like the idea of separate tools: distutils to build stuff, distutils and wheel to create distributions, tox to test them, twine to upload, pip to download and install. |
tbh I've been thinking of moving twine into pip heh, Feels like it'd be easier to just do |
distutils register and upload are not going away though, and I have bugs to fix and things to add to them. It may be better to avoid too many ways to do the same thing. Vaguely related: I wonder if upload_docs should be added to distutils. |
distutils register/upload need to be strongly discouraged if not outright removed/broken. There is a massive corpus of them out there that don't even use HTTPS even without validation, they are dangerous. |
Well it’s as bad as any other security bug in Python / stdlib. It’s handled the same way: bug reports, patches, new releases. |
No, it's worse because of the nature of it.
|
@merwok - I wish PSF took security issues more seriously and paid bonuses to people who discover the stuff (or at least crediting them) - http://bugs.python.org/issue12226 I like |
PSF is not responsible for Python development. |
@merwok then why it owns it? |
PSF owns the legal right as a representative of the authors and users of Python, but it does not decide on development matters. |
I tried out twine because I saw @dstufft recommending its use, but it's completely broken when used outside of the path (even just On a side-note my https://github.com/mmerickel/subparse package supports adding subcommands via entry points instead of path-based dispatch and just uses argparse. |
Seems like this commit is guilty c2b43ce. While I'd avoid complications at all and just list all files in |
If I wrote a PR to use argparse or something to handle the argument dispatch so that executing twine didn't require a specific $PATH would it be accepted? Or would you rather see the work go towards making |
I would accept a PR to use argparse, I think it's safe to say the git style thing failed for twine. I've been waiting on a chance to define an "upload 2.0" API before I created a |
@dstufft OK, I'll see if I can free up some time to get you a PR. |
Alternatively, we could use entry-points to keep the extensibility of the tool while fixing this use-case. Thoughts? If there are no objections, I'll tag this for 1.4 and try to work on it this week if no one beats me to it. |
I'm perfectly happy with entry-points as well. |
Fine by me and I won't be you to it, @sigmavirus24 =) |
I execute Twine from an unactivated virtualenv (or at least I used to until this change occurred). Probably no explicit reason to change and I can just change my habit, but thought I should put it here in case anyone else has issues.
The text was updated successfully, but these errors were encountered: