[issue44234] Debugging with LLDB doesn't work for universal2 installer on macOS Big Sur

2021-05-26 Thread Ned Deily


Ned Deily  added the comment:

There's a reason for that. What the discussion in that link fails to note is 
that elsewhere Apple warns that that entitlement is understandably prohibited 
in distributions submitted to the Apple notarization service. See the "Avoid 
the Get-Task-Allow Entitlement" section here: 
https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues.
 I haven't verified that that is still the case but I'd be surprised if it 
weren't.

I think one solution (and possibly the best) might be to manually re-codesign 
the installed binaries if you need to use lldb with the python.org binaries. If 
someone comes up with something that works, we could document it somewhere with 
appropriate warnings about security risks and advice to reinstall when finished.

--

___
Python tracker 

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



[issue44229] Intermittent connection errors in ssl tests on macOS CI

2021-05-26 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

New failure in CI: 
https://github.com/python/cpython/runs/2669949777?check_suite_focus=true

==
ERROR: test_msg_callback_deadlock_bpo43577 (test.test_ssl.TestSSLDebug)
--
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/test/test_ssl.py", line 4813, in 
test_msg_callback_deadlock_bpo43577
s.connect((HOST, server.port))
  File "/Users/runner/work/cpython/cpython/Lib/ssl.py", line 1372, in connect
self._real_connect(addr, False)
  File "/Users/runner/work/cpython/cpython/Lib/ssl.py", line 1359, in 
_real_connect
super().connect(addr)
ConnectionRefusedError: [Errno 61] Connection refused

--
title: test_get_server_certificate fails intermittently on macOS -> 
Intermittent connection errors in ssl tests on macOS CI

___
Python tracker 

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



[issue44229] Intermittent connection errors in ssl tests on macOS CI

2021-05-26 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Build info for macOS CI attached.

--
Added file: https://bugs.python.org/file50063/5_Display build info.txt

___
Python tracker 

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



