[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23932
pull_request: https://github.com/python/cpython/pull/25190

___
Python tracker 

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



[issue43511] tkinter with Tk 8.6.11 is slow on macOS

2021-04-04 Thread Thomas Wamm


Thomas Wamm  added the comment:

I have forked my TerraLunar graphics program to make a simpler more portable 
version, called "TerraLunar-tkbench.py" to facilitate testing of the tkinter 
stack for graphics performance.  The project folder is at: 

https://github.com/ThomasWamm/TerraLunar-tkbench.git

The folder includes results and commentary from running the program on numerous 
platforms (MacOS, Windows10, Raspberry OS Linux) and Python versions.
Here are the most interesting summary results:

Apple M1 Mac Mini MacOS 11.2.3 (arm64 Apple Silicon, or Rosetta2 x86_64)

  Python 3.8.2Tcl/Tk 8.5.9  TerraLunar-tkbench 0.1.8  runtime = 37   (arm64)

  Python 3.8.7Tcl/Tk 8.6.8  TerraLunar-tkbench 0.1.8  runtime = 69   
(x86_64)

  Python 3.9.2Tcl/Tk 8.6.8  TerraLunar-tkbench 0.1.8  runtime = 69   
(x86_64)

* Python 3.10.0a6 Tcl/Tk 8.6.11 TerraLunar-tkbench 0.1.8  runtime = 421  
(arm64) *
*   Why is Tcl/Tk 8.6.11 on arm64 so slow?


old iMac24-2007  MacOS 10.11.6  on 2.4 GHz Intel Core 2 Duo (x86_64)

  Python 3.7.3 Tcl/Tk 8.6.8   TerraLunar-tkbench 0.1.8  runtime = 381
  Python 3.8.2 Tcl/Tk 8.6.8   TerraLunar-tkbench 0.1.8  runtime = 377
  Python 3.9.2 Tcl/Tk 8.6.8   TerraLunar-tkbench 0.1.8  runtime = 379

* Python 3.10.0a6  Tcl/Tk 8.6.11  TerraLunar-tkbench 0.1.8  runtime = 292 *
* this is faster than the M1 Mac, differing in silicon and MacOS version.


Dell laptop Windows10 i5-8250U  >= 1.6 GHz quad-core x86_64

  Python 3.9.2Tcl/Tk 8.6.9   TerraLunar-tkbench 0.1.8  runtime = 7
  Python 3.10.0a6 Tcl/Tk 8.6.10  TerraLunar-tkbench 0.1.8  runtime = 7

# Windows10 seems to be the best environment for tkinter.py / Tcl / Tk graphics 
apps.
--

Every Mac platform is sadly much slower than a comparable Windows platform, for 
tkinter graphics. But the new M1 Mac platform is the slowest by far, slower 
than even a much older Intel Mac running the same versions of Python 3.10.0a6 
and Tk 8.6.11

That's enough involvement for this noobie; I've now learned how complicated 
this performance issue is. It's not on my critical path, so I'm going back to 
my regular project far removed from tkinter graphics.  Good Luck folks!
...thomas

--

___
Python tracker 

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



[issue43731] PEP 597: logging.basicConfig() uses locale encoding.

2021-04-04 Thread Inada Naoki


New submission from Inada Naoki :

logging.basicConfig() uses locale encoding when reading config file.

We need to add `encoding=None` parameter and 
`encoding=io.text_encoding(encoding)` in it.

--
components: Library (Lib)
messages: 390223
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 597: logging.basicConfig() uses locale encoding.
versions: Python 3.10

___
Python tracker 

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23931
pull_request: https://github.com/python/cpython/pull/25189

___
Python tracker 

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset c8e5eb904e12010d2302364e1037c24a30f5e241 by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25181)
https://github.com/python/cpython/commit/c8e5eb904e12010d2302364e1037c24a30f5e241


--

___
Python tracker 

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset ee952b5c7355cb64179ca9bb77b13e7738132d3d by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix EncodingWarning in test_filecmp (GH-25159)
https://github.com/python/cpython/commit/ee952b5c7355cb64179ca9bb77b13e7738132d3d


--

___
Python tracker 

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset de522a89e42a35da9275169b113460c3581e32d7 by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix test_email (GH-25158)
https://github.com/python/cpython/commit/de522a89e42a35da9275169b113460c3581e32d7


--

___
Python tracker 

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



[issue41974] Remove complex.__float__, complex.__floordiv__, etc

2021-04-04 Thread Guido van Rossum


Guido van Rossum  added the comment:

Indeed, Bartosz. Do you think you can help by submitting a PR for the docs?

