[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Erik Cederstrand


New submission from Erik Cederstrand :

When I have a normal syntax error in a file, Python reports the filename in the 
exception output:

$ cat syntax_error.py 
0x=5

$ python3.8 syntax_error.py 
  File "syntax_error.py", line 1
0x=5
 ^
SyntaxError: invalid hexadecimal literal


But if the syntax error is inside an f-string, Python reports 'File 
""' instead of the actual filename in the exception output.

$ cat syntax_error_in_fstring.py 
f'This is a syntax error: {0x=5}'

$ python3.8 syntax_error_in_fstring.py 
  File "", line 1
SyntaxError: invalid hexadecimal literal

--
messages: 35
nosy: Erik Cederstrand
priority: normal
severity: normal
status: open
title: Output of syntax error in f-string contains wrong filename
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-04 Thread Martin Liška

New submission from Martin Liška :

The test-case is stuck after update to GCC 10.
I've got a patch for that.

--
messages: 357778
nosy: Martin Liška
priority: normal
severity: normal
status: open
title: test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck 
with GCC10

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-04 Thread Martin Liška

Change by Martin Liška :


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

___
Python tracker 

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



[issue38966] List similarity relationship

2019-12-04 Thread Pranav Pandya


New submission from Pranav Pandya :

When list is initialized and equated to give the same value as list1=list2=[],

then post initialization list1 & list2 are taken as same values and any changes 
in list2 are changed in list 1 and so on. 

Thus during initialization if lists are equated, they are taken as same values 
even if one is changed

--
assignee: terry.reedy
components: IDLE
messages: 357779
nosy: PranavSP, terry.reedy
priority: normal
severity: normal
status: open
title: List similarity relationship
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Erik Cederstrand


Erik Cederstrand  added the comment:

Additionally, the output in the 2nd example does not contain the helpful text 
printing the context and location of the code containing the syntax error.

--

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eric.smith

___
Python tracker 

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



[issue38966] List similarity relationship

2019-12-04 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This is same as doing the below with list1 getting a reference of list2. 
Assignments in Python don't copy the value but make a reference. This is not an 
issue specific to IDLE as tagged and has the same behaviour under a normal REPL.

https://docs.python.org/3/reference/expressions.html#evaluation-order

>>> list2 = []
>>> list1 = list2
>>> id(list2)
4487803136
>>> id(list1)
4487803136

--
nosy: +xtreak

___
Python tracker 

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



[issue38967] Improve error message in enum.py for python 3.5

2019-12-04 Thread Rubén Jesús García Hernández

Change by Rubén Jesús García Hernández :


--
type:  -> enhancement

___
Python tracker 

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



[issue38967] Improve error message in enum.py for python 3.5

2019-12-04 Thread Rubén Jesús García Hernández

New submission from Rubén Jesús García Hernández 
:

I changed the '_names_ are reserved for future Enum use' line to be more 
user-friendly thus:
'Names surrounded by underscore (such as "%s") are reserved for future Enum 
use' % key

The current message can be interpreted as the literal string _names_; and 
showing the offending key can help users debug.

--
assignee: docs@python
components: Documentation
files: enum.diff.txt
messages: 357782
nosy: Rubén Jesús García Hernández, docs@python
priority: normal
severity: normal
status: open
title: Improve error message in enum.py for python 3.5
versions: Python 3.5
Added file: https://bugs.python.org/file48754/enum.diff.txt

___
Python tracker 

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



[issue38967] Improve error message in enum for member name surrounded by underscore.

2019-12-04 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Error message changes in code are normally not backported to older versions so 
I have changed the subject accordingly and tagged 3.9. Thanks.

--
assignee: docs@python -> 
components: +Library (Lib) -Documentation
nosy: +xtreak
title: Improve error message in enum.py for python 3.5 -> Improve error message 
in enum for member name surrounded by underscore.
versions: +Python 3.9 -Python 3.5

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
components: +Tests
nosy: +vstinner
type:  -> behavior

___
Python tracker 

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



[issue38962] Reference leaks in subinterpreters

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 24f5cac7254177a4c9956d680c0a9b6dadd85c6f by Victor Stinner (Pablo 
Galindo) in branch 'master':
bpo-38962: Fix reference leak in test_httpservers (GH-17454)
https://github.com/python/cpython/commit/24f5cac7254177a4c9956d680c0a9b6dadd85c6f


--

___
Python tracker 

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



[issue38863] Improve is_cgi() in http.server

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:

The change introduced a reference leak, see bpo-38962. Pablo fixed it:

commit 24f5cac7254177a4c9956d680c0a9b6dadd85c6f (HEAD -> master, 
upstream/master)
Author: Pablo Galindo 
Date:   Wed Dec 4 09:29:10 2019 +

bpo-38962: Fix reference leak in test_httpservers (GH-17454)

--
nosy: +vstinner

___
Python tracker 

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



[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 808769f3a4cbdc47cf1a5708dd61b1787bb192d4 by Inada Naoki in branch 
'master':
bpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460)
https://github.com/python/cpython/commit/808769f3a4cbdc47cf1a5708dd61b1787bb192d4


--
nosy: +inada.naoki

___
Python tracker 

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



[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16943
pull_request: https://github.com/python/cpython/pull/17464

___
Python tracker 

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



[issue38863] Improve is_cgi() in http.server

2019-12-04 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks, Pablo!

--

___
Python tracker 

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



[issue38962] Reference leaks in subinterpreters

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:

"""
5 tests failed again:
test__xxsubinterpreters test_atexit test_capi test_httpservers
test_threading
"""

I merged Pablo's fix for test_httpservers.

With PR 17457 + PR 17453 (and the test_httpservers fix), the 5 tests don't leak 
anymore.

I am fine with PR 17457 and PR 17453, I added some comments.

I would prefer to avoid a revert (PR 17455) if possible ;-)

--

Except of PR 17453 which was my fault in my refactoring work, the problem is 
the work on subinterpreters doesn't introduce regressions but only reveal 
existing issues.

Example with Python compiled in the debug mode (master branch):

$ ./python -X showrefcount -c pass
[18564 refs, 6496 blocks]

Python "leaks" 18564 references at exit.

My work is to better isolate subinterpreters from the main interpreter, and so 
the missing clean up code is revealed by reference leak buildbot checks.

--

___
Python tracker 

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



[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread miss-islington


miss-islington  added the comment:


New changeset a75cad440ab50d823af5f06e51dfed3a319f1e8c by Miss Islington (bot) 
in branch '3.8':
bpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460)
https://github.com/python/cpython/commit/a75cad440ab50d823af5f06e51dfed3a319f1e8c


--
nosy: +miss-islington

___
Python tracker 

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



[issue38863] Improve is_cgi() in http.server

2019-12-04 Thread Siwon Kang


Siwon Kang  added the comment:

Obviously, I should have taken back what I added to cgi_directories. Thank you 
Pablo and Victor!

--

___
Python tracker 

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



[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +16944
pull_request: https://github.com/python/cpython/pull/17465

___
Python tracker 

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



[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset e0f148e6635480521036415bd782c3424fe6c619 by Inada Naoki in branch 
'3.7':
bpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460)
https://github.com/python/cpython/commit/e0f148e6635480521036415bd782c3424fe6c619


--

___
Python tracker 

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



[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread Inada Naoki


Change by Inada Naoki :


--
components: +Library (Lib) -Unicode

___
Python tracker 

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



[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.9

___
Python tracker 

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



[issue38966] List similarity relationship

2019-12-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
assignee: terry.reedy -> 
resolution:  -> not a bug
stage:  -> 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



[issue38815] test_ssl: test_min_max_version() fails on FreeBSD and Fedora

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:

test_ssl still fails on FreeBSD:

==
FAIL: test_min_max_version (test.test_ssl.ContextTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", 
line 1244, in test_min_max_version
self.assertIn(
AssertionError:  not found in {, }

==
FAIL: test_min_max_version_mismatch (test.test_ssl.ThreadedTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", 
line 220, in wrapper
return func(*args, **kw)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", 
line 3846, in test_min_max_version_mismatch
self.assertIn("alert", str(e.exception))
AssertionError: 'alert' not found in '[SSL: NO_PROTOCOLS_AVAILABLE] no 
protocols available (_ssl.c:1108)'

--

___
Python tracker 

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



[issue38962] Reference leaks in subinterpreters

2019-12-04 Thread miss-islington


miss-islington  added the comment:


New changeset b96c6b0723b889d3a0c1740bce7f579f33d246f2 by Miss Islington (bot) 
(Pablo Galindo) in branch 'master':
bpo-38962: Fix reference leak in new_interpreter() (GH-17453)
https://github.com/python/cpython/commit/b96c6b0723b889d3a0c1740bce7f579f33d246f2


--
nosy: +miss-islington

___
Python tracker 

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



[issue38968] int method works improperly

2019-12-04 Thread Riccardo La Marca


Change by Riccardo La Marca :


--
files: Schermata 2019-12-04 alle 12.09.36.png
nosy: Riccardo La Marca
priority: normal
severity: normal
status: open
title: int method works improperly
versions: Python 3.8
Added file: https://bugs.python.org/file48755/Schermata 2019-12-04 alle 
12.09.36.png

___
Python tracker 

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



[issue38815] test_ssl: test_min_max_version() fails on FreeBSD and Fedora

2019-12-04 Thread Kubilay Kocak


Kubilay Kocak  added the comment:

In case it's relevant, I note the following:

The ssl module is built with -I/usr/local/include in the compile line.

Leaving aside:

 - the warts of the build system, and 
 - the lack of specific --with-foo= semantics to allow providing 
well(narrowly)-scoped include/library paths
 - how and whether the default python build using -I/usr/local/include is 
'good' or not ...

it means that the build is finding openssl111 on FreeBSD provided by ports, not 
base (base also includes openssl 1.1.1 @ /usr/include|lib)

More specifically, our openssl111 port happens to have many options that allow 
enabling/disabling various software features, including encryption algorithms 
and protocol versions

The current (installed) build of openssl111 on the buildbot worker that is 
failing, has the following options set/unset:

OPTIONS_FILE_UNSET+=CT
OPTIONS_FILE_UNSET+=MAN3
OPTIONS_FILE_UNSET+=RFC3779
OPTIONS_FILE_SET+=SHARED
OPTIONS_FILE_UNSET+=ZLIB
OPTIONS_FILE_UNSET+=ARIA
OPTIONS_FILE_UNSET+=DES
OPTIONS_FILE_UNSET+=GOST
OPTIONS_FILE_UNSET+=IDEA
OPTIONS_FILE_UNSET+=SM2
OPTIONS_FILE_UNSET+=SM3
OPTIONS_FILE_UNSET+=SM4
OPTIONS_FILE_UNSET+=RC2
OPTIONS_FILE_UNSET+=RC4
OPTIONS_FILE_UNSET+=RC5
OPTIONS_FILE_UNSET+=MD2
OPTIONS_FILE_UNSET+=MD4
OPTIONS_FILE_UNSET+=MDC2
OPTIONS_FILE_UNSET+=RMD160
OPTIONS_FILE_SET+=ASM
OPTIONS_FILE_SET+=SSE2
OPTIONS_FILE_SET+=THREADS
OPTIONS_FILE_SET+=EC
OPTIONS_FILE_SET+=NEXTPROTONEG
OPTIONS_FILE_UNSET+=SCTP
OPTIONS_FILE_UNSET+=SSL3
OPTIONS_FILE_UNSET+=TLS1
OPTIONS_FILE_UNSET+=TLS1_1
OPTIONS_FILE_SET+=TLS1_2

In summary, this build only has TLS 1.2 and TLS 1.3 enabled (but with other 
various things disabled, not the defaults of the upstream openssl build), and 
may be indicated in this test failure, possibly only one example of many other 
similar issues of the same class, something like "tests assume certain features"

Relatedly, this method of disabling various default options in openssl, is how 
a number [1] of issues in the Python cryptography package were found:

https://github.com/pyca/cryptography/issues/5065

* Another issue is a build failure with NPN disabled, yet to be reported

--
nosy: +koobs

___
Python tracker 

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



[issue38968] int method works improperly

2019-12-04 Thread Riccardo La Marca


Change by Riccardo La Marca :


Removed file: https://bugs.python.org/file48755/Schermata 2019-12-04 alle 
12.09.36.png

___
Python tracker 

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



[issue36854] GC operates out of global runtime state.

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:

Victor> I'm not fully happy with this solution

Eric> Should we have an issue open for finding a better solution?  Are there 
risks with what you did that we don't want long-term?

Pablo made a small changes in my workaround, by calling _PyGC_CollectNoFail() 
after PyInterpreterState_Clear().
https://github.com/python/cpython/pull/17457/files

I tried to avoid that, since I consider that no arbitrary Python code should be 
called after PyInterpreterState_Clear(), whereas the GC can trigger arbitrary 
__del__() methods implemented in pure Python. See discussion at 
https://github.com/python/cpython/pull/17457

Each time I tried to fix a bug in the Python finalization, I introduced worse 
bugs :-D

We cannot fix all bugs at once, we have to work incrementally. I like the idea 
of introducing workarounds specific to subinterpreters: leave the code path for 
the main interpreter unchanged. It helps to iterate on the code to slowly fix 
the code.

I prefer to not open an issue, since the Python finalization is broken is so 
many ways :-D Anyway, I'm hitting issues on the finalization each time I'm 
working on subinterpeter changes, so it's hard to forget about it :-)

I started to take notes at:
https://github.com/python/cpython/pull/17457/files

--

___
Python tracker 

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



[issue36854] GC operates out of global runtime state.

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:

Eric:
"""
Thanks so much for getting this done, Victor!
Did I mention that you're my hero? :)
"""

You're welcome. I'm a believer that subinterpreters is one of the most 
realistic solution to make Python faster. I said it in my EuroPython keynote on 
CPython performance ;-)

https://github.com/vstinner/talks/blob/master/2019-EuroPython/python_performance.pdf

"Conclusion: PyHandle, tracing GC and subinterpreters are very promising!"

--

___
Python tracker 

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



[issue38968] int method works improperly

2019-12-04 Thread Riccardo La Marca


Change by Riccardo La Marca :


Added file: https://bugs.python.org/file48756/Code.png

___
Python tracker 

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



[issue38968] int method works improperly

2019-12-04 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Please provide any details. What methods and why do you think they do not work 
properly.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue38968] int method works improperly

2019-12-04 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Hi Riccardo,

In the future, would you mind not posting screenshots of code or errors? 
Rather, copy and paste the text. That makes it easier for others to replicate 
the error, and also allows visually impaired and blind people using screen 
leaders.

Otherwise you force us to retype your code, which can introduce errors.

This is not a bug, it is normal and expected behaviour. You type the number 
"123456789012345678901234567890.76" but floats only have 64 bits of precision, 
so that becomes the float 1.2345678901234568e+29 which is *exactly* the whole 
number 123456789012345677877719597056 just as `int` reports.

So nothing to do with `int`, it is normal behaviour for floats.

--
nosy: +steven.daprano
resolution:  -> not a bug
stage:  -> 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



[issue38968] int method works improperly

2019-12-04 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

You can read more here:

https://docs.python.org/3/tutorial/floatingpoint.html

https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate

--

___
Python tracker 

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



[issue38962] Reference leaks in subinterpreters

2019-12-04 Thread miss-islington


miss-islington  added the comment:


New changeset ac0e1c2694bc199dbd073312145e3c09bee52cc4 by Miss Islington (bot) 
(Pablo Galindo) in branch 'master':
bpo-38962: Fix reference leak in the per-subinterpreter gc (GH-17457)
https://github.com/python/cpython/commit/ac0e1c2694bc199dbd073312145e3c09bee52cc4


--

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Batuhan


Batuhan  added the comment:

This is actually specified behavior in PEP 498
 
https://www.python.org/dev/peps/pep-0498/#expression-evaluation

> Expressions are parsed with the equivalent of ast.parse('(' + expression + 
> ')', '', 'eval')

--
nosy: +BTaskaya

___
Python tracker 

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



[issue31821] pause_reading() doesn't work from connection_made()

2019-12-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue38962] Reference leaks in subinterpreters

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:

The 5 tests don't leak anymore, I close thee issue. Thanks Pablo!

$ ./python -m test -R 3:3 -j0 test__xxsubinterpreters test_atexit test_capi 
test_httpservers test_threading
(...)
Total duration: 1 min 2 sec
Tests result: SUCCESS

--
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



[issue38969] The "int" method doesn't work correctly for long numbers with some decimal places.

2019-12-04 Thread Riccardo La Marca


New submission from Riccardo La Marca :

PyDev console: starting.

Python 3.8.0 (v3.8.0:fa919fdf25, Oct 14 2019, 10:23:27) 
[Clang 6.0 (clang-600.0.57)] on darwin
>>> int(123456789012345678901234567890)
123456789012345678901234567890
>>> int(123456789012345678901234567890.76)
123456789012345677877719597056

--
messages: 357803
nosy: Riccardo La Marca
priority: normal
severity: normal
status: open
title: The "int" method doesn't work correctly for long numbers with some 
decimal places.
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue38969] The "int" method doesn't work correctly for long numbers with some decimal places.

2019-12-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> int method works improperly

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Although Batuhan is correct maybe we can consider trying to improve the 
debugging experience off-strings due to the fact that these errors in a big 
project may be difficult to find. Although you have always the back-trace on 
the other side.

--
nosy: +pablogsal
resolution:  -> fixed
stage:  -> 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



[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

I agree that although the PEP says that's how it behaves, that shouldn't be 
prescriptive of the error message. Clearly we can be more helpful here.

I have a large, elaborate re-write of the error generating code that I've been 
working on, on and off for over a year, which would address this problem. I'm 
not sure when or if I'll finish it. It touches a lot of things, and my branch 
won't merge cleanly any more.

Additionally, the idea of moving f-strings into the Python grammar would also 
fix this problem. That might be a better way forward, although it has a number 
of downsides, too.

--

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Eric V. Smith


Change by Eric V. Smith :


--
assignee:  -> eric.smith
stage: resolved -> 

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Additionally, the idea of moving f-strings into the Python grammar would also 
> fix this problem. That might be a better way forward, although it has a 
> number of downsides, too.

For considerin this path we would need to wait to see first the future of the 
new experiment with the PEG parser to avoid potentially throwing away all the 
work in the parser and the tokenizer. Also, this approach will likely entail 
much more changes than reworking the error reporting code.

--

___
Python tracker 

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



[issue38970] [PDB] NameError in list comprehension in PDB

2019-12-04 Thread castix


New submission from castix :

Related to https://bugs.python.org/issue27316

This code works from the repl:
Python 3.7.4 (default, Oct  4 2019, 06:57:26) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pdb; pdb.set_trace()
--Return--
> (1)()->None
(Pdb) z = True
(Pdb) [x for x in [1,2] if z]
[1, 2]
(Pdb) 

However in my (turbogears2) wsgi application it raises:
(Pdb) z = True
(Pdb) [x for x in [1,2] if z]
*** NameError: name 'z' is not defined
(Pdb) z
True
(Pdb) 

I don't know how to report the issue in a reproducible way.
Thanks

--
components: Library (Lib)
messages: 357807
nosy: castix
priority: normal
severity: normal
status: open
title: [PDB] NameError in list comprehension in PDB
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7105319ada2e663659020cbe9fdf7ff38f421ab2 by Victor Stinner 
(serge-sans-paille) in branch 'master':
 bpo-38634: Allow non-apple build to cope with libedit (GH-16986)
https://github.com/python/cpython/commit/7105319ada2e663659020cbe9fdf7ff38f421ab2


--
nosy: +vstinner

___
Python tracker 

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



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-12-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16945
pull_request: https://github.com/python/cpython/pull/17466

___
Python tracker 

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



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-12-04 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Library (Lib)
versions: +Python 3.8, Python 3.9

___
Python tracker 

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



[issue37604] warnings should use a ContextVar to manage filters/registry

2019-12-04 Thread Eric Wieser


Eric Wieser  added the comment:

A relevant old issue is https://bugs.python.org/issue6647

--
components: +Library (Lib)
nosy: +Eric Wieser
type:  -> behavior

___
Python tracker 

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



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-12-04 Thread miss-islington


miss-islington  added the comment:


New changeset 68669ef7883ea6338ca441e50f4f9d975f54d017 by Miss Islington (bot) 
in branch '3.8':
bpo-38634: Allow non-apple build to cope with libedit (GH-16986)
https://github.com/python/cpython/commit/68669ef7883ea6338ca441e50f4f9d975f54d017


--
nosy: +miss-islington

___
Python tracker 

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



[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2019-12-04 Thread Brock Mendel


New submission from Brock Mendel :

xref https://github.com/pandas-dev/pandas/pull/30034

codecs.open does `file = open(...)` before validating the encoding kwarg, 
leaving the open file behind if that validation raises.

--
messages: 357811
nosy: Brock Mendel
priority: normal
severity: normal
status: open
title: codecs.open leaks file descriptor when invalid encoding is passed

___
Python tracker 

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



[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2019-12-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2019-12-04 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Does using with block similar to https://bugs.python.org/issue22831 solve this 
problem?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks serge-sans-paille for the bug report and the fix!

I backported it to 3.8 since it could be automated, but I don't think that it's 
worth it to backport it to 3.7:
https://github.com/python/cpython/pull/16986#issuecomment-561711232

--
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



[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2019-12-04 Thread Brock Mendel


Brock Mendel  added the comment:

> Does using with block similar to https://bugs.python.org/issue22831 solve 
> this problem?

The motivating use case uses `with codecs.open(buf, "w", encoding=encoding) as 
f:`

https://github.com/pandas-dev/pandas/blob/master/pandas/io/formats/format.py#L498

--

___
Python tracker 

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



[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2019-12-04 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Ah okay, thanks for the detail. Forgot there should be an open file handle to 
be returned by codecs.open

--

___
Python tracker 

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



[issue38972] Link to instructions to change PowerShell execution policy for venv activation

2019-12-04 Thread Brett Cannon


New submission from Brett Cannon :

It would probably be good to add a note in the venv docs about execution 
policies, why it needs to change for environment activation, and how to do it 
-- especially now that we sign Activate.ps1 -- so there's less of a chance of 
people being caught off-guard.

--
assignee: brett.cannon
components: Documentation
messages: 357816
nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Link to instructions to change PowerShell execution policy for venv 
activation
type: enhancement

___
Python tracker 

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



[issue38973] Shared Memory List Returns 0 Length

2019-12-04 Thread Derek Frombach


New submission from Derek Frombach :

When accessing Shared Memory Lists, occasionally the shared memory list will 
have a length of zero for only one line of code.

Even know the length of the list is constant and greater than zero, when 
accessing this list, like say sml[0], python returns a ValueError complaining 
that sml is an empty list.

As well, if you print out sml on the very next line in the exception handler, 
then you get a full length list, with no access issues whatsoever.

This isn't a locking issue, since locks were acquired before writing to the 
lists, and released after writing.  This is a shared memory list runtime access 
consistency issue.

An Example of this Issue can be Seen Here:
https://github.com/uofrobotics/RPLidarVidStream

The issue is in the process_data function, only when smd, sma, smq, or sml are 
read from.

--
components: Extension Modules, IO, Interpreter Core, asyncio, ctypes
files: 20191203_194951.jpg
messages: 357817
nosy: Derek Frombach, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Shared Memory List Returns 0 Length
type: crash
versions: Python 3.8
Added file: https://bugs.python.org/file48757/20191203_194951.jpg

___
Python tracker 

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



[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2019-12-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Add

try:
...
except:
file.close()
raise

--
components: +IO, Library (Lib)
keywords: +easy
stage:  -> needs patch
type:  -> resource usage
versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue38974] using filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Daniel Preston


New submission from Daniel Preston :

I am using Tkinter in my program, and at a point I use a button to open a file 
by running a function with the following code:
def UploadAction(event=None):
 global filename
 filename = filedialog.askopenfilename()
 filename = [filename]
return filename
However, when I run this function, it causes Python to freeze. Apparently there 
have been bugs like this before in previous versions, and this wasn't a problem 
on 3.7, which makes me suspect that this is a bug rather than a fault on my 
end. Would you be able to release an update to fix this bug? Thanks.

--
components: Windows
messages: 357819
nosy: Daniel Preston, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: using filedialog.askopenfilename() freezes python 3.8
versions: Python 3.8

___
Python tracker 

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



[issue38974] using filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Paul Moore


Paul Moore  added the comment:

Can you provide a minimal, self-contained, example of a program that 
demonstrates this behaviour in 3.8, but works in 3.7. It's not really possible 
to determine what the issue might be without a means of reproducing the problem.

--
components: +Tkinter -Windows

___
Python tracker 

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



[issue38974] using filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Paul Moore


Change by Paul Moore :


--
nosy: +gpolo, serhiy.storchaka

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

Yes, moving f-strings to the grammar would be a huge change, and not just for 
CPython.

I discussed it at the last PyCon with the authors of various editors (for 
syntax highlighting) and other tools that parse python code. No one was hugely 
opposed to it, and I think even one person was very excited about it. But it's 
not a step to be taken lightly. I don't think I've discussed it with any other 
Python implementors outside of CPython.

My biggest concern is that it makes naive string recognition fail. For example, 
this would become a valid f-string:
f'{fn('some string')}'
while
'{fn('some string')}'
is not a valid string.

I now I think I've completely derailed this bug report. I think the action item 
here is for me to finish up my better error reporting.

--

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16946
pull_request: https://github.com/python/cpython/pull/17467

___
Python tracker 

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



[issue38974] using filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Matthew Barnett


Matthew Barnett  added the comment:

I've just tried it on Windows 10 with Python 3.8 64-bit and Python 3.8 32-bit 
without issue.

--
nosy: +mrabarnett

___
Python tracker 

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



[issue38974] using filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Daniel Preston


Daniel Preston  added the comment:

Just tried to do that and found out that IDLE also crashes when opening a new 
python file, not just when using that code. Maybe it's a problem just with my 
computer? I am running python on Windows with an AMD Ryzen 5 processor with 8GB 
RAM if it helps.

--
nosy:  -mrabarnett

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8b787964e0a647caa0558b7c29ae501470d727d9 by Victor Stinner in 
branch 'master':
bpo-38965: Fix faulthandler._stack_overflow() on GCC 10 (GH-17467)
https://github.com/python/cpython/commit/8b787964e0a647caa0558b7c29ae501470d727d9


--
message_count: 1.0 -> 2.0
pull_requests: +16947
pull_request: https://github.com/python/cpython/pull/17468

___
Python tracker 

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



[issue38974] using tkinter.filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Brett Cannon


Change by Brett Cannon :


--
title: using filedialog.askopenfilename() freezes python 3.8 -> using 
tkinter.filedialog.askopenfilename() freezes python 3.8

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16948
pull_request: https://github.com/python/cpython/pull/17469

___
Python tracker 

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



[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-12-04 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-04 Thread STINNER Victor

STINNER Victor  added the comment:

Thanks Martin Liška for the bug report and your PR 17462!

I chose to use volatile instead, since it's already the second time that we 
have to fix this function for a specific compiler. You abandonned your PR and 
confrmed that my PR fix your issue with GCC 10, so I merged my PR. Thanks for 
testing ;-)

I backported the fix to 3.7 and 3.8 branches.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:

The cool thing is that GCC now also implements tail call optimization!

--

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-04 Thread miss-islington


miss-islington  added the comment:


New changeset 5044c889dfced2f43e2cccb673d889a4882f6b3b by Miss Islington (bot) 
in branch '3.7':
bpo-38965: Fix faulthandler._stack_overflow() on GCC 10 (GH-17467)
https://github.com/python/cpython/commit/5044c889dfced2f43e2cccb673d889a4882f6b3b


--
nosy: +miss-islington

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-04 Thread miss-islington


miss-islington  added the comment:


New changeset f4a21d3b239bf4f4e4e2a8a5936b9b040645b246 by Miss Islington (bot) 
in branch '3.8':
bpo-38965: Fix faulthandler._stack_overflow() on GCC 10 (GH-17467)
https://github.com/python/cpython/commit/f4a21d3b239bf4f4e4e2a8a5936b9b040645b246


--

___
Python tracker 

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



[issue38974] using tkinter.filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What is your OS? Is it macOS specific issue?

--

___
Python tracker 

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



[issue38974] using tkinter.filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Daniel Preston


Daniel Preston  added the comment:

No, it is an issue with Windows. I think it might only be a problem with my 
computer though, maybe the fact that I have an AMD processor might have 
something to do with the problem?

--

___
Python tracker 

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



[issue38975] Add direct anchors to regex syntax documentation

2019-12-04 Thread Baptiste Mispelon

New submission from Baptiste Mispelon :

While writing documentation about regexps for a project I help maintain, I 
wanted to link to some specific aspects of Python's implementation (in my case, 
non-capturing groups) which are described on 
https://docs.python.org/3/library/re.html.

There are no visible ¶ anchors for the items in the "Regular Expression Syntax" 
section. Inspecting the generated HTML, there does seem to be auto-generated 
ids (like `#index-16` for example) but I wouldn't like to rely on those as I'm 
not sure how stable they are.

I couldn't find how to add the ¶ symbol show up next to the titles but I have a 
PR that adds a bunch of references so that items can be linked directly.

--
assignee: docs@python
components: Documentation
messages: 357831
nosy: bmispelon, docs@python
priority: normal
severity: normal
status: open
title: Add direct anchors to regex syntax documentation
type: enhancement

___
Python tracker 

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



[issue38974] using tkinter.filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Steve Dower


Steve Dower  added the comment:

Processor type is far less likely than a shell extension.

Do you have anything like DropBox/Tortoise???/etc. installed?

--

___
Python tracker 

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



[issue38975] Add direct anchors to regex syntax documentation

2019-12-04 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue38973] Shared Memory List Returns 0 Length

2019-12-04 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

As I see, the problem is not related to asyncio at all.

--
components:  -asyncio

___
Python tracker 

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



[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2019-12-04 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Any reason not to just defer opening the file until after the codec has been 
validated, so the resource acquisition comes last?

--
nosy: +josh.r

___
Python tracker 

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



[issue38972] Link to instructions to change PowerShell execution policy for venv activation

2019-12-04 Thread Brett Cannon


Brett Cannon  added the comment:

And where this has come up as an issue: 
https://github.com/microsoft/vscode-python/issues/2559.

--

___
Python tracker 

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



[issue38698] While parsing email message id: UnboundLocalError

2019-12-04 Thread miss-islington


miss-islington  added the comment:


New changeset bb815499af855b1759c02535f8d7a9d0358e74e8 by Miss Islington (bot) 
(Claudiu Popa) in branch 'master':
bpo-38698: Prevent UnboundLocalError to pop up in parse_message_id (GH-17277)
https://github.com/python/cpython/commit/bb815499af855b1759c02535f8d7a9d0358e74e8


--
nosy: +miss-islington

___
Python tracker 

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



[issue38976] Add support for HTTP Only flag in MozillaCookieJar

2019-12-04 Thread Jacob Taylor


New submission from Jacob Taylor :

This PR adds support for the HttpOnly flag as encoded in CURL cookiejars.

This PR was mainly designed to allow the MozillaCookieJar to parse in the 
cookies, as previously they were considered comments and ignored. 

As HttpOnly is considered a non-standard attribute, the nonstandard attribute 
dict was considered the most appropriate place to persist this information.

--
components: Library (Lib)
messages: 357837
nosy: Jacob Taylor
priority: normal
severity: normal
status: open
title: Add support for HTTP Only flag in MozillaCookieJar
type: enhancement
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



[issue38976] Add support for HTTP Only flag in MozillaCookieJar

2019-12-04 Thread Jacob Taylor


Change by Jacob Taylor :


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

___
Python tracker 

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



[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2019-12-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Many reasons.

1. It is simpler.
2. We will need a try/except in any case to prevent a leak if an exception be 
raised by other code following open().
3. It matches the behavior of io.open().

--

___
Python tracker 

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



[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2019-12-04 Thread Greg


Greg  added the comment:

while waiting for a fix, would it be possible to document in the argparse 
documentation that the 'dest' parameter is required (at least temporarily) for 
add_subparsers()?  (somewhere near 
file:///usr/share/doc/python/html/library/argparse.html#sub-commands)

gratuitous diff:  the pull request from 2017 would probably fix it.  my diffs 
are here (from: Python 3.8.0 (default, Oct 23 2019, 18:51:26).  (the pull 
request changes the utility '_get_action_name'; i wasn't sure of side-effects 
with other callers, so changed nearer the failure location.)

*** new/argparse.py 2019-12-05 11:16:37.618985247 +0530
--- old/argparse.py 2019-10-24 00:21:26.0 +0530
***
*** 2017,2030 
  for action in self._actions:
  if action not in seen_actions:
  if action.required:
! ra = _get_action_name(action)
! if ra is None:
! if not action.choices == {}:
! choice_strs = [str(choice) for choice in 
action.choices]
! ra = '{%s}' % ','.join(choice_strs)
! else:
! ra = ''
! required_actions.append(ra)
  else:
  # Convert action default now instead of doing it before
  # parsing arguments to avoid calling convert functions
--- 2017,2023 
  for action in self._actions:
  if action not in seen_actions:
  if action.required:
! required_actions.append(_get_action_name(action))
  else:
  # Convert action default now instead of doing it before
  # parsing arguments to avoid calling convert functions

--
nosy: +Minshall

___
Python tracker 

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