[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-05-26 Thread Inada Naoki


Inada Naoki  added the comment:

> What about normal sets?

pyc files don't contain a regular set. So it is out of scope of this issue.

--
nosy: +methane

___
Python tracker 

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



[issue44238] Unable to install Python 3.9.5 - Windows Server

2021-05-26 Thread Ricardo Daniel Fuentes


New submission from Ricardo Daniel Fuentes :

Hi,

I am Admin of a Windows Server 2012 R2, I have installed successfully Python 
3.9.5 (64-bit) however I cannot uninstall it, I get the error: "0x80070659 - 
The installation is forbidden by system policy. Contact your system 
administrator"

I don't have any software system policies defined on this server so this could 
be a Python bug.

attached the log.

Regards,
Ricardo

--
components: Installation
files: Python 3.9.5 (64-bit)_20210526084254.txt
messages: 394421
nosy: RFuentes
priority: normal
severity: normal
status: open
title: Unable to install Python 3.9.5 - Windows Server
versions: Python 3.9
Added file: https://bugs.python.org/file50064/Python 3.9.5 
(64-bit)_20210526084254.txt

___
Python tracker 

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



[issue44238] Unable to install Python 3.9.5 - Windows Server

2021-05-26 Thread Ricardo Daniel Fuentes


Change by Ricardo Daniel Fuentes :


--
type:  -> behavior

___
Python tracker 

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



[issue37903] IDLE Shell sidebar.

2021-05-26 Thread Tal Einat


Tal Einat  added the comment:

> For teaching purposes in live demos, it is essential to have a clear visual 
> distinction between the inputs and outputs:
>
> >>> beatles = ['john', 'paul', 'ringo', 'george']
> >>> [name.capitalize() for name in beatles]
> ['John', 'Paul', 'Ringo', 'George']
> >>> [name for name in beatles if 'n' in name]
> ['john', 'ringo']

Thanks for bringing this up. Lack of clear separation of inputs and outputs 
could be considered a drawback of putting prompts in a sidebar. 

Considering that the prompts *are not part of the code*, I do believe 
separating them more clearly is a benefit.  To support this, consider that in 
Jupyter notebooks, the prompts are also placed in a graphically-separated area 
to the left of both input and output "cells".

Also, do note that IDLE colors outputs differently from inputs, which helps 
differentiate them from inputs very clearly IMO.  Therefore, the examples in 
messages posted here are lacking in this regard.  For context, I'm attaching an 
image with screenshots before and after the change to use a sidebar.

Also, consider that previously, separation of outputs from inputs was not great 
for multi-line statements, as indentation was inconsistent and more vertical 
space was used:

>>> if True:
print('Foo')
else:
print('Bar')


Foo


I think that moving prompts into a sidebar is an improvement in this regard:

>>>| if True:
...|print('Foo')
...| else:
...|print('Bar')
...| 
   | Foo


Taking these three points together, I the sidebar clearly improves the 
separation of prompts from actual code, and the differentiation of outputs from 
inputs does not seem much worse, and is arguably overall better.

--
Added file: https://bugs.python.org/file50065/IDLE shell befoe and after 
sidebar.png

___
Python tracker 

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



[issue37903] IDLE Shell sidebar.

2021-05-26 Thread Tal Einat


Tal Einat  added the comment:

For a wider context, besides the default REPL, I also consider two other 
leading REPLs: ipython and Jupyter notebooks.  They both also have clear 
separation of outputs from inputs, though in different ways than the standard 
REPL.


ipython retains similar behavior to the standard REPL in this regard, replacing 
the '>>>' prompts with "In [1]:", "In [2]:" etc.  It also prefixes outputs of 
statements with e.g. "Out[2]:", but not outputs written to stdout.  And it has 
additional vertical spacing between commands.

Here is a short example session:

Python 3.8.5 (default, Jan 27 2021, 15:41:15) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: if True:
   ...: print('Foo')
   ...: 
Foo

In [2]: beatles = ['john', 'paul', 'ringo', 'george']

In [3]: [name.capitalize() for name in beatles]
Out[3]: ['John', 'Paul', 'Ringo', 'George']


Jupyter notebooks are a different beast since their interface is browser-based 
rather than terminal-based, and they take more advantage of non-text graphical 
elements than IDLE's shell.  Inputs are done in "cells", which may contain 
multiple statements, and each cell its own output.  These cells are clearly 
visually separate from each other.  I've attached a screenshot of a similar 
Python 3 session in a Jupyter notebook for comparison.


Indeed, both the ipython REPL and Jupyter notebooks go further than the default 
REPL in differentiating outputs from inputs, using different methods.

--
Added file: https://bugs.python.org/file50066/Jupyter Notebook Example 
Session.png

___
Python tracker 

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



[issue37903] IDLE Shell sidebar.

2021-05-26 Thread Tal Einat


Tal Einat  added the comment:

> Another desirable feature is the ability to cut and paste snippets into 
> docstrings.  This is essential not just for doctest, but even for untested 
> examples in docstrings.
> Those examples, need to be recognizable to humans as interactive sessions 
> with outputs clearly distinguished from inputs.  When I tried out the new 
> sidebar in prep for a class, it was impossible to include the ps1 prompts in 
> a cut and paste selection.  They had to be manually typed back in.

This is no longer the case.  In a quick followup PR, which has been merged for 
some time now, we added a context-menu option "Copy with prompts" which results 
in code samples directly usable for doctests and code samples.

--

___
Python tracker 

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



[issue37903] IDLE Shell sidebar.

2021-05-26 Thread Tal Einat


Tal Einat  added the comment:

> Lastly, for live demos in presentations, it is desirable to have a clear 
> screen, free of distracting artifacts.  The sidebar is such an artifact -- 
> you would never see such a thing in a book or slide presentation.  Also, for 
> live demos, large fonts are necessary which means that screen space is at a 
> premium and the loss of horizontal space matters.

I am not sure I agree with the strength with which you state "you would never 
see such a thing in a book or slide presentation".  With Jupyter notebooks 
being very prevalent these days, samples very often include the non-code visual 
artifacts native to that format.  Arguably, the *prompts* are a distracting 
visual artifact; the ability to cut them out of screenshots from Jupyter 
notebooks thanks to the clearer separation of cells and their inputs and 
outputs is indeed a boon, and we could consider whether we can do something 
similar for IDLE.

As for lost vertical space, that is indeed at a premium for books and 
presentations.  However, ipython significantly increases the vertical spacing 
to the left of code inputs and non-stdout outputs compared to the standard 
Python REPL and IDLE.  And the sidebar adds 3.5 characters' width only for 
outputs, which can be avoided when it's truly crucial using the "Copy with 
prompts" feature.  Overall, considering the benefits, this seems like a 
relatively minor drawback.

--

___
Python tracker 

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



[issue44232] Crash in Objects/typeobject.c

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7b3b6982a5683f5146ede58a448d3edb777e501b by Miss Islington (bot) 
in branch '3.10':
bpo-44232: Fix type_new() error reporting (GH-26359) (GH-26365)
https://github.com/python/cpython/commit/7b3b6982a5683f5146ede58a448d3edb777e501b


--

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-26 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +24968
pull_request: https://github.com/python/cpython/pull/26376

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-26 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

I've opened PR's to fix most of the heap types converted during the 3.10 alpha 
phase. What's missing (of the 3.10 batch) is:
- _thread types (this needs special care)
- winapi__overlapped.Overlapped (I currently don't have a Win dev env at hand)

For the types converted during 3.9 dev, should we backport to 3.9 or just 3.10?

--

___
Python tracker 

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



[issue44232] Crash in Objects/typeobject.c

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, it's now fixed in 3.10 and main branches. Thanks for the bug report, and 
thanks Ken Jin for your PR ;-)

--
priority: release blocker -> 
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



[issue44238] Unable to install Python 3.9.5 - Windows Server

2021-05-26 Thread Christian Heimes


Change by Christian Heimes :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue44239] Use platform defined data directories instead of ~/.python_history

