[Python-modules-team] Bug#886673: python3-args: Module unusable when len(sys.argv) > 0
Christoph Groth
christoph at grothesque.org
Mon Jan 8 20:40:27 UTC 2018
Package: python3-args
Version: 0.1.0-2
Severity: important
Dear Maintainer,
The 'args' module that is provided by this package is unusable when any
command line argument is present in Python's 'sys.args':
$ python3 -c 'import args' foo
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/args.py", line 394, in <module>
flags = args.flags
File "/usr/lib/python3/dist-packages/args.py", line 328, in flags
return self.start_with('-')
File "/usr/lib/python3/dist-packages/args.py", line 192, in start_with
if _is_collection(x):
File "/usr/lib/python3/dist-packages/args.py", line 37, in _is_collection
if isinstance(obj, basestring):
NameError: name 'basestring' is not defined
Ironically, python3-args runs with Python 2, but not with Python 3,
because the builtin 'basestring' is no longer present in Python 3. This
issue has been fixed upstream in commit 1c8eec3a0fb37.
I rated this issue as "important" since it breaks the Python
documentation builder "Sphinx". Sphinx' autosummary extension tries to
import the "args" module if present (at least that's the case for the
project that I work on), and this bug causes the documentation building
to fail. Since the Debian package twine depends on Sphinx, I can either
use Sphinx or Twine, but not both.
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.14.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_DK.utf8, LC_CTYPE=en_DK.utf8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages python3-args depends on:
ii python3 3.6.4-1
python3-args recommends no packages.
python3-args suggests no packages.
-- no debconf information
More information about the Python-modules-team
mailing list