--

___
Python tracker 

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



[issue43730] Tutorial Documentation for 4.7.3.2. Positional-Only Parameters, no "/" question?

2021-04-04 Thread Thomas Cavalli


Change by Thomas Cavalli :


--
title: Tutorial Documentation for 4.7.3.2. Positional-Only Parameters,   no "/" 
question -> Tutorial Documentation for 4.7.3.2. Positional-Only Parameters,   
no "/" question?

___
Python tracker 

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



[issue43730] Tutorial Documentation for 4.7.3.2. Positional-Only Parameters, no "/" question

2021-04-04 Thread Thomas Cavalli


Change by Thomas Cavalli :


--
title: Tutorial Documentation for 4.7.3.2. Positional-Only Parameters,   no "/" 
ques -> Tutorial Documentation for 4.7.3.2. Positional-Only Parameters,   no 
"/" question

___
Python tracker 

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



[issue43730] Tutorial Documentation for 4.7.3.2. Positional-Only Parameters, no "/" ques

2021-04-04 Thread Thomas Cavalli


New submission from Thomas Cavalli :

The last sentence of this section seems wrong to me:

"If there is no / in the function definition, there are no positional-only 
parameters."

Should this better be:

"If there is no / in the function definition, there are only positional-only 
parameters."

Reading further down does not seem to me to clarify this question.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
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



[issue43730] Tutorial Documentation for 4.7.3.2. Positional-Only Parameters, no "/" ques

2021-04-04 Thread Thomas Cavalli


Change by Thomas Cavalli :


--
nosy: thomaspcavalli
priority: normal
severity: normal
status: open
title: Tutorial Documentation for 4.7.3.2. Positional-Only Parameters,   no "/" 
ques

___
Python tracker 

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



[issue43729] Tutorial Documentation for 3.1.1. Numbers missing "result"

2021-04-04 Thread Thomas Cavalli


New submission from Thomas Cavalli :

The Division (/) section example uses the commented variable "result" without 
it being defined.  I am counting 4 numbers, (5.6667, 5, 2, 17), that are called 
result. The correct result can be implied but its poor documentation. So, 
either change:
>>> 17 // 3   # floor division discards the fractional part
to
>>> result = 17 // 3   # floor division discards the fractional part

or change:
>>> 5 * 3 + 2   # result * divisor + remainder
to
>>> 5 * 3 + 2  # floor * divisor + remainder

I suggest the latter as it explains the formula for floor.

--
assignee: docs@python
components: Documentation
messages: 390217
nosy: docs@python, thomaspcavalli
priority: normal
severity: normal
status: open
title: Tutorial Documentation for 3.1.1. Numbers missing "result"
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



[issue43655] Tkinter: make X window & macOS recognize dialogs as such

2021-04-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Excuse me, it is the query boxes, not the search boxes, that already have the 
call.  Unlike the other boxes I initially tested, they do not have the traffic 
lights.  I believe that this, not movability, is the effect on mac of 
'movableModal'.  I tested a messagebox and it also had no traffic lights.

What effect does the change have on Linux?

On my MacBook, IDLE preferences is too tall, so that the bottom buttons are not 
visible and the only way to reliably cancel is to click the red button on the 
title bar.  So remove the change for that at least until we have redesigned the 
dialog to be wide instead of tall.  There is also an IDLE issue questioning 
whether Preferences (and Search) should even be modal.

Currently, IDLE file open and save-as drop down from the center of title bar, 
have no traffic lights, and cannot be moved.  Open is the entire width of the 
screen and could only go up and down.  For Open, the underlying window is moved 
to the center.  For Safari, Save as is the same, so I question whether it 
should be changed.  Safari's Open is movable.  Neither window for either app 
currently has traffic lights.

--

___
Python tracker 

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



[issue43655] Tkinter: make X window & macOS recognize dialogs as such

2021-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See https://wiki.tcl-lang.org/page/MacWindowStyle . I suppose it affects window 
decoration.

--

___
Python tracker 

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



[issue43725] Create a release branch ABI stability regression test

2021-04-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Adding the rest of RM to evaluate the proposed solution

--
nosy: +lukasz.langa, ned.deily, steve.dower

___
Python tracker 

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



[issue43725] Create a release branch ABI stability regression test

2021-04-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ok, so seems that PR25188 works if the abi dump file for the "correct" version 
is generated with the same compiler that is used to check the ABI. I think this 
is acceptable if the workflow is:

- As soon as a version is released, we generate in the stable release branch 
the dump using some docker container with the same compiler as the GitHub CI.