2021-05-26 Thread oxalica


New submission from oxalica :

Currently we use path `~/.python_history` for history file in all platforms.
It is not a good choice since it spams in user's home directory.

There are already specifications for where to store program data.
For Windows, we should use `%APPDATA%/Python/history`;
for Mac OS, we should use `~/Library/Application Support/Python/history`;
for other POSIX platforms, we should use `$XDG_DATA_HOME/python/history` or 
`~/.local/share/python/history` according to XDG Spec.

These paths should be preferred as default. But we can also check and use 
`~/.python_history` if it exists and readable, for compatibility.

--
components: Library (Lib)
messages: 394429
nosy: oxalica
priority: normal
severity: normal
status: open
title: Use platform defined data directories instead of ~/.python_history
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



[issue37903] IDLE Shell sidebar.

2021-05-26 Thread Tal Einat


Tal Einat  added the comment:

> Other bug reports and feature requests that matter to us don't appear to be 
> getting any traction:

I'll start going through those, and see if I can fix some of the bugs on that 
list.

A few notes:

> Need an option to run the install-certificates script

Are you suggesting that we add a way to do this directly from IDLE?

> Sometimes the Search Dialog window becomes unresponsive and there is no way 
> to clear it without turning IDLE off.

Is there an open issue about this? Details would be helpful.

> Several of these issues have only came-up in the past few years.  IDLE used 
> to be more stable than it is now.

This may be true, and at least partially due to a continuous need to fix things 
broken by various OS and Tcl/Tk changes.

> For mac users who have enabled tabs system-wide, opening a new window in IDLE 
> triggers a system log-out (amazing that this is even possible).  My 
> understanding is there isn't anything we can do about this, but it is a 
> really bad out-of-the-box user experience seconds after a fresh install of 
> Python.

This is a prime example of the above: macOS changes + Tcl/Tk issues with those 
mean we are often very limited in our ability to properly address such issues.  
FWIW we added a warning in the IDLE shell about running with that OS option 
enabled, see bpo-34864 and PR GH-10464.  I wasn't aware of such crashes; is 
there an issue about them?

> Being able to run pip from within IDLE would be a major win, especially for 
> Windows users who are foreign to the command-line and who often do have 
> Python on the PATH.

I agree!  This needs to be properly designed and would be far from trivial to 
implement and test.  If an issue about this exists or would be created, I'd be 
happy to help move it forward.

--

___
Python tracker 

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



[issue44239] Use platform defined data directories instead of ~/.python_history

2021-05-26 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +24969
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26377

___
Python tracker 

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



[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-05-26 Thread Filipe Laíns

Filipe Laíns  added the comment:

Ah, my bad! Though, thinking about it, it does make sense. If that's the case, 
then the argument Raymond provided against preserving order does not seem that 
relevant, as we would only need to preserve the order in the creation 
operation. What do you think? Is there anything I may be missing here? :)

--

___
Python tracker 

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



[issue44235] Remove l*gettext() and related functions in the gettext module

2021-05-26 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue41830] "NameError: name 'AttributeError' is not defined"

2021-05-26 Thread Irit Katriel


Irit Katriel  added the comment:

Sanka, please create a new issue if you can provide more info about the problem.

--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue21251] Standard library trace module crashes with exception

2021-05-26 Thread Irit Katriel


Irit Katriel  added the comment:

Martin, please create a new issue if this is still a problem in Python 3.

--
resolution:  -> out of date
stage: needs patch -> resolved
status: pending -> closed

___
Python tracker 

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



[issue27521] Misleading compress level header on files created with gzip

2021-05-26 Thread Irit Katriel


Change by Irit Katriel :


--
stage: test needed -> resolved
status: pending -> closed

___
Python tracker 

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



[issue37555] _CallList.__contains__ doesn't always respect ANY.

2021-05-26 Thread Irit Katriel


Change by Irit Katriel :


--
stage: patch review -> resolved
status: pending -> closed

___
Python tracker 

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



[issue44031] test_embed and test_tabnanny fails if the current directory is non-ASCII

2021-05-26 Thread STINNER Victor

STINNER Victor  added the comment:

Ah, I can reproduce the issue if the Python directory contains Загрузки, like:
/home/vstinner/Downloads/Загрузки/Python-3.9.5

--
title: python3.8.9, python3.9.2 test_embed test_tabnanny failed -> test_embed 
and test_tabnanny fails if the current directory is non-ASCII

