Closed vLabayen closed 3 months ago
get_repository_from_config, port
Linux
No response
Python 3.8.10 Python 3.11.9
$ pip install twine
twine version 5.1.0 (importlib-metadata: 7.1.0, keyring: 25.2.1, pkginfo: 1.10.0, requests: 2.31.0, requests-toolbelt: 1.0.0, urllib3: 2.2.1)
A private one hosted with https://pypi.org/project/pypiserver/, behind an apache server enforcing basicauth.
There is a bug that must have been introduced in 5.1.0 in the repository url parsing. Concretely, the function get_repository_from_config looses the port information when a username is provided.
get_repository_from_config
The expected behaviour:
>> get_repository_from_config(..., ..., 'https://user:pass@some.domain.com:12345') {'repository': 'https://some.domain.com:12345', 'username': 'user', 'password': 'pass'}
The current behaviour:
>> get_repository_from_config(..., ..., 'https://user:pass@some.domain.com:12345') {'repository': 'https://some.domain.com', 'username': 'user', 'password': 'pass'}
Just test the given examples
Is there an existing issue for this?
What keywords did you use to search existing issues?
get_repository_from_config, port
What operating system are you using?
Linux
If you selected 'Other', describe your Operating System here
No response
What version of Python are you running?
How did you install twine? Did you use your operating system's package manager or pip or something else?
What version of twine do you have installed (include the complete output)
Which package repository are you using?
A private one hosted with https://pypi.org/project/pypiserver/, behind an apache server enforcing basicauth.
Please describe the issue that you are experiencing
There is a bug that must have been introduced in 5.1.0 in the repository url parsing. Concretely, the function
get_repository_from_config
looses the port information when a username is provided.The expected behaviour:
The current behaviour:
Please list the steps required to reproduce this behaviour
Just test the given examples
Anything else you'd like to mention?
No response