- We enable the ABI check only for release branches.

- We should make the check mandatory because release managers cannot be 
checking all backport PRs unfortunately.

We make the changes for 3.8 and 3.9 for the time being.

--

___
Python tracker 

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



[issue43710] Access violations in C extension modules on Python 3.9.3

2021-04-04 Thread Christoph Gohlke


Christoph Gohlke  added the comment:

Thank you for fixing this issue so fast! Python 3.9.4 works well.

--

___
Python tracker 

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



[issue41974] Remove complex.__float__, complex.__floordiv__, etc

2021-04-04 Thread Bartosz


Bartosz  added the comment:

The docs for this should probably be updated to reflect the change: 
https://docs.python.org/3/library/typing.html#typing.runtime_checkable

--
nosy: +DevilXD

___
Python tracker 

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



[issue43725] Create a release branch ABI stability regression test

2021-04-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +23930
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25188

___
Python tracker 

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



[issue43655] Tkinter: make X window & macOS recognize dialogs as such

2021-04-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I presume 'floatable' means 'can move dialog around on top of the parent 
window'.  On my Mac Air, with 3.8 and 8.6.8, all the dialogs I checked, 
including About, are already floatable in this sense, not just the search boxes 
(which already had "::tk::unsupported::MacWindowsStyle" call).  Since 
tk::unsupported is not listed on 
https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm, (nor on the 8.5 page) I 
wonder if it is obsolete, or just hidden.

If no one knows, we might ask Kevin Walzer.

--

___
Python tracker 

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



[issue43655] Tkinter: make X window & macOS recognize dialogs as such

2021-04-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Epaine (or Tal?): please test PR-25187 on Mac.

--
nosy: +epaine
title: Tkinter: Not setting _NET_WM_WINDOW_TYPE on FileDialog -> Tkinter: make 
X window & macOS recognize dialogs as such

___
Python tracker 

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



[issue43725] Create a release branch ABI stability regression test

2021-04-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Also, we can use libabigail. For instance:

root@7a3947dec3d8:/pytho# abidiff Python-3.9.2/python Python-3.9.3/python
Functions changes summary: 0 Removed, 3 Changed (53 filtered out), 0 Added 
functions
Variables changes summary: 0 Removed, 0 Changed (1 filtered out), 0 Added 
variable

3 functions with some indirect sub-type change:

  [C]'function void PyEval_AcquireThread(PyThreadState*)' at ceval.c:381:1 has 
some indirect sub-type changes:
parameter 1 of type 'PyThreadState*' has sub-type changes:
  in pointed to type 'typedef PyThreadState' at pystate.h:20:1:
underlying type 'struct _ts' at pystate.h:51:1 changed:
  type size hasn't changed
  4 data member changes (2 filtered):
   'char _ts::recursion_critical' offset changed from 296 to 320 (in 
bits) (by +24 bits)
   'int _ts::stackcheck_counter' offset changed from 320 to 352 (in 
bits) (by +32 bits)
   'int _ts::tracing' offset changed from 352 to 384 (in bits) (by +32 
bits)
   'int _ts::use_tracing' offset changed from 384 to 416 (in bits) (by 
+32 bits)
  1 data member change:
   type of 'char _ts::overflowed' changed:
 type name changed from 'char' to 'int'
 type size changed from 8 to 32 (in bits)
   and name of '_ts::overflowed' changed to '_ts::recursion_headroom' 
at pystate.h:61:1

  [C]'function int _PyErr_CheckSignalsTstate(PyThreadState*)' at 
signalmodule.c:1684:1 has some indirect sub-type changes:
parameter 1 of type 'PyThreadState*' has sub-type changes:
  in pointed to type 'typedef PyThreadState' at pystate.h:20:1:
underlying type 'struct _ts' at pystate.h:51:1 changed:
  type size hasn't changed
  no data member changes (6 filtered);
  no data member change (1 filtered);

  [C]'function void _PyErr_Clear(PyThreadState*)' at errors.c:426:1 has some 
indirect sub-type changes:
parameter 1 of type 'PyThreadState*' has sub-type changes:
  in pointed to type 'typedef PyThreadState' at pystate.h:20:1:
underlying type 'struct _ts' at pystate.h:51:1 changed:
  type size hasn't changed
  no data member changes (6 filtered);
  no data member change (1 filtered);

--

___
Python tracker 

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



[issue43725] Create a release branch ABI stability regression test

2021-04-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

For example, the tool generates this report for the two 3.9 versions (attached 
to the issue).

--
Added file: https://bugs.python.org/file49935/compat_report.html