___
Python tracker 

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



[issue41147] Document that redirect_std{out, err} yield the new stream as the context variable

2021-05-26 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue41147] Document that redirect_std{out, err} yield the new stream as the context variable

2021-05-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24972
pull_request: https://github.com/python/cpython/pull/26380

___
Python tracker 

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



[issue41147] Document that redirect_std{out, err} yield the new stream as the context variable

2021-05-26 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 46db39d7bd67fb9fea133cd4f18cdf7eacb0f6d9 by Peter Law in branch 
'main':
bpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as 
context var (GH-21199)
https://github.com/python/cpython/commit/46db39d7bd67fb9fea133cd4f18cdf7eacb0f6d9


--
nosy: +iritkatriel

___
Python tracker 

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



[issue43988] Add test.support.assert_dissallow_instantiation

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4f725261c6cf23d259e8fdc205e12b76ef4d2d31 by Erlend Egeberg 
Aasland in branch 'main':
bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757)
https://github.com/python/cpython/commit/4f725261c6cf23d259e8fdc205e12b76ef4d2d31


--

___
Python tracker 

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



[issue41147] Document that redirect_std{out, err} yield the new stream as the context variable

2021-05-26 Thread Irit Katriel


Change by Irit Katriel :


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



[issue41147] Document that redirect_std{out, err} yield the new stream as the context variable

2021-05-26 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 1261941e02cd04829592b1b1360b4ec21bfcdb9a by Miss Islington (bot) 
in branch '3.10':
bpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as 
context var (GH-21199) (GH-26379)
https://github.com/python/cpython/commit/1261941e02cd04829592b1b1360b4ec21bfcdb9a


--

___
Python tracker 

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



[issue43879] Add native_thread_id to PyThreadState

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 90a6c07cb20114dda801f027a90df839225751cb by Gabriele N. Tornetta 
in branch 'main':
bpo-43879: Add native_thread_id field to PyThreadState (GH-25458)
https://github.com/python/cpython/commit/90a6c07cb20114dda801f027a90df839225751cb


--
nosy: +vstinner

___
Python tracker 

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



[issue43879] Add native_thread_id to PyThreadState

2021-05-26 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue41147] Document that redirect_std{out, err} yield the new stream as the context variable

2021-05-26 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset bee66d3cb98e740f9d8057eb7f503122052ca5d8 by Miss Islington (bot) 
in branch '3.9':
bpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as 
context var (GH-21199) (GH-26380)
https://github.com/python/cpython/commit/bee66d3cb98e740f9d8057eb7f503122052ca5d8


--

___
Python tracker 

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



[issue41147] Document that redirect_std{out, err} yield the new stream as the context variable

2021-05-26 Thread Irit Katriel


Irit Katriel  added the comment:

Thank you Peter!

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



[issue44234] Debugging with LLDB doesn't work for universal2 installer on macOS Big Sur

2021-05-26 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Should we add documentation about this? 

The truly annoying bit about that discussion is that its probably easier to 
just install gdb and use that to debug extensions.

--

___
Python tracker 

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



[issue44240] Incorrect behavior of LOAD_ATTR due to overflow in tp_version

2021-05-26 Thread Mark Shannon


New submission from Mark Shannon :

Should the tp_version overflow, and wrap around to a value previously used in 
the opcache for LOAD_ATTR, then LOAD_ATTR could produce the wrong value.

It will take a fair bit of contrivance and a long time to do this, but it is 
possible:
Run some code ~2000 times to get the version cached.
Change an attibute of the type about 4 billion times.
Rerun the original code.



Invalidating all the opcaches is going to be a huge pain, so I propose not 
allowing the version to overflow but partitioning the 32 bit space something 
like this:

Top 20 bits: Unique per-class ID, 0 and 0xF are reserved.
Low 12 bits: Per-class version.

tp_version == 0 that no version has been assigned to this class, as yet.
(tp_version & 0xFFF) == 0 means that the version tag is temporarily invalid
tp_version == 0x means that the version tag is permanently invalid

If (tp_version & 0xFFF) != 0 and tp_version != 0x, then the combined 32 
bits represents a unique tag of the class's state as it does now.

Should the low bits of a class hit 0xFFF then all 32 bits are set to 
0x, and we can't cache its version any more.
If a class has been changed a 1000 times, then there is unlikely to be much 
value in caching it anyway.

--
components: Interpreter Core
messages: 394442
nosy: Mark.Shannon, pablogsal
priority: normal
severity: normal
stage: needs patch
status: open
title: Incorrect behavior of LOAD_ATTR  due to overflow in tp_version
type: behavior
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-26 Thread Ken Jin


Change by Ken Jin :


--
nosy: +kj
nosy_count: 8.0 -> 9.0
pull_requests: +24973
pull_request: https://github.com/python/cpython/pull/26381

