summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.rst6
-rw-r--r--setuptools/command/upload.py4
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 = (