___
Python tracker 

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



[issue43593] pymalloc is not aware of Memory Tagging Extension (MTE) and crashes

2021-04-04 Thread Tim Peters


Tim Peters  added the comment:

I think it's time to change what address_in_range() tries to answer. It 
currently gives a precise answer to "is this byte address in a region obmalloc 
owns?". But that's stronger than what it needs to do its job: the real question 
is "is this an address that obmalloc could return from its malloc() or 
realloc() functions?". Because it's only used by free() and realloc(), and they 
only care where the address they're _passed_ came from.

The difference is when an arena is not pool-aligned. Oddball chunks outside of 
full pools, at both ends of the arena, are never returned by obmalloc then.

Instead the tree could be changed to record the starting addresses of the 
_full_ pools obmalloc controls.  Those contain the only addresses obmalloc will 
ever pass out (from malloc() or realloc()).

Like so, where p is the arena base address. This hasn't been tested, and may 
contain typos or logical errors. I'm far more interested in the latter for now 
;-)

ideal1 = p & ~ARENA_SIZE_MASK # round down to ideal
ideal2 = ideal1 + ARENA_SIZE
offset = p - ideal1
b1 = bottom_node(ideal1)
b2 = bottom_node(ideal2)
if not offset:
# already ideal
b1.hi = -1
assert b2.lo == 0
elif offset & POOL_SIZE_MASK == 0:
# arena is pool-aligned
b1.hi = b2.lo = offset
else:
# Not pool-aligned.
# obmalloc won't pass out an address higher than in
# the last full pool.
# Round offset down to next lower pool address.
offset &= ~POOL_SIZE_MASK
b2.lo = offset
# And won't pass out an address lower than in the
# first full pool.
offset += POOL_SIZE # same as rounding original offset up
# That's almost right for b1.hi, but one exception: if
# offset is ARENA_SIZE now, the first full pool is at the
# start of ideal2, and no feasible address is in ideal1.
assert offset <= ARENA_SIZE
b1.hi = offset & ARENA_SIZE_MASK 

Note that, except for the oddball -1, everything stored in a bottom node is a 
pool address then, and so there's no need to store their all-zero lowest 
POOL_BITS bits. .lo and .hi can be shrunk to a signed 8-bit int with the 
current settings (20 arena bits and 14 pool bits).

And caching pool addresses wouldn't have any obscure failing end-cases either: 
address_in_range() could just as well be passed a pool address to begin with. 
It would only care about pool addresses, not byte addresses.

--

___
Python tracker 

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



[issue43725] Create a release branch ABI stability regression test

2021-04-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

We could have a buildbot using https://github.com/lvc/abi-compliance-checker

--

___
Python tracker 

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



[issue43655] Tkinter: Not setting _NET_WM_WINDOW_TYPE on FileDialog

2021-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 25187 makes all Tkinter dialog windows and most IDLE dialog windows (except 
about and help windows) be recognized as dialogs by window managers on macOS 
and X Window. It conforms the behavior of standard Tk dialog windows.

This change is harmless enough to be backported.

--
assignee:  -> terry.reedy
components: +IDLE
nosy: +taleinat, terry.reedy

___
Python tracker 

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



[issue43655] Tkinter: Not setting _NET_WM_WINDOW_TYPE on FileDialog

2021-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +23929
pull_request: https://github.com/python/cpython/pull/25187

___
Python tracker 

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



[issue43725] Create a release branch ABI stability regression test

2021-04-04 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Indeed.  In particular given the 3.9.3 issue I was assuming such a test should 
include asserting both the sizeof() ABI structs and offsetof() public members 
of all ABI structs.  On each specific first class supported platform.

This goes beyond what 
https://www.python.org/dev/peps/pep-0652/#testing-the-stable-abi currently 
states to check size and layout rather than just symbol presence.  But seems to 
match the intent.

--

___
Python tracker 

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



[issue38794] Setup: support linking openssl statically

2021-04-04 Thread Christian Heimes


Christian Heimes  added the comment:

Lukas,
no, some guy called Bill approached me at our last Illuminati meeting in Hollow 
Earth. He asked me to implement static linking for his next-gen secret brain 
chip. In exchange for the favor I was allowed to ride his T-Rex. True story!

Thanks, William! :)

--

___
Python tracker 

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



[issue43709] Windows Tools\buildbot\clean.bat misses some needed pyc/pyo removal

2021-04-04 Thread David Bolen


David Bolen  added the comment:

No longer needed after commit c368ce74d2c9bcbf1ec320466819c2d4768252f7