___
Python tracker 

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



[issue44240] Incorrect behavior of LOAD_ATTR due to overflow in tp_version

2021-05-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

But wait, in the case of an overflow, the values of the tags would be different 
than the one stored, triggering a cache miss. What I am missing?

--

___
Python tracker 

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



[issue44240] Incorrect behavior of LOAD_ATTR due to overflow in tp_version

2021-05-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Oh, right, it will load and old value from the cache.

--

___
Python tracker 

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



[issue44240] Incorrect behavior of LOAD_ATTR due to overflow in tp_version

2021-05-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I mean, the possibilities are even more remote because not only this needs to 
overflow but the lookup has to be done at exactly the old value.

--

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-26 Thread Ken Jin


Ken Jin  added the comment:

_winapi is leaky still even with my PR:

>>> import sys,gc
>>> for _ in range(5):
...  print(sys.gettotalrefcount())
...  import _winapi
...  del sys.modules['_winapi']
...  del _winapi
...  gc.collect()
...
50468
51076
51432
51788
52144

I just noticed this, but _winapi doesn't have a m_traverse/m_clear/m_free in 
the PyModuleDef eventhough it creates nearly 100 objects in 
m_slot->Py_mod_exec. I'm not a multi phase init expert, but shouldn't there be 
a cleanup function or am I confusing something here :( ?

--

___
Python tracker 

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



[issue44240] Incorrect behavior of LOAD_ATTR due to overflow in tp_version

2021-05-26 Thread Mark Shannon


Mark Shannon  added the comment:

It is extremely unlikely, I agree. But not impossible.

I plan to fix it for 3.11. Once I've done that we can decide if backports are 
worth it.

--

___
Python tracker 

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



[issue44240] Incorrect behavior of LOAD_ATTR due to overflow in tp_version

2021-05-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I wonder what other stuff can break due to this. I agree we should fix it, but 
also we need to consider how crazy is the solution because I'm not sure if this 
justifies a very complex one.

As an alternative idea, we could use th max allowed value as an "overflowed" 
status, which invalidates anything that is using the tag.

--

___
Python tracker 

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



[issue44241] Sync importlib_metadata enhancements through 4.1.

2021-05-26 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
components: Library (Lib)
nosy: jaraco
priority: normal
severity: normal
status: open
title: Sync importlib_metadata enhancements through 4.1.
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



[issue44241] Sync importlib_metadata enhancements through 4.1.

2021-05-26 Thread Jason R. Coombs


New submission from Jason R. Coombs :

Importlib_metadata 4.1.0 made some minor tweaks. Let's sync those.

--

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-26 Thread Ken Jin


Ken Jin  added the comment:

> it creates nearly 100 objects

Oops sorry I think I'm wrong. most of those objects may be borrowed refs. Just 
1 type object is causing the leak.

--

___
Python tracker 

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



[issue44241] Sync importlib_metadata enhancements through 4.1.

2021-05-26 Thread Jason R. Coombs


Change by Jason R. Coombs :


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

___
Python tracker 

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



[issue38693] Use f-strings instead of str.format within importlib

2021-05-26 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
nosy: +jaraco
nosy_count: 6.0 -> 7.0
pull_requests: +24975
pull_request: https://github.com/python/cpython/pull/26383

___
Python tracker 

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



[issue44241] Sync importlib_metadata enhancements through 4.1.

2021-05-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +24976
pull_request: https://github.com/python/cpython/pull/26384

___
Python tracker 

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



[issue44241] Sync importlib_metadata enhancements through 4.1.

2021-05-26 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 06ac3a4742228b0230981720060248a7425b2486 by Jason R. Coombs in 
branch 'main':
bpo-44241: Incorporate changes from importlib_metadata 4.1. (#26382)
https://github.com/python/cpython/commit/06ac3a4742228b0230981720060248a7425b2486


--

___
Python tracker 

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



[issue1717] Get rid of more references to __cmp__

2021-05-26 Thread Nils Kattenbeck


Nils Kattenbeck  added the comment:

Has there been any resolution regarding `sortTestMethodsUsing`? See 
https://bugs.python.org/msg77261

I spend a decent time and read the documentation thrice before realizing it 
received an old-style compare function. Brett's proposal for a new attribute 
seems like a sane way to do this without breaking backwards compatibility. Or 
will this continue using an old-style compare function for the foreseeable 
future?

--
nosy: +Nils Kattenbeck

___
Python tracker 

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



[issue39798] Update and Improve README.AIX

2021-05-26 Thread Ayush Parikh


Change by Ayush Parikh :


--
keywords: +patch
nosy: +ayush332
nosy_count: 3.0 -> 4.0
pull_requests: +24977
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26385

___
Python tracker 

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



[issue12731] python lib re uses obsolete sense of \w in full violation of UTS#18 RL1.2a

2021-05-26 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
stage: test needed -> needs patch
versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue38693] Use f-strings instead of str.format within importlib

2021-05-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +24978
pull_request: https://github.com/python/cpython/pull/26386

___
Python tracker 

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



[issue38693] Use f-strings instead of str.format within importlib

2021-05-26 Thread miss-islington


miss-islington  added the comment:


New changeset e6c815d2e34be5fdf6dbe773f0781691746d2289 by Jason R. Coombs in 
branch 'main':
bpo-38693: importlib.metadata f-strings (GH-26383)
https://github.com/python/cpython/commit/e6c815d2e34be5fdf6dbe773f0781691746d2289


--

___
Python tracker 

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



[issue38693] Use f-strings instead of str.format within importlib

2021-05-26 Thread miss-islington


miss-islington  added the comment:


New changeset 78a8428548445b501f5ebd6ff4647d93ffd8efd1 by Miss Islington (bot) 
in branch '3.10':
bpo-38693: importlib.metadata f-strings (GH-26383)
https://github.com/python/cpython/commit/78a8428548445b501f5ebd6ff4647d93ffd8efd1


--

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-26 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 6cc800d3634fdd002b986c3ffe6a3d5540f311a0 by Eric Snow in branch 
'main':
bpo-43693: Clean up the PyCodeObject fields. (GH-26364)
https://github.com/python/cpython/commit/6cc800d3634fdd002b986c3ffe6a3d5540f311a0


--

___
Python tracker 

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



[issue2771] Test issue

2021-05-26 Thread Ee W. Durbin III


Change by Ee W. Durbin III :


--
status: closed -> open
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue2771] Test issue

2021-05-26 Thread Ee W. Durbin III


Change by Ee W. Durbin III :


--
status: open -> closed
versions: +Python 3.9 -Python 3.10

___
Python tracker 

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



[issue2771] Test issue

2021-05-26 Thread Ee W. Durbin III


Ee W. Durbin III  added the comment:

Test IRC

--
status: closed -> open

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Miro Hrončok

New submission from Miro Hrončok :

With the change introduced in https://bugs.python.org/issue38250 
https://github.com/python/cpython/commit/7aaeb2a3d682ecba125c33511e4b4796021d2f82
 I observe a regression in behavior of enum.IntFlag with missing values.

Consider this code (from pyproj):

from enum import IntFlag

class GeodIntermediateFlag(IntFlag):
DEFAULT = 0x0

NPTS_MASK = 0xF
NPTS_ROUND = 0x0
NPTS_CEIL = 0x1
NPTS_TRUNC = 0x2
 
DEL_S_MASK = 0xF0
DEL_S_RECALC = 0x00
DEL_S_NO_RECALC = 0x10
  
AZIS_MASK = 0xF00
AZIS_DISCARD = 0x000
AZIS_KEEP = 0x100

This is a valid code in Python 3.9, however produces a TypeError in Python 
3.10.0b1:

Traceback (most recent call last):
  File "intflag.py", line 3, in 
class GeodIntermediateFlag(IntFlag):
  File "/usr/lib64/python3.10/enum.py", line 544, in __new__
raise TypeError(
TypeError: invalid Flag 'GeodIntermediateFlag' -- missing values: 4, 8, 32, 
64, 128, 512, 1024, 2048


Since I don't see this behavior mentioned in 
https://docs.python.org/3.10/library/enum.html or 
https://docs.python.org/3.10/whatsnew/3.10.html or 
https://docs.python.org/3.10/whatsnew/changelog.html I believe this is a 
regression.

--
components: Library (Lib)
messages: 394457
nosy: John Belmonte, Manjusaka, ethan.furman, hauntsaninja, hroncok, jbelmonte, 
veky
priority: normal
severity: normal
status: open
title: enum.IntFlag regression: missing values cause TypeError
type: behavior
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



[issue38250] enum.Flag should be more set-like

2021-05-26 Thread Miro Hrončok

Miro Hrončok  added the comment:

I've reported https://bugs.python.org/issue44242 because I believe there is a 
regression in this change.

--
nosy: +hroncok

___
Python tracker 

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



[issue1717] Get rid of more references to __cmp__

2021-05-26 Thread Brett Cannon


Brett Cannon  added the comment:

> Has there been any resolution regarding `sortTestMethodsUsing`?

My suspicion is if the docs don't suggest there's something else then nothing 
has been changed.

--

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ned Deily


Change by Ned Deily :


--
nosy: +pablogsal

___
Python tracker 

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



[issue33693] test test_webbrowser failed

2021-05-26 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
nosy: +jaraco
nosy_count: 3.0 -> 4.0
pull_requests: +24979
pull_request: https://github.com/python/cpython/pull/26387

___
Python tracker 

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



[issue38693] Use f-strings instead of str.format within importlib

2021-05-26 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +24980
pull_request: https://github.com/python/cpython/pull/26387

___
Python tracker 

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



[issue33693] test test_webbrowser failed

2021-05-26 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests:  -24979

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-26 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +24981
pull_request: https://github.com/python/cpython/pull/26388

___
Python tracker 

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



[issue38693] Use f-strings instead of str.format within importlib

2021-05-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24982
pull_request: https://github.com/python/cpython/pull/26389

___
Python tracker 

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



[issue38693] Use f-strings instead of str.format within importlib

2021-05-26 Thread miss-islington


miss-islington  added the comment:


New changeset f6fbdb90ee450ad693f7a7809035d0dc968f98b7 by Jason R. Coombs in 
branch 'main':
bpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6). 
(GH-26387)
https://github.com/python/cpython/commit/f6fbdb90ee450ad693f7a7809035d0dc968f98b7


