diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-02-23 16:40:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-23 16:40:30 -0500 |
commit | 776bf48ad86c29e5b2ae8184a0c47fb25e542cc7 (patch) | |
tree | 6dfa2e121cf70aca7b84cd9db79b9b0034d29a4b | |
parent | 5c80844b0291ef2b326bcf8cf79e9a69dbd01a6b (diff) | |
parent | d2adf3daa1206b9950b5185fb0a56b6ea84658e3 (diff) | |
download | python-setuptools-git-776bf48ad86c29e5b2ae8184a0c47fb25e542cc7.tar.gz |
Merge pull request #961 from pypa/feature/upload-infer-username
In upload, infer the username using getpass.getuser()
-rw-r--r-- | CHANGES.rst | 6 | ||||
-rw-r--r-- | setuptools/command/upload.py | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 16fcbcc7..0e47fe06 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v34.3.0 +------- + +* #941: In the upload command, if the username is blank, + default to ``getpass.getuser()``. + v34.2.0 ------- diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 484baa5a..a44173a9 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -10,6 +10,10 @@ class upload(orig.upload): def finalize_options(self): orig.upload.finalize_options(self) + self.username = ( + self.username or + getpass.getuser() + ) # Attempt to obtain password. Short circuit evaluation at the first # sign of success. self.password = ( |