--
resolution:  -> out of date
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



[issue24275] lookdict_* give up too soon

2021-04-04 Thread Roundup Robot


Change by Roundup Robot :


--
nosy: +python-dev
nosy_count: 7.0 -> 8.0
pull_requests: +23928
pull_request: https://github.com/python/cpython/pull/25186

___
Python tracker 

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



[issue42128] Structural Pattern Matching (PEP 634)

2021-04-04 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +23927
pull_request: https://github.com/python/cpython/pull/25185

___
Python tracker 

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



[issue43724] macOS cannot compute sizeof (long double)

2021-04-04 Thread Ned Deily


Ned Deily  added the comment:

P.S. Also check System Preferences -> Software Update for any updates to the 
Command Line Tools.

--

___
Python tracker 

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



[issue43724] macOS cannot compute sizeof (long double)

2021-04-04 Thread Ned Deily


New submission from Ned Deily :

>From the config.log you supplied, it looks the macOS system you are running on 
>was upgraded to the current latest version, 11.2.3, but the Command Line Tools 
>were not. It seems that with recent macOS releases, you often need to do that 
>manually for each bugfix release.  Try:

  xcode-select --install

If successful, you should see currently:

  cc --version
 Apple clang version 12.0.0 (clang-1200.0.32.29)

--
nosy: +ned.deily
resolution:  -> works for me
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



[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2021-04-04 Thread Steve Newcomb


Steve Newcomb  added the comment:

Sometimes a leak is exactly what's wanted, i.e. a standing block of shared 
memory that allows sharing processes come and go ad libitum.  I mention this 
because I haven't seen anyone mention it explicitly.  

While turicas's monkeypatch covers the use case in which a manually-named block 
of shared memory is intended to remain indefinitely, it would be best if future 
versions of shared_memory allowed for such a use case, too.  It shouldn't be 
necessary to monkeypatch in order to have a standing block of shared memory 
remain ready and waiting even when nobody's using it.

--
nosy: +steve.newcomb

___
Python tracker 

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



[issue43704] ShareableList() raises TypeError when passing "name" keyword

2021-04-04 Thread Steve Newcomb


Steve Newcomb  added the comment:

The documentation, which needs some improvement, I think.  I'll suggest some 
improvements when I understand things a little better.

For the record, it turned out that SharedMemoryManager was irrelevant, as were 
sockets.  That makes sense since memory can't be shared across a network, but 
the doc nevertheless implies that the socket interface is available.  I don't 
see why.  ShareableList is a class in shared_memory.py and is a function name, 
despite its capitalization, in managers.py, with a different signature.  That's 
massively confusing in combination with the foregoing.  In retrospect, I should 
have started by paying most of my attention to the documentation's numpy 
example, even though numpy is irrelevant to my problem and the example was more 
work to sort through than the other, simpler examples.

With all that resolved in my mind, I immediately ran aground on 
https://bugs.python.org/issue38119.  In that discussion, Guido notes that 
[automatic] garbage collection is hard, and I would add that automatic garbage 
collection is especially hard to deal with when it's not wanted.  I'm attaching 
the script I wrote in order to satisfy myself that turicas's monkeypatch (see 
issue38119) allows me to create a standing block of shared memory and to unlink 
it only when I want to.

--
resolution:  -> not a bug
Added file: https://bugs.python.org/file49934/5.py

___
Python tracker 

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



[issue41370] PEP 585 and ForwardRef

2021-04-04 Thread miss-islington


miss-islington  added the comment:


New changeset d56bcf915b8d5a6afe4555cb6813c8210824e751 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-41370: Add note about ForwardRefs and PEP585 generic types in docs 
(GH-25183) (GH-25184)
https://github.com/python/cpython/commit/d56bcf915b8d5a6afe4555cb6813c8210824e751


--

___
Python tracker 

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



[issue43728] Change the exception type and message raised when _curses is not found.

2021-04-04 Thread Shreyan Avigyan


New submission from Shreyan Avigyan :

When importing the curses module, be it on Windows or Darwin or UNIX-based OS 
or any other platform, if the _curses module is not found then just a 
ModuleNotFoundError is raised. But this error is not very informational in case 
of _curses module. Since the curses module is packaged with the Python 
interpreter itself at first it may seem, to beginners especially, that the 
Python interpreter was not installed correctly and then they would go searching 
for an answer for about 4-5 days. 

We know that curses library is not installed on windows by default and may or 
may not be present on other operating systems. Most UNIX system have ncurses or 
other curses library installed by default. 

