[issue45736] 2to3 does not support integer division fixing

2021-11-06 Thread theeshallnotknowethme


Change by theeshallnotknowethme :


--
versions:  -Python 3.11, Python 3.9

___
Python tracker 

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



[issue45736] 2to3 does not support integer division fixing

2021-11-06 Thread theeshallnotknowethme


Change by theeshallnotknowethme :


--
versions: +Python 3.11, Python 3.9

___
Python tracker 

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



[issue45737] assertLogs to optionally not disable existing handlers

2021-11-06 Thread Ned Deily


Change by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue45736] 2to3 does not support integer division fixing

2021-11-06 Thread theeshallnotknowethme


theeshallnotknowethme  added the comment:

A correction to the discussion: The PR I made only fixes CONSTANT integer 
division, not any other. The left and right operands are checked for 
non-constants and then are checked for integerness (specifically checks for 
`NOT A FLOAT`s). After both checks have passed, the division operator is turned 
into a floor division operator.

--

___
Python tracker 

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



[issue45742] python -h can't find -R option

2021-11-06 Thread jiahua wang


New submission from jiahua wang :

I input python -h on the command line, and I can't find any -R option.

--
assignee: docs@python
components: Documentation
messages: 405891
nosy: 180909, docs@python
priority: normal
severity: normal
status: open
title: python -h can't  find -R option
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



[issue19217] Calling assertEquals for moderately long list takes too long

2021-11-06 Thread Jack DeVries


Jack DeVries  added the comment:

Hey all, I'm putting a ping on this issue. I think my fix is ready to merge, 
see GH-27434. Thanks for all the feedback on the PR so far!

--

___
Python tracker 

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



[issue44067] Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT

2021-11-06 Thread anadius


Change by anadius :


--
nosy: +alanmcintyre, serhiy.storchaka, twouters

___
Python tracker 

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



[issue45736] 2to3 does not support integer division fixing

2021-11-06 Thread theeshallnotknowethme


theeshallnotknowethme  added the comment:

I have put some effort to make it work for constant integers. So this

x = a ** 3 / 7

would not be changed, since it refers to a name whose value is not known.

--

___
Python tracker 

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



[issue45741] entry points singular?

2021-11-06 Thread Rafael Fontenelle


New submission from Rafael Fontenelle :

whatsnew/3.10 on importlib.metadata has the following paragraph:

"importlib.metadata entry points now provides a nicer experience for selecting 
entry points by group and name through a new importlib.metadata.EntryPoints 
class. See the Compatibility Note in the docs for more info on the deprecation 
and usage."

In the above paragraph should "provides" -> "provide", or "entry points" is 
somehow considered singular?

[1] https://docs.python.org/pt-br/3/whatsnew/3.10.html#importlib-metadata

--
assignee: docs@python
components: Documentation
messages: 405888
nosy: docs@python, rffontenelle
priority: normal
severity: normal
status: open
title: entry points singular?
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue44010] IDLE: highlight soft keywords

2021-11-06 Thread Rafael Fontenelle


Change by Rafael Fontenelle :


--
nosy: +rffontenelle
nosy_count: 5.0 -> 6.0
pull_requests: +27709
pull_request: https://github.com/python/cpython/pull/29454

___
Python tracker 

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



[issue45392] docstring of "type" could use an update

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Mark! ✨  ✨

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

___
Python tracker 

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



[issue45392] docstring of "type" could use an update

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 045f205ba4710c4c633364a4e2e098483af936e5 by Miss Islington (bot) 
in branch '3.10':
bpo-45392: Update the docstring of the 'type' built-in (GH-29439) (GH-29452)
https://github.com/python/cpython/commit/045f205ba4710c4c633364a4e2e098483af936e5


--

___
Python tracker 

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



[issue45392] docstring of "type" could use an update

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset f5287ecd59d83a662490f89188a0fc2ef3718f8b by Miss Islington (bot) 
in branch '3.9':
bpo-45392: Update the docstring of the 'type' built-in (GH-29439) (GH-29453)
https://github.com/python/cpython/commit/f5287ecd59d83a662490f89188a0fc2ef3718f8b


