[issue42521] Debug (-d) mode not working in 3.9

2020-12-02 Thread miss-islington


miss-islington  added the comment:


New changeset 9b34f34aa929941576a69a6f7de77f1fb0b96ed6 by Miss Islington (bot) 
in branch '3.9':
bpo-42521: Add note about 'Python -d' only working on debug builds (GH-23607)
https://github.com/python/cpython/commit/9b34f34aa929941576a69a6f7de77f1fb0b96ed6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42521] Debug (-d) mode not working in 3.9

2020-12-02 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42521] Debug (-d) mode not working in 3.9

2020-12-02 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +22483
pull_request: https://github.com/python/cpython/pull/23615

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42521] Debug (-d) mode not working in 3.9

2020-12-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 99b594404d364b363c184f48338d6ee81bee26dd by Pablo Galindo in 
branch 'master':
bpo-42521: Add note about 'Python -d' only working on debug builds (GH-23607)
https://github.com/python/cpython/commit/99b594404d364b363c184f48338d6ee81bee26dd


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +22475
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23607

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread STINNER Victor


STINNER Victor  added the comment:

> thanks, it would be great if this were documented in the --help section like 
> the other options which require a debug build (-X showrefcount)

PyConfig.show_ref_count documentation explains that a debug build is required:

"Need a debug build of Python (Py_REF_DEBUG macro must be defined)."

https://docs.python.org/dev/c-api/init_config.html#c.PyConfig.show_ref_count

By the way, it would be nice to add a link on "debug build" to explain how to 
detect if Python is built in debug mode and how to build Python in debug mode.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread STINNER Victor


STINNER Victor  added the comment:

In PyConfig, I chose to name the option "parser_debug" rather than the very 
generic "debug" name :-)

"""
Parser debug mode. If greater than 0, turn on parser debugging output (for 
expert only, depending on compilation options).

Incremented by the -d command line option. Set to the PYTHONDEBUG environment 
variable value.
"""

https://docs.python.org/dev/c-api/init_config.html#c.PyConfig.parser_debug

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread anthony shaw


anthony shaw  added the comment:

thanks, it would be great if this were documented in the --help section like 
the other options which require a debug build (-X showrefcount)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Also, note the -d flag activates the debug mode **in the parser**, not in the 
tokenizer.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I cannot reproduce it either in 3.9. Building 3.9 in debug mode and using -d 
works as expected

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Hi Anthony,

could it be that your 3.9 is not a debug build, while the others are? We only 
enable parser debug ouput when Python has been build --with-pydebug.

Building the 3.9.0 tag --with-pydebug works fine for me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread anthony shaw


New submission from anthony shaw :

I noticed since the new parser implementation, the debug mode in the tokeniser 
is no longer working.

This is the case for 3.9.0 and also 3.9.1rc1. Running python3.9 with a simple 
application like this:

 # Demo application
 def my_function():
   proceed

Does not output anything

> python3.9 -d ~/PycharmProjects/cpython-book-samples/13/test_tokens.py

> 
Produces no output

Whereas python3.10 (the latest alpha) outputs the expected results

--
messages: 382236
nosy: anthony shaw, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Debug (-d) mode not working in 3.9
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com