Issue32206
Created on 2017-12-03 13:36 by mariocj89, last changed 2018-02-02 05:16 by mariocj89. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 4752 | merged | mariocj89, 2017-12-07 20:25 | |
| PR 5111 | merged | mariocj89, 2018-01-06 10:35 | |
| PR 5474 | merged | mariocj89, 2018-02-02 05:16 | |
| PR 5474 | merged | mariocj89, 2018-02-02 05:16 | |
| Messages (10) | |||
|---|---|---|---|
| msg307513 - (view) | Author: Mario Corchero (mariocj89) * | Date: 2017-12-03 13:36 | |
Since PEP 338 we can run python modules as a script via `python -m module_name` but there is no way to run pdb on those (AFAIK). The proposal is to add a new argument "-m" to the pdb module to allow users to run `python -m pdb -m my_module_name` This is especially useful when working on cli tools that use entrypoints in setup.py, as there is no other way to run them. I have a WIP here: https://github.com/mariocj89/cpython/commit/f47d1b779333657d7d87b21db841d5d3ad6cfa5c Haven't sent the PR as I am still polishing some issues. If it sounds like a good idea I'll clean it up and open the PR. |
|||
| msg309493 - (view) | Author: Nick Coghlan (ncoghlan) * | Date: 2018-01-05 07:44 | |
Linking back to the overall RFE for improved executable module support for standard library modules that run other scripts: https://bugs.python.org/issue9325 |
|||
| msg309540 - (view) | Author: Nick Coghlan (ncoghlan) * | Date: 2018-01-06 07:53 | |
New changeset 9f1e5f1b7f074e026843a5d70834233a95a6bf9d by Nick Coghlan (Mario Corchero) in branch 'master': bpo-32206: Pdb can now run modules (GH-4752) https://github.com/python/cpython/commit/9f1e5f1b7f074e026843a5d70834233a95a6bf9d |
|||
| msg309541 - (view) | Author: Nick Coghlan (ncoghlan) * | Date: 2018-01-06 07:55 | |
Thanks for the patch! |
|||
| msg309548 - (view) | Author: Nick Coghlan (ncoghlan) * | Date: 2018-01-06 14:57 | |
Re-opening for the CLI help updates. |
|||
| msg310780 - (view) | Author: Jason R. Coombs (jaraco) * | Date: 2018-01-26 18:10 | |
Thanks for creating this functionality. I'm so excited to use it that I've published a backport [https://pypi.org/project/backports.pdb], which seems to work for at least the basic use cases on Python 2.7+. |
|||
| msg310882 - (view) | Author: Jason R. Coombs (jaraco) * | Date: 2018-01-27 19:34 | |
Adopting the backport, I believe I've found a defect. I filed the defect with the backport as [backports.pdb 1](https://github.com/jaraco/backports.pdb/issues/1). Essentially, the issue is that `__package__` gets set to the module name instead of the package name, causing issues with `from .mod` imports. Feel free to take the relevant parts of the fix in the backport to adjust the implementation here, and definitely let me know if you think the adjustment I've made is somehow incorrect. Full disclosure, I have not tested the canonical implementation in Python 3.7, only the backport in Python 3.6 and 2.7. Please let me know if you would like me to file a separate issue. |
|||
| msg310883 - (view) | Author: Mario Corchero (mariocj89) * | Date: 2018-01-27 19:38 | |
Hi Jason, thanks a lot! I’ll have a look to the bug you reported on Monday. Out for holidays atm ^^ |
|||
| msg310916 - (view) | Author: Nick Coghlan (ncoghlan) * | Date: 2018-01-28 04:58 | |
New changeset fcf8b4c1022bc2d2f84dcef5d72eabf40a25ea19 by Nick Coghlan (Mario Corchero) in branch 'master': bpo-32206: Update pdb usage to include new module option (GH-5111) https://github.com/python/cpython/commit/fcf8b4c1022bc2d2f84dcef5d72eabf40a25ea19 |
|||
| msg310918 - (view) | Author: Nick Coghlan (ncoghlan) * | Date: 2018-01-28 05:07 | |
I checked the original PR, and I'm pretty sure the reference implementation is going to have the same bug. To keep the NEWS entries clear (since the buggy implementation already shipped in the alpha releases), I've created a new issue here: https://bugs.python.org/issue32691 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-02-02 05:16:57 | mariocj89 | set | pull_requests: + pull_request5322 |
| 2018-02-02 05:16:57 | mariocj89 | set | pull_requests: + pull_request5321 |
| 2018-02-01 16:25:25 | mariocj89 | set | pull_requests: - pull_request5301 |
| 2018-02-01 15:58:04 | mariocj89 | set | pull_requests: + pull_request5301 |
| 2018-01-28 05:07:16 | ncoghlan | set | status: open -> closed resolution: fixed messages: + msg310918 stage: needs patch -> resolved |
| 2018-01-28 04:58:50 | ncoghlan | set | messages: + msg310916 |
| 2018-01-27 19:38:22 | mariocj89 | set | messages: + msg310883 |
| 2018-01-27 19:34:36 | jaraco | set | messages: + msg310882 |
| 2018-01-26 18:10:03 | jaraco | set | messages: + msg310780 |
| 2018-01-26 16:33:32 | jaraco | set | nosy:
+ jaraco |
| 2018-01-06 14:57:09 | ncoghlan | set | status: closed -> open resolution: fixed -> (no value) messages: + msg309548 stage: resolved -> needs patch |
| 2018-01-06 10:35:22 | mariocj89 | set | pull_requests: + pull_request4978 |
| 2018-01-06 07:55:20 | ncoghlan | set | status: open -> closed type: enhancement messages: + msg309541 resolution: fixed |
| 2018-01-06 07:53:09 | ncoghlan | set | messages: + msg309540 |
| 2018-01-05 07:44:21 | ncoghlan | set | nosy:
+ ncoghlan messages: + msg309493 |
| 2018-01-05 07:34:30 | ncoghlan | link | issue9325 dependencies |
| 2017-12-07 20:25:10 | mariocj89 | set | keywords:
+ patch stage: patch review pull_requests: + pull_request4654 |
| 2017-12-03 17:20:13 | ericvw | set | nosy:
+ ericvw |
| 2017-12-03 13:36:40 | mariocj89 | create | |