--

___
Python tracker 

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



[issue45736] 2to3 does not support integer division fixing

2021-11-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think knowing that that's integer division is beyond what 2to3 can 
accomplish. Plus, with lib2to3 being deprecated, I don't think anyone's going 
to put any effort into this.

--
nosy: +eric.smith

___
Python tracker 

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



[issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 376218e1c65c029c24e45ca408a14f681cf1aeae by Miss Islington (bot) 
in branch '3.9':
bpo-27313: Use non-deprecated methods for tracing (GH-29425) (GH-29451)
https://github.com/python/cpython/commit/376218e1c65c029c24e45ca408a14f681cf1aeae


--

___
Python tracker 

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



[issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 8fdf6c64d3e0183c21f069d31d350a907ce42708 by Miss Islington (bot) 
in branch '3.10':
bpo-27313: Use non-deprecated methods for tracing (GH-29425) (GH-29450)
https://github.com/python/cpython/commit/8fdf6c64d3e0183c21f069d31d350a907ce42708


--

___
Python tracker 

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



[issue45392] docstring of "type" could use an update

2021-11-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27708
pull_request: https://github.com/python/cpython/pull/29453

___
Python tracker 

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



[issue45392] docstring of "type" could use an update

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 91275207296c39e495fe118019a757c4ddefede8 by Mark Dickinson in 
branch 'main':
bpo-45392: Update the docstring of the 'type' built-in (GH-29439)
https://github.com/python/cpython/commit/91275207296c39e495fe118019a757c4ddefede8


--

___
Python tracker 

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



[issue45392] docstring of "type" could use an update

2021-11-06 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27707
pull_request: https://github.com/python/cpython/pull/29452

___
Python tracker 

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



[issue45392] docstring of "type" could use an update

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:

It's unclear what the original comment was about. BPO-20189 is somewhat cryptic 
to me too. `inspect.signature` never supported `type`, `round`, `int`, and so 
on. I checked 3.4.10 and 3.5.10 and in each case it looks like this:

>>> inspect.signature(type)
Traceback (most recent call last):
...
ValueError: no signature found for builtin 


In fact, there's open issues on that, like BPO-44618.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18

2021-11-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27706
pull_request: https://github.com/python/cpython/pull/29451

___
Python tracker 

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



[issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18

2021-11-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27705
pull_request: https://github.com/python/cpython/pull/29450

___
Python tracker 

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



[issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset cc1cbcbb2d75cacc31ff3359d83043bc7bd5a89d by Serhiy Storchaka in 
branch 'main':
bpo-27313: Use non-deprecated methods for tracing (GH-29425)
https://github.com/python/cpython/commit/cc1cbcbb2d75cacc31ff3359d83043bc7bd5a89d


--

___
Python tracker 

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



[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 643f50ca5e9e12a4d8269ddc8baf2279d8608745 by Miss Islington (bot) 
in branch '3.9':
[doc] bpo-45680: Improve glossary entry for generic types (GH-29388) (GH-29448)
https://github.com/python/cpython/commit/643f50ca5e9e12a4d8269ddc8baf2279d8608745


--

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e53cb9811f97ded5a20872fe0f3486bc7f8f1b6e by Miss Islington (bot) 
in branch '3.10':
bpo-39452: [doc] Change "must" to "can" on relative import style in `__main__` 
(GH-29379) (GH-29449)
https://github.com/python/cpython/commit/e53cb9811f97ded5a20872fe0f3486bc7f8f1b6e


--

___
Python tracker 

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



[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 494f8da741054e5bab33f23f3961400ea5778235 by Miss Islington (bot) 
in branch '3.10':
[doc] bpo-45680: Improve glossary entry for generic types (GH-29388) (GH-29447)
https://github.com/python/cpython/commit/494f8da741054e5bab33f23f3961400ea5778235


--

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-11-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27704
pull_request: https://github.com/python/cpython/pull/29449

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 57457a1e5caf714034a75fe4f382b8b669ce6ed8 by Andre Delfino in 
branch 'main':
bpo-39452: [doc] Change "must" to "can" on relative import style in `__main__` 
(GH-29379)
https://github.com/python/cpython/commit/57457a1e5caf714034a75fe4f382b8b669ce6ed8


--

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-11-06 Thread Andrés Delfino

Change by Andrés Delfino :


--
nosy: +adelfino
nosy_count: 11.0 -> 12.0
pull_requests: +27703
pull_request: https://github.com/python/cpython/pull/29379

___
Python tracker 

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



[issue45644] Make json.tool soak up input before opening output for writing

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Chris! ✨  ✨

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



[issue45644] Make json.tool soak up input before opening output for writing

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset a932631890d148444e5f9b09f4b57305475d6386 by Miss Islington (bot) 
in branch '3.9':
bpo-45644:  Make json.tool read infile before writing to outfile (GH-29273) 
(GH-29446)
https://github.com/python/cpython/commit/a932631890d148444e5f9b09f4b57305475d6386


--

___
Python tracker 

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



[issue45644] Make json.tool soak up input before opening output for writing

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 6603f6b5bdf0ed164bad4eb432619da2e95fb518 by Miss Islington (bot) 
in branch '3.10':
bpo-45644:  Make json.tool read infile before writing to outfile (GH-29273) 
(GH-29445)
https://github.com/python/cpython/commit/6603f6b5bdf0ed164bad4eb432619da2e95fb518


--

___
Python tracker 

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



[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27701
pull_request: https://github.com/python/cpython/pull/29447

___
Python tracker 

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



[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27702
pull_request: https://github.com/python/cpython/pull/29448

___
Python tracker 

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



[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 77a2c77c84d2ead2d19f96df862c119308e90071 by Alex Waygood in 
branch 'main':
[doc] bpo-45680: Improve glossary entry for generic types (GH-29388)
https://github.com/python/cpython/commit/77a2c77c84d2ead2d19f96df862c119308e90071


--

___
Python tracker 

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



[issue45740] StrEnum entry doesn't mention its introduction in 3.11

2021-11-06 Thread Ethan Furman


Ethan Furman  added the comment:

Thanks!

--
assignee: docs@python -> ethan.furman
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



[issue45740] StrEnum entry doesn't mention its introduction in 3.11

2021-11-06 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset cb755dba7a988f92a7d1cad48f3c27df18c9342d by Ethan Furman in 
branch 'main':
bpo-45740: [Enum] add versionadded markers to docs (GH-29443)
https://github.com/python/cpython/commit/cb755dba7a988f92a7d1cad48f3c27df18c9342d


--

___
Python tracker 

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



[issue45644] Make json.tool soak up input before opening output for writing

2021-11-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27700
pull_request: https://github.com/python/cpython/pull/29446

___
Python tracker 

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



[issue45644] Make json.tool soak up input before opening output for writing

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 815dad42d53fc40a6dc057e067f4a8a885c3b858 by Chris Wesseling in 
branch 'main':
bpo-45644:  Make json.tool read infile before writing to outfile (GH-29273)
https://github.com/python/cpython/commit/815dad42d53fc40a6dc057e067f4a8a885c3b858


--

___
Python tracker 

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



[issue45644] Make json.tool soak up input before opening output for writing

2021-11-06 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +27699
pull_request: https://github.com/python/cpython/pull/29445

___
Python tracker 

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



[issue35828] test_multiprocessing_fork: segmentation error in PyDict_GetItem on AIX

2021-11-06 Thread Irit Katriel


Change by Irit Katriel :


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



[issue45735] Promise the long-time truth that `args=list` works

2021-11-06 Thread Tim Peters


Tim Peters  added the comment:

Serhiy, we haven't documented such stuff, and, indeed, I've been burned by it 
but much more often in the case of multiprocessing.Process. But note that I'm 
SWAPPING the order of your last two lines. In the original, you mutated the 
argument _before_ starting any parallel work, so "of course" the new worker 
will see the mutation:

def access(xs):
print(xs)

args = ([1],)
t = multiprocessing.Process(target=access, args=args)
t.start() # start parallel work before mutating
args[0][0] = 2



Does that print [1] or [2]? Passing a tuple in no way prevents mutations to 
mutable objects the tuple contains.

When the docs are silent, "implementation defined" rules. Whether you use 
threading or multiprocessing in the altered example above, the result printed 
simply isn't defined - it's a race between the main thread doing the mutation 
and the "parallel part" accessing the mutated object.

This is subtler in the multiprocessing context, though, because the relevant 
"parallel part" is really the hidden thread that pickles the argument list to 
send to the worker. That effectively makes a deep copy. But it's still a race, 
just not one visible from staring at the Python code. In the threading case, no 
copies are made.

--

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-06 Thread Christian Heimes


Christian Heimes  added the comment:

GH-29441 introduces forward compatibility issues with autoconf 2.71. I took the 
output of autoupdate and resolved all warnings.

--

___
Python tracker 

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



[issue45644] Make json.tool soak up input before opening output for writing

2021-11-06 Thread Łukasz Langa

Łukasz Langa  added the comment:

This is arguably a bugfix since truncating the `infile` cannot be construed as 
a useful feature in any sense. Thus I'm inclined to backport this to 3.10.1 and 
3.9.9 too.

--
nosy: +lukasz.langa
type: enhancement -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue45740] StrEnum entry doesn't mention its introduction in 3.11

2021-11-06 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-06 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27697
pull_request: https://github.com/python/cpython/pull/29442

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-06 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27696
pull_request: https://github.com/python/cpython/pull/29441

___
Python tracker 

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



[issue35828] test_multiprocessing_fork: segmentation error in PyDict_GetItem on AIX

2021-11-06 Thread Michael Felt


Michael Felt  added the comment:

I stopped running my bot. I have no idea if this is also an issue on 3.9+

And since noone will look at this in it's present state. I'd recommend closing.

--

___
Python tracker 

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



[issue45740] StrEnum entry doesn't mention its introduction in 3.11

2021-11-06 Thread Ethan Furman


Change by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue45740] StrEnum entry doesn't mention its introduction in 3.11

2021-11-06 Thread Dutcho


New submission from Dutcho :

At https://docs.python.org/3.11/library/enum.html#enum.StrEnum no mention is 
made of 'New in version 3.11', whereas e.g. 
https://docs.python.org/3.11/library/enum.html#enum.EnumCheck does.

Note https://docs.python.org/3.11/library/enum.html#module-contents DOES 
document: 'New in version 3.11: StrEnum, EnumCheck, FlagBoundary'.

--
assignee: docs@python
components: Documentation
messages: 405863
nosy: Dutcho, docs@python
priority: normal
severity: normal
status: open
title: StrEnum entry doesn't mention its introduction in 3.11
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue45736] 2to3 does not support integer division fixing

2021-11-06 Thread theeshallnotknowethme


theeshallnotknowethme  added the comment:

When 2to3 supports integer division fixing, there would be this behaviour:

- x = 2 ** 8 / 5 / 7
+ x = 2 ** 8 // 5 // 7

Basically convert any integer division to floor division. The PR I made only 
works for constant integers, and any improvement would be appreciated.

--

___
Python tracker 

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



[issue45736] 2to3 does not support integer division fixing

2021-11-06 Thread theeshallnotknowethme


Change by theeshallnotknowethme :


--
type:  -> enhancement

___
Python tracker 

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



[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-06 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee: rhettinger -> 

___
Python tracker 

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



[issue45739] The Python implementation of Decimal does not support the "N" format

2021-11-06 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

The C implementation supports both formats "n" and "N". The Python 
implementation only supports format "n".

>>> from decimal import Decimal
>>> format(Decimal('1e100'), 'n')
'1e+100'
>>> format(Decimal('1e100'), 'N')
'1E+100'
>>> from _pydecimal import Decimal
>>> format(Decimal('1e100'), 'n')
'1e+100'
>>> format(Decimal('1e100'), 'N')
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/_pydecimal.py", line 3766, in __format__
spec = _parse_format_specifier(specifier, _localeconv=_localeconv)
   ^^^
  File "/home/serhiy/py/cpython/Lib/_pydecimal.py", line 6194, in 
_parse_format_specifier
raise ValueError("Invalid format specifier: " + format_spec)

ValueError: Invalid format specifier: N

--
components: Library (Lib)
messages: 405861
nosy: facundobatista, mark.dickinson, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: The Python implementation of Decimal does not support the "N" format
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue45737] assertLogs to optionally not disable existing handlers

2021-11-06 Thread Daniel


Change by Daniel <3dan...@hotmail.com>:


--
type:  -> enhancement

___
Python tracker 

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



[issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation

2021-11-06 Thread PEW's Corner


New submission from PEW's Corner :

When exec'ing code with an illegal character after the line continuation 
character '\', python 3.11.0a2 raises this strange exception:

  SystemError: Negative size passed to PyUnicode_New

Here's an example where '#' is the illegal character:

  exec('1,\\#\n2')

I expected the following exception (which is raised by Python 3.10.0, and also 
by Python 3.11.0a2 when using eval instead of exec, or when the string content 
is put into its own file and run as a normal script):

  SyntaxError: unexpected character after line continuation character

--
messages: 405860
nosy: pewscorner
priority: normal
severity: normal
status: open
title: 3.11 exec raises SystemError instead of SyntaxError on char after line 
continuation
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue45737] assertLogs to optionally not disable existing handlers

2021-11-06 Thread Daniel


Change by Daniel <3dan...@hotmail.com>:


--
components: +Library (Lib)
versions: +Python 3.11

___
Python tracker 

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



[issue45615] Missing test for type of error when printing traceback for non-exception

2021-11-06 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

Couple of thoughts.

1. You have to create quite complex structural "clone" of `Exception` for 
python-based `traceback`:

```python
def test_non_exception_subtype(self):
class RegularObject:
__traceback__ = None
__suppress_context__ = None
__cause__ = None
__context__ = None

def __call__(self):
return self  # we need it for `get_exception` to work

obj = RegularObject()

try:
1 / 0
except Exception as ex:
obj.__traceback__ = ex.__traceback__

err = self.get_report(obj, force=True)
self.assertIn('1 / 0', err)  # passes
```

Is it really worth it? 

2. Removing `PyExceptionInstance_Check(value)` from 
https://github.com/python/cpython/blob/main/Modules/_testcapimodule.c#L3508-L3511
 does not really help that much, because we still need to call `PyErr_Display` 
below. Which assumes `value` to be `Exception`. 

There's no correct way of calling `print_exception()` directly as far as I 
understand. It is only called in `print_exception_recursive`, which in its 
order is called from:
- `print_chained` (called recursively from `print_exception_recursive`)
- `_PyErr_Display` -> `PyErrDisplay`

So, maybe instead we should change `print_exception` to not type check `value` 
again? 

Or we can cahnge some levels above. Like `PyErrDisplay`, it can return 
`TypeError` earlier if case `value` is invalid.

What do you think? :)

--

___
Python tracker 

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



[issue45737] assertLogs to optionally not disable existing handlers

2021-11-06 Thread Daniel


New submission from Daniel <3dan...@hotmail.com>:

At the moment, assertLogs removes the handlers attached to the logger.
In general this is good, because it reduces message spamming in the test logs.
However, if the code being tested is relying on a handler to do something, then 
the test fails because the handler is being removed.
This leads to the situation that the same exact test must be run twice:
- first time within the context manager, to assert that specific messages were 
logged (using `with self.assertLogs()`)
- second time, without the assertLogs to ensure the code that uses a handler 
does the right thing

The proposal is to have `self.assertLogs()` accept a key word argument such as 
`keep_handlers=False`, which can be set to True, whenever the handlers should 
be preserved.
It would probably be also useful to add a note in the documentation that makes 
users aware that the existing handlers will be removed.

--
messages: 405858
nosy: dandiez
priority: normal
severity: normal
status: open
title: assertLogs to optionally not disable existing handlers
versions: Python 3.10, 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



[issue45736] 2to3 does not support integer division fixing

2021-11-06 Thread theeshallnotknowethme


Change by theeshallnotknowethme :


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

___
Python tracker 

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



[issue45736] 2to3 does not support integer division fixing

2021-11-06 Thread theeshallnotknowethme


New submission from theeshallnotknowethme :

Right now, 2to3 does not support integer division fixing. Supposing `test.py` 
is a file with these contents:
x = 2 ** 8 / 5 / 7

Here's an example:
C:\Users\admin> py -m lib2to3 test.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: No files need to be modified.

--
components: 2to3 (2.x to 3.x conversion tool), Library (Lib)
messages: 405857
nosy: February291948
priority: normal
severity: normal
status: open
title: 2to3 does not support integer division fixing
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



[issue45719] SubProcess stdin.flush freezes when running python interpreter

2021-11-06 Thread Eryk Sun


Eryk Sun  added the comment:

Interactive mode isn't automatically enabled when stdin isn't a tty, so the 
interpreter tries to read all of stdin, until the result is empty (i.e. EOF). 
You can force interactive mode with the -i command-line option. The example 
would also benefit from passing bufsize=0 to Popen, since full buffering on 
either the child side or parent side of the pipe prevents interactive I/O. 
Finally, input statements have to end with a newline character since the 
interpreter reads input in lines.

Here's a toy example that interacts with a REPL in a child process. Note that 
spawn_repl() sets the sys.ps1 prompt in the child to a string that ends with a 
newline. This allows iterating over the lines in p.stdout up to the REPL 
prompt. Also, spawn_repl() forces UTF-8 mode in order to reliably support 
Unicode. Otherwise text support in Windows is limited to the ANSI code page.

import subprocess

def _write_input(p, input):
if not input.endswith('\n'):
input += '\n'
p.stdin.write(input)

def _read_output(p):
lines = []
for line in p.stdout:
if line.endswith(p._ps1):
break
lines.append(line)
return lines

def eval_remote(p, input):
if not hasattr(p, '_ps1'):
raise ValueError('p._ps1 prompt not defined; use p = spawn_repl()')
_write_input(p, input)
return _read_output(p)

def spawn_repl():
p = subprocess.Popen(
['python', '-i', '-q', '-X utf8'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
bufsize=0, encoding='utf-8')
p._ps1 = f'\n'
eval_remote(p, f'import sys; sys.ps1="\\n"')
return p

For example:

>>> p = spawn_repl()
>>> eval_remote(p, 'double = lambda x: 2 * x')
[]
>>> eval_remote(p, 'double(2)')
['4\n']
>>> eval_remote(p, 'print("spam\\neggs")')
['spam\n', 'eggs\n']

--
nosy: +eryksun

___
Python tracker 

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



[issue45392] docstring of "type" could use an update

2021-11-06 Thread Mark Dickinson


Change by Mark Dickinson :


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

___
Python tracker 

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



[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-06 Thread Mark Dickinson


Mark Dickinson  added the comment:

> It looks like quite similar changes have already been made: 

Yes, I think this isn't something that needs to be resolved for this issue, but 
it is something we need to think about. (Though perhaps the resolution is just 
"Don't worry about it until we need to.")

> I will send a PR, so we can see what exactly it touches / changes.

Ah, sorry; I already made one before reading your message. I'd be happy to get 
your input on that PR, though. (Or to review a PR from you.)

--

___
Python tracker 

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



[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-06 Thread Mark Dickinson


Change by Mark Dickinson :


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

___
Python tracker 

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



[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-06 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

> We do need to think about the implications of making local changes to our 
> copy of the externally-maintained libmpdec library, though.

It looks like quite similar changes have already been made: 
https://github.com/python/cpython/commit/298131a44896a4fec1ea829814ad52409d59aba5

I will send a PR, so we can see what exactly it touches / changes.

--

___
Python tracker 

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



[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-06 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution: duplicate -> 
stage: resolved -> 
status: closed -> open
superseder: Add underscore as a decimal separator for string formatting -> 

___
Python tracker 

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



[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-06 Thread Mark Dickinson


Mark Dickinson  added the comment:

Serhiy: this is not a duplicate of #43624. That issue is about underscores in 
the *fractional* part of a (float / complex / Decimal) number, and the changes 
to the formatting mini-language syntax that would be necessary to support that. 
This issue is simply about bringing Decimal into line with int and float and 
allowing inclusion of underscores in the *integral* part of the formatted 
result.

Raymond: the "General Decimal Arithmetic" specification that the decimal module 
is based on isn't relevant here. It has nothing to say on the subject of 
formatting. We moved beyond the specification the moment we allowed 
`format(some_decimal, 'f')`, let alone `format(some_decimal, '.3f')` or 
`format(some_decimal, ',')`.

As Sander Bollen noted, we've already added ","-form thousands separators to 
Decimal formatting. I can't see any good reason for supporting "," but not 
supporting "_" as a thousands separator for Decimal.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue45731] Handle --enable-loadable-sqlite-extensions in configure

2021-11-06 Thread Christian Heimes


Change by Christian Heimes :


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



[issue45731] Handle --enable-loadable-sqlite-extensions in configure

2021-11-06 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset e9594f6747e848c26e2bf67d467aabfd62b3 by Christian Heimes in 
branch 'main':
bpo-45731: Handle --enable-loadable-sqlite-extensions in configure (GH-29434)
https://github.com/python/cpython/commit/e9594f6747e848c26e2bf67d467aabfd62b3


--

___
Python tracker 

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



[issue45735] Promise the long-time truth that `args=list` works

2021-11-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There is a difference if you modify the arguments list after creating a thread.

args = [1]
t = threading.Thread(target=access, args=args)
args[0] = 2
t.start()

Would it call access(1) or access(2)?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45684] `functools.singledispatchmethod` does not define `__class_getitem__`

2021-11-06 Thread Alex Waygood


Alex Waygood  added the comment:

^ I posted the wrong link for the example; it should have been: 
https://mypy-play.net/?mypy=latest=3.10=show-error-codes%2Cstrict=6a26d31899f9803a823662261eae21df

--

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-11-06 Thread Irit Katriel

Irit Katriel  added the comment:

Initially not, neither in python nor in the c api.

It would be nice to replace PyErr_Fetch/Restore by a version that takes just an 
exception but that’s a long deprecation.

--

___
Python tracker 

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



[issue45710] Junction/symbolic folder access error on Windows 11

2021-11-06 Thread Eryk Sun


Eryk Sun  added the comment:

> does this or does this not look to you like a bug in CPython?

It's better to leave the detailed explanation of limits up to the document 
that's referenced for further information [1], but this issue isn't even 
briefly mentioned there. Maybe it would help some people to mention the store 
package's [2] limitation on using reparse points in "%UserProfile%\AppData", 
but this is the first I've seen of this issue, and I hadn't even considered the 
problem beforehand. I don't see why it would ever be necessary to use a 
cross-volume reparse point in the application-data tree.

Also, maybe this is a bug in the operation system that could get fixed in the 
future. It could be unintended behavior in the filesystem filter that 
virtualizes access to "%UserProfile%\AppData". Maybe someone used a target 
device hint as a convenience in the design, without thinking about how it would 
limit the resolution of reparse points. 

---
[1] 
https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes
[2] https://docs.python.org/3.10/using/windows.html#the-microsoft-store-package

--

___
Python tracker 

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