Python errors have a reputation of being very informational. I would like to 
submit a PR to modify the curses module a little bit by declaring a 
BaseException class and raising that Exception with the message "_curses module 
not found. Make sure a curses library is installed" or some kind of message 
like that.

But before I do that I would like to take advice from experienced developers 
about somethings. Is this change in the exception, raised when _curses module 
is not found, acceptable by the Python Community? If it is then should a draft 
PEP be submitted or should a PR be directly submitted to python/cpython?

--
components: Library (Lib)
messages: 390195
nosy: shreyanavigyan
priority: normal
severity: normal
status: open
title: Change the exception type and message raised when _curses is not found.
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue41370] PEP 585 and ForwardRef

2021-04-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +23926
pull_request: https://github.com/python/cpython/pull/25184

___
Python tracker 

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



[issue41370] PEP 585 and ForwardRef

2021-04-04 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 2b5913b4ee5852a28ca1509478f5582beb3aff7b by Ken Jin in branch 
'master':
bpo-41370: Add note about ForwardRefs and PEP585 generic types in docs (#25183)
https://github.com/python/cpython/commit/2b5913b4ee5852a28ca1509478f5582beb3aff7b


--

___
Python tracker 

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



[issue24160] Pdb sometimes raises exception when trying to remove a breakpoint defined in a different debugger session

2021-04-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

PR 25182 fixes the issue, so I am closing this again.

Thanks for the quick fix, Irit!

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



[issue24160] Pdb sometimes raises exception when trying to remove a breakpoint defined in a different debugger session

2021-04-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset aadd4e10fda87b64ea527667238503da326a06e7 by Irit Katriel in 
branch 'master':
bpo-24160: Fix test_pdb refleaks failure (GH-25182)
https://github.com/python/cpython/commit/aadd4e10fda87b64ea527667238503da326a06e7


--

___
Python tracker 

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



[issue41570] Add DearPyGui to faq/gui.rst

2021-04-04 Thread Irit Katriel


New submission from Irit Katriel :

Jonathan, I see you closed the PR. Did you intend to close this issue as well?

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue41370] PEP 585 and ForwardRef

2021-04-04 Thread Ken Jin


Change by Ken Jin :


--
nosy: +kj
nosy_count: 7.0 -> 8.0
pull_requests: +23925
pull_request: https://github.com/python/cpython/pull/25183

___
Python tracker 

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



[issue20626] Manager documentation unclear about lists and thread safeness

2021-04-04 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

1. A link was added in commit 86a76684269f940a20366cb42668f1acb0982dca
2. The Programming Guidelines mentions thread safety of proxies: 
https://docs.python.org/3/library/multiprocessing.html#programming-guidelines


Can this be closed?

--
nosy: +erlendaasland

___
Python tracker 

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



[issue24160] Pdb sometimes raises exception when trying to remove a breakpoint defined in a different debugger session

2021-04-04 Thread Irit Katriel


Irit Katriel  added the comment:

With the patch:

PS C:\Users\User\src\cpython-dev> ./python -m test test_pdb -R 3:3
Running Debug|x64 interpreter...
0:00:00 Run tests sequentially
0:00:00 [1/1] test_pdb
beginning 6 repetitions
123456
..

== Tests result: SUCCESS ==

1 test OK.

Total duration: 34.2 sec
Tests result: SUCCESS

--

___
Python tracker 

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



[issue24160] Pdb sometimes raises exception when trying to remove a breakpoint defined in a different debugger session

2021-04-04 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +23924
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/25182

___
Python tracker 

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



[issue24160] Pdb sometimes raises exception when trying to remove a breakpoint defined in a different debugger session

2021-04-04 Thread Irit Katriel


Irit Katriel  added the comment:

Thanks, I'm looking.

--

___
Python tracker 

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



[issue24160] Pdb sometimes raises exception when trying to remove a breakpoint defined in a different debugger session

