Skip to content
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

Crash on password prompt since version 1.42.0.2 #2006

Closed
willbelr opened this issue Feb 25, 2020 · 1 comment
Closed

Crash on password prompt since version 1.42.0.2 #2006

willbelr opened this issue Feb 25, 2020 · 1 comment

Comments

@willbelr
Copy link

willbelr commented Feb 25, 2020

On upload, setuptools crash instead of asking for a password. Downgrading to 1.41.6.0-1 fix this issue.

~/.pypirc

[distutils]
index-servers =
    pypi

[pypi]
username: myusername

python-setuptools 1.41.6.0-1 (expected behavior)

> python setup.py sdist upload -r pypi
...
running upload
Password: _

python-setuptools 1.42.0.2-1 to 1.45.2.0-1

> python setup.py sdist upload -r pypi
...
running upload
Traceback (most recent call last):
  File "setup.py", line 130, in <module>
    setup()
  File "setup.py", line 111, in setup
    setuptools.setup(
  File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.8/distutils/command/upload.py", line 64, in run
    self.upload_file(command, pyversion, filename)
  File "/usr/lib/python3.8/distutils/command/upload.py", line 133, in upload_file
    user_pass = (self.username + ":" + self.password).encode('ascii')
TypeError: can only concatenate str (not "NoneType") to str

Environment:

Linux peppy 5.4.20-1-lts #1 SMP Sat, 15 Feb 2020 00:19:19 +0000 x86_64 GNU/Linux
python 3.8.1-4
@pganssle
Copy link
Member

@willbelr This is probably for the best, setup.py upload was deprecated about 2 years ago because it's very dangerous to use (both for you and for PyPI), and actively removed in the latest version of setuptools.

You should use twine instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants