Closed RobertBlackhart closed 3 years ago
Thanks for the report. See #482.
I'll do a point release after #482 goes in.
2021.2.1 pushed and released.
Thanks for the quick turn around. I think there's a problem with the fix though. I see the change was applied to the test_requires
section of setup.py
. But that won't cause pip, for example, to pull in the dataclasses package when using pip install pudb
. Here's an example:
~/$ python3.6 -m venv test_pudb
~/$ source test_pudb/bin/activate
(test_pudb) ~/$ python -m pip install --no-cache-dir pudb
Looking in indexes: http://<internal_company_pypi_proxy>/artifactory/api/pypi/python-package-index/simple
Looking in links: http://<internal_company_pypi_proxy>
Collecting pudb
Downloading https://<internal_company_pypi_proxy>/packages/packages/32/4b/f2ef01854dac1f7ef9b62f1c61e9aa95f4de7465593d3204fb672bb175a9/pudb-2021.2.1.tar.gz (216kB)
100% |████████████████████████████████| 225kB 24.2MB/s
Collecting urwid>=1.1.1 (from pudb)
Downloading https://<internal_company_pypi_proxy>/packages/packages/94/3f/e3010f4a11c08a5690540f7ebd0b0d251cc8a456895b7e49be201f73540c/urwid-2.1.2.tar.gz (634kB)
100% |████████████████████████████████| 634kB 40.2MB/s
Collecting pygments>=2.7.4 (from pudb)
Downloading https://<internal_company_pypi_proxy>/packages/packages/78/c8/8d9be2f72d8f465461f22b5f199c04f7ada933add4dae6e2468133c17471/Pygments-2.10.0-py3-none-any.whl (1.0MB)
100% |████████████████████████████████| 1.0MB 37.0MB/s
Collecting jedi<1,>=0.18 (from pudb)
Downloading https://<internal_company_pypi_proxy>/packages/packages/f9/36/7aa67ae2663025b49e8426ead0bad983fee1b73f472536e9790655da0277/jedi-0.18.0-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 38.5MB/s
Collecting urwid_readline (from pudb)
Downloading https://<internal_company_pypi_proxy>/packages/packages/ab/bb/c5b3fec22268d97ad30232f5533d4a5939d4df7ed3917a8d20d447f1d0a7/urwid_readline-0.13.tar.gz
Installing build dependencies ... done
Collecting parso<0.9.0,>=0.8.0 (from jedi<1,>=0.18->pudb)
Downloading https://<internal_company_pypi_proxy>/packages/packages/a9/c4/d5476373088c120ffed82f34c74b266ccae31a68d665b837354d4d8dc8be/parso-0.8.2-py2.py3-none-any.whl (94kB)
100% |████████████████████████████████| 102kB 30.4MB/s
Installing collected packages: urwid, pygments, parso, jedi, urwid-readline, pudb
Running setup.py install for urwid ... done
Running setup.py install for urwid-readline ... done
Running setup.py install for pudb ... done
Successfully installed jedi-0.18.0 parso-0.8.2 pudb-2021.2.1 pygments-2.10.0 urwid-2.1.2 urwid-readline-0.13
(test_pudb) ~/$ cat test.py
print("hello, world!")
(test_pudb) ~/$ python -m pudb test.py
Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/u/mcdermor/test_pudb/lib64/python3.6/site-packages/pudb/__main__.py", line 29, in <module>
main()
File "/u/mcdermor/test_pudb/lib64/python3.6/site-packages/pudb/run.py", line 54, in main
runscript(mainpyfile, **options_kwargs)
File "/u/mcdermor/test_pudb/lib64/python3.6/site-packages/pudb/__init__.py", line 112, in runscript
dbg = _get_debugger(steal_output=steal_output)
File "/u/mcdermor/test_pudb/lib64/python3.6/site-packages/pudb/__init__.py", line 88, in _get_debugger
dbg = Debugger(**kwargs)
File "/u/mcdermor/test_pudb/lib64/python3.6/site-packages/pudb/debugger.py", line 188, in __init__
self.ui = DebuggerUI(self, stdin=stdin, stdout=stdout, term_size=term_size)
File "/u/mcdermor/test_pudb/lib64/python3.6/site-packages/pudb/debugger.py", line 2112, in __init__
self.setup_palette(self.screen)
File "/u/mcdermor/test_pudb/lib64/python3.6/site-packages/pudb/debugger.py", line 2260, in setup_palette
from pudb.theme import get_palette
File "/u/mcdermor/test_pudb/lib64/python3.6/site-packages/pudb/theme.py", line 26, in <module>
from dataclasses import dataclass, astuple, replace
ModuleNotFoundError: No module named 'dataclasses'
(test_pudb) ~/$
I think an additional change needs to be made to the install_requires
section of setup.py to have pip pull in dataclasses automatically for this operation.
Oh! This is my mistake, I forgot to consider when support for dataclasses
was added. Thank you for catching that!
Thanks for the quick turn around. I can confirm that it does now all work as expected with version 2021.2.2 under Python 3.6.
I just downloaded the newest version of PuDB from PyPI and was attempting to run it in a Python 3.6 environment. I found that it now tries to import from
dataclasses
which is a 3.7+ module. The PyPI page still claims support for Python 3.6 though. Should the page now be updated?