2021-04-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Per our buildbot policy 
(https://discuss.python.org/t/policy-to-revert-commits-on-buildbot-failure/404) 
we will need to revert this in 24 hours if is not fixed to avoid masking future 
errors.

--

___
Python tracker 

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



[issue24160] Pdb sometimes raises exception when trying to remove a breakpoint defined in a different debugger session

2021-04-04 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Unfortunately PR21989 has breaking the refleaks buildbots. Example:

https://buildbot.python.org/all/#/builders/320/builds/226/steps/5/logs/stdio

To reproduce:

❯ ./python -m test test_pdb -R 3:3
0:00:00 load avg: 1.40 Run tests sequentially
0:00:00 load avg: 1.40 [1/1] test_pdb
beginning 6 repetitions
123456
.test test_pdb failed -- Traceback (most recent call last):
  File "/home/pablogsal/github/cpython/Lib/doctest.py", line 2205, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for 
test.test_pdb.test_pdb_breakpoints_preserved_across_interactive_sessions
  File "/home/pablogsal/github/cpython/Lib/test/test_pdb.py", line 326, in 
test_pdb_breakpoints_preserved_across_interactive_sessions

--
File "/home/pablogsal/github/cpython/Lib/test/test_pdb.py", line 330, in 
test.test_pdb.test_pdb_breakpoints_preserved_across_interactive_sessions
Failed example:
with PdbTestInput([  # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
   'import test.test_pdb',
   'break test.test_pdb.do_something',
   'break test.test_pdb.do_nothing',
   'break',
   'continue',
]):
   pdb.run('print()')
Expected:
> (1)()
(Pdb) import test.test_pdb
(Pdb) break test.test_pdb.do_something
Breakpoint 1 at ...test_pdb.py:...
(Pdb) break test.test_pdb.do_nothing
Breakpoint 2 at ...test_pdb.py:...
(Pdb) break
Num Type Disp Enb   Where
1   breakpoint   keep yes   at ...test_pdb.py:...
2   breakpoint   keep yes   at ...test_pdb.py:...
(Pdb) continue
Got:
> (1)()->None
(Pdb) import test.test_pdb
(Pdb) break test.test_pdb.do_something
Breakpoint 1 at /home/pablogsal/github/cpython/Lib/test/test_pdb.py:396
(Pdb) break test.test_pdb.do_nothing
Breakpoint 2 at /home/pablogsal/github/cpython/Lib/test/test_pdb.py:393
(Pdb) break
Num Type Disp Enb   Where
1   breakpoint   keep yes   at 
/home/pablogsal/github/cpython/Lib/test/test_pdb.py:396
2   breakpoint   keep yes   at 
/home/pablogsal/github/cpython/Lib/test/test_pdb.py:393
(Pdb) continue

--
File "/home/pablogsal/github/cpython/Lib/test/test_pdb.py", line 350, in 
test.test_pdb.test_pdb_breakpoints_preserved_across_interactive_sessions
Failed example:
with PdbTestInput([  # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
   'break',
   'break pdb.find_function',
   'break',
   'clear 1',
   'continue',
]):
   pdb.run('print()')
Expected:
> (1)()
(Pdb) break
Num Type Disp Enb   Where
2   breakpoint   keep yes   at ...test_pdb.py:...
3   breakpoint   keep yes   at ...pdb.py:...
(Pdb) clear 2
Deleted breakpoint 2 at ...test_pdb.py:...
(Pdb) clear 3
Deleted breakpoint 3 at ...pdb.py:...
(Pdb) continue
Got:
> (1)()->None
(Pdb) break
Num Type Disp Enb   Where
2   breakpoint   keep yes   at 
/home/pablogsal/github/cpython/Lib/test/test_pdb.py:393
3   breakpoint   keep yes   at /home/pablogsal/github/cpython/Lib/pdb.py:94
(Pdb) clear 2
Deleted breakpoint 2 at 
/home/pablogsal/github/cpython/Lib/test/test_pdb.py:393
(Pdb) clear 3
Deleted breakpoint 3 at /home/pablogsal/github/cpython/Lib/pdb.py:94
(Pdb) continue



test_pdb failed

== Tests result: FAILURE ==

1 test failed:
test_pdb

Total duration: 2.8 sec
Tests result: FAILURE

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



[issue43719] Master build failure on Windows getting file system encoding

2021-04-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Fixed by https://github.com/python/cpython/pull/25172

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



[issue43725] Create a release branch ABI stability regression test

2021-04-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is probably complementary or in the avenue of 
https://www.python.org/dev/peps/pep-0652/

--
nosy: +pablogsal, petr.viktorin

___
Python tracker 

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



[issue43727] futures cancelled by ThreadPoolExecutor.shutdown() not yielded by as_completed()

2021-04-04 Thread bbh


New submission from bbh :

concurrent.futures.ThreadPoolExecutor.shutdown(cancel_futures=True) cancels the 
pending futures, but the futures remain in the state CANCELLED and never get to 
the state CANCELLED_AND_NOTIFIED. Thus they are never yielded by 
concurrent.futures.as_completed().

If I use shutdown(cancel_futures=True) in a loop of as_completed(), the loop 
will never finish and the program hangs. Not even Ctrl-C works.

If I use concurrent.futures.Future.cancel() on all pending futures in the loop, 
everything works as expected.

--
components: Library (Lib)
messages: 390183
nosy: bigbenhur
priority: normal
severity: normal
status: open
title: futures cancelled by ThreadPoolExecutor.shutdown() not yielded by 
as_completed()
type: behavior
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



[issue42823] Incorrect frame.f_lineno when frame.f_trace is set

2021-04-04 Thread Ned Batchelder


Change by Ned Batchelder :


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



[issue43710] Access violations in C extension modules on Python 3.9.3

2021-04-04 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue43710] Access violations in C extension modules on Python 3.9.3