--
message_count: 7.0 -> 8.0
pull_requests: +24982
pull_request: https://github.com/python/cpython/pull/26389

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

We are already blocked in Python 3.10 beta 2, Ethan, could you give a look at 
this so we can introduce the fix when we release the next beta?

--

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-26 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2021-05-26 Thread Nils Kattenbeck


Nils Kattenbeck  added the comment:

While the proposal linked by C.A.M. solves one of the use cases but it does not 
address the others.

One use cases which is rather common for me it is e.g. to have scripts/programs 
which allow configuring whether temporary directories should get deleted or 
stay persistent after program exit.
Currently this always requires hand rolled wrappers like the following:

def mkdtemp_persistent(*args, persistent=True, **kwargs):
if persistent:
@contextmanager
def normal_mkdtemp():
yield tempfile.mkdtemp()
return normal_mkdtemp(*args, **kwargs)
else:
return tempfile.TemporaryDirectory(*args, **kwargs)

with mkdtemp_persistent(persistent=False) as dir:
...

Which gets the job done but is not as user friendly as other parts of the 
stdlib.

--
nosy: +Nils Kattenbeck

___
Python tracker 

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



[issue38693] Use f-strings instead of str.format within importlib

2021-05-26 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 97b4576f655c09e32d2cbcdcdbda72b1bf9f438a by Miss Islington (bot) 
in branch '3.10':
bpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6). 
(GH-26387) (#26389)
https://github.com/python/cpython/commit/97b4576f655c09e32d2cbcdcdbda72b1bf9f438a


--

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman


Ethan Furman  added the comment:

That is an intentional change.  The cause is that the masks include bits that 
are not named in the Flag.

The user-side fix is to add a `boundary=KEEP` option to the flag:

class GeodIntermediateFlag(IntFlag, boundary=KEEP)

The enum library fix could be one of two things:

- automatically use the KEEP boundary when these conditions arise, and issue a 
DeprecationWarning; or

- lose that particular check.

I'm inclined to go with option 2, since `boundary` is designed to answer the 
question of what to do when Flag.A | Flag.B does not exist in Flag.

--

___
Python tracker 

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



[issue43001] python3.8.9, python3.9.2 test_embed test_tabnanny failed

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

Duplicate of bpo-44031.

--
resolution: out of date -> duplicate
superseder:  -> test_embed and test_tabnanny fails if the current directory is 
non-ASCII

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread John Belmonte


John Belmonte  added the comment:

To clarify, it's caused by these mask entries in the enum:

NPTS_MASK = 0xF
DEL_S_MASK = 0xF0
AZIS_MASK = 0xF00

Since the masks are not an aggregation of individual bits defined in the enum, 
it's an error.

> I'm inclined to go with [removing the check], since `boundary` is designed to 
> answer the question of what to do when Flag.A | Flag.B does not exist in Flag.

I think that would cause various problems in the API and implementation.  For 
example, without underlying individual bits, repr() may be nonsensical.

--

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread John Belmonte


John Belmonte  added the comment:

I wonder if CONFORM could tolerate these, since it's ultimately going to 
discard invalid bits.  And then perhaps CONFORM is the default.

--

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman


Ethan Furman  added the comment:

Actually, thinking about that a little bit more, KEEP was added for exactly 
this situation, as some stdlib flags exhibit the same behavior.

So the real question is what should happen with, for example,

  GeodIntermediateFlag(0x80)

?

The idea behind boundary is what should happen when values are created that 
don't have names in the Enum/Flag?  The options for boundary are:

STRICT  -> an error is raised  (default for Enum)
EJECT   -> the integer 0x80 is returned (not a flag)
CONFORM -> unnamed bits are discarded (so the DEFAULT flag would be returned)
KEEP-> an unnamed flag with value 0x80 is returned

So KEEP is currently doing double-duty -- this reinforces my desire to go with 
option 2 and return KEEP to single-duty status.

--

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman


Ethan Furman  added the comment:

Those are good points -- the difficulty is knowing which behavior the user 
wants.  And if the desired run-time behavior doesn't match the boundary flag 
the user is stuck.

--

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman


Ethan Furman  added the comment:

For example, if the default is CONFORM or KEEP, but the user wants an error if 
0x80 comes up, they would have to explicitly check for that value since the 
Flag would happily return it instead of raising.

--

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread John Belmonte


John Belmonte  added the comment:

Rather than make such masks containing unknown bits, this would be best 
practice if you want to use STRICT, correct?

NPTS_ROUND = 0x0
NPTS_CEIL = 0x1
NPTS_TRUNC = 0x2
NPTS_MASK = NPTS_ROUND | NPTS_CEIL | NPTS_TRUNC

Otherwise, if your input may have unknown bits, use CONFORM.

--

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman


Ethan Furman  added the comment:

Yes, that would be best practice.

However, if the user is interfacing with other software/hardware, they may not 
have a choice on which bits make up the mask.

--

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread John Belmonte


John Belmonte  added the comment:

> However, if the user is interfacing with other software/hardware, they may 
> not have a choice on which bits make up the mask.

I think it's the same as saying "unknown bits may come on the input".  An 
important use case is for forward compatibility, where new bits may be added 
but you don't want to break existing code.

That is what CONFORM is for.  The cited code should either declare the masks as 
I've shown if STRICT is desired, or use CONFORM if forward compatibility is 
desired.

--

___
Python tracker 

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



[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

2021-05-26 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset d8fd8c8568cbc2f53c1abeda3596a89a46f0e3d7 by Ken Jin in branch 
'main':
bpo-42392: [docs] Add deprecated-removed loop labels for asyncio (GH-26357)
https://github.com/python/cpython/commit/d8fd8c8568cbc2f53c1abeda3596a89a46f0e3d7


--

___
Python tracker 

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



[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

2021-05-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24983
pull_request: https://github.com/python/cpython/pull/26390

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman


Ethan Furman  added the comment:

That could be, and the user can set the boundary to whatever works best for 
their use-case, so long as the boundary they want to use does not conflict with 
the initial creation checks.

Do you agree that simply removing the unnamed member check that takes place at 
Flag creation is a good way forward?

--

___
Python tracker 

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



[issue43843] libregrtest: mark a test as failed if a thread logs an unexpected exception

2021-05-26 Thread STINNER Victor


Change by STINNER Victor :


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



[issue43774] [Doc] Document configure options in the Python documentation

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

The documentation is now online: 
https://docs.python.org/dev/using/configure.html

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



[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

2021-05-26 Thread miss-islington


miss-islington  added the comment:


New changeset 150a8e8a3edbbed12b98c8f22e2972cd47fd3ba5 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-42392: [docs] Add deprecated-removed loop labels for asyncio 
(GH-26357) (GH-26390)
https://github.com/python/cpython/commit/150a8e8a3edbbed12b98c8f22e2972cd47fd3ba5


--

___
Python tracker 

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



[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the help Petr. I close the issue, it's now fixed!

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread John Belmonte


John Belmonte  added the comment:

> Do you agree that simply removing the unnamed member check that takes place 
> at Flag creation is a good way forward?

It's uncomfortable, because then STRICT is not actually strict, and it's going 
to be show raw values in str/repr.

> CONFORM -> unnamed bits are discarded (so the DEFAULT flag would be returned)

This behavior of CONFORM is a little dubious.  I expect it to conform new 
values after the class is constructed.  But the class members themselves should 
not have that transform applied, and raise an error on invalid bits.

--

___
Python tracker 

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



[issue40280] Consider supporting emscripten/webassembly as a build target

2021-05-26 Thread Matej Cepl


Change by Matej Cepl :


--
nosy: +mcepl

___
Python tracker 

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



[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

2021-05-26 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

thanks!

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



[issue42161] Remove private _PyLong_Zero and _PyLong_One variables

2021-05-26 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue36950] test.support: add an helper to wait for an event with a timeout

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

I close the issue because of the lack of activity. The need for this function 
is not very clear at this point.

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



[issue36940] Update Py_FrozenMain() for _PyCoreConfig (PEP 587)

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by bpo-44131.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> [C API] Add tests on Py_FrozenMain()

___
Python tracker 

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



[issue44131] [C API] Add tests on Py_FrozenMain()

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-36940 as a duplicate of this issue.

--

___
Python tracker 

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



[issue36940] Update Py_FrozenMain() for _PyCoreConfig (PEP 587)

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

> Another file which should maybe also be updated to PEP 587, 
> PC/bdist_wininst/install.c

PC/bdist_wininst/ has been removed in the meanwhile.

--

___
Python tracker 

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



  1   2   >