2021-04-04 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset c7b0feca25fc68ec3e0884b82e5f45a4da011e8e by Gregory P. Smith in 
branch '3.9':
[3.9] bpo-43710: Rollback the 3.9 bpo-42500 fix, it broke the ABI in 3.9.3 
(#25179)
https://github.com/python/cpython/commit/c7b0feca25fc68ec3e0884b82e5f45a4da011e8e


--

___
Python tracker 

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



[issue42500] crash with unbounded recursion in except statement

2021-04-04 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset c7b0feca25fc68ec3e0884b82e5f45a4da011e8e by Gregory P. Smith in 
branch '3.9':
[3.9] bpo-43710: Rollback the 3.9 bpo-42500 fix, it broke the ABI in 3.9.3 
(#25179)
https://github.com/python/cpython/commit/c7b0feca25fc68ec3e0884b82e5f45a4da011e8e


--

___
Python tracker 

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



[issue43726] regex module fails with a quantified backref but succeeds with repeated backref

2021-04-04 Thread David Ellsworth


David Ellsworth  added the comment:

Thanks, I didn't realize. I thought it was an official module that wasn't 
included as part of the main package due to being unfinished.

Reported the bug here: 
https://bitbucket.org/mrabarnett/mrab-regex/issues/408/regex-fails-with-a-quantified

--
resolution:  -> third party
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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23923
pull_request: https://github.com/python/cpython/pull/25181

___
Python tracker 

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



[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)

2021-04-04 Thread hai shi


hai shi  added the comment:

> Perhaps it would be better that compiling them not be attempted with 
> configuring --with-trace-refs?

+1. The limited C API can't be build under Py_TRACE_REFS now.

--

___
Python tracker 

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



[issue27129] Wordcode, part 2

2021-04-04 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset c368ce74d2c9bcbf1ec320466819c2d4768252f7 by Dennis Sweeney in 
branch 'master':
bpo-27129: Update magic numbers and bootstrapping for GH-25069 (GH-25172)
https://github.com/python/cpython/commit/c368ce74d2c9bcbf1ec320466819c2d4768252f7


--

___
Python tracker 

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



[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)

2021-04-04 Thread hai shi


Change by hai shi :


--
pull_requests: +23922
pull_request: https://github.com/python/cpython/pull/25180

___
Python tracker 

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



[issue43726] regex module fails with a quantified backref but succeeds with repeated backref

2021-04-04 Thread Patrick Reader


Patrick Reader  added the comment:

The `regex` module is a third-party package, not part of the Python standard 
library. Please report issues here: 
https://bitbucket.org/mrabarnett/mrab-regex/issues

--
nosy: +pxeger

___
Python tracker 

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25171)
https://github.com/python/cpython/commit/3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b


--

___
Python tracker 

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



[issue43726] regex module fails with a quantified backref but succeeds with repeated backref

2021-04-04 Thread David Ellsworth


New submission from David Ellsworth :

The regex /^((x*)\2{3}(?=\2$))*x$/ matches powers of 5 in unary, expressed as 
strings of "x" characters whose length is the number.

The following command line should print "1", but prints nothing:
python -c 'import regex; regex.match(r"^((x*)\2{3}(?=\2$))*x$", "x"*125) and 
print(1)'

However, this command does print "1":
python -c 'import regex; regex.match(r"^((x*)\2\2\2(?=\2$))*x$", "x"*125) and 
print(1)'

And so does this one:
python -c 'import re; re.match(r"^((x*)\2{3}(?=\2$))*x$", "x"*125) and print(1)'

The expression "\2\2\2" should behave exactly the same as "\2{3}", but in the 
"regex" module it does not.

Solving the following Code Golf Stack Exchange challenge is what led me to 
discover this bug:
https://codegolf.stackexchange.com/questions/211840/is-that-number-a-two-bit-number%ef%b8%8f/222792#222792

--
components: Regular Expressions
messages: 390175
nosy: Davidebyzero, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: regex module fails with a quantified backref but succeeds with repeated 
backref
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