[issue44243] tkinter button colors on Mac

2021-05-26 Thread Tal Einat


Tal Einat  added the comment:

FWIW this also behaves as expected on Ubuntu 20.04 with both Python 3.8 and 
3.10.

--

___
Python tracker 

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



[issue44244] protected members accessible in other modules

2021-05-26 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44244] protected members accessible in other modules

2021-05-26 Thread Dennis Sweeney

Dennis Sweeney  added the comment:

An attribute name starting with a single underscore is just a warning to users 
of your code that "this attribute is supposed to be private, access it at your 
own risk."

Everything below is from 
https://docs.python.org/3/tutorial/classes.html?highlight=mangle#private-variables
 :

“Private” instance variables that cannot be accessed except from inside an 
object don’t exist in Python. However, there is a convention that is followed 
by most Python code: a name prefixed with an underscore (e.g. _spam) should be 
treated as a non-public part of the API (whether it is a function, a method or 
a data member). It should be considered an implementation detail and subject to 
change without notice.

Since there is a valid use-case for class-private members (namely to avoid name 
clashes of names with names defined by subclasses), there is limited support 
for such a mechanism, called name mangling. Any identifier of the form __spam 
(at least two leading underscores, at most one trailing underscore) is 
textually replaced with _classname__spam, where classname is the current class 
name with leading underscore(s) stripped. This mangling is done without regard 
to the syntactic position of the identifier, as long as it occurs within the 
definition of a class.

Name mangling is helpful for letting subclasses override methods without 
breaking intraclass method calls. For example:

...

--

___
Python tracker 

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



[issue44244] protected members accessible in other modules

2021-05-26 Thread Nihar Ranjan Roy


Nihar Ranjan Roy  added the comment:

Dear Dennis
Thanx for the prompt reply.
I am talking about protected members (those starting with single
underscore). Take it other way, What is the difference between public and
private membership in python?

With Regards
Nihar Ranjan Roy
Mobile: +91 9810 977 908
___

On Thu, May 27, 2021 at 10:34 AM Dennis Sweeney 
wrote:

>
> Dennis Sweeney  added the comment:
>
> Being in different modules is irrelevant. Attribute names that start with
> double underscores and don't end with double underscores are "mangled" by
> the compiler to include the class name as well:
>
> >>> class MyClass:
> ... def __init__(self):
> ... self.__data = 17
> ...
> ...
> >>> x = MyClass()
> >>> x._MyClass__data
> 17
>
>
> See
> https://docs.python.org/3/tutorial/classes.html?highlight=mangle#private-variables
>
> I don't think there's a bug here.
>
> --
> nosy: +Dennis Sweeney
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue44244] protected members accessible in other modules

2021-05-26 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Being in different modules is irrelevant. Attribute names that start with 
double underscores and don't end with double underscores are "mangled" by the 
compiler to include the class name as well:

>>> class MyClass:
... def __init__(self):
... self.__data = 17
... 
... 
>>> x = MyClass()
>>> x._MyClass__data
17


See 
https://docs.python.org/3/tutorial/classes.html?highlight=mangle#private-variables

I don't think there's a bug here.

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue44244] protected members accessible in other modules

2021-05-26 Thread Nihar Ranjan Roy


New submission from Nihar Ranjan Roy :

As per literature protected members are not accessible in other modules but I 
found that there is no difference between public and protected members in 
python 3.9.0

--
files: Screenshot (108).png
messages: 394509
nosy: niharranjanroy
priority: normal
severity: normal
status: open
title: protected members accessible in other modules
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50067/Screenshot (108).png

___
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: +24989
pull_request: https://github.com/python/cpython/pull/26396

___
Python tracker 

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



[issue41611] IDLE: problems with completions on Mac

2021-05-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

With 3.10.0b1 on Mac I am getting attribute completion freezes.  I had to turn 
them off.  I am tempted to disable completions until there is a Mac IDLE 
developer to dig into issues like this.

--
nosy: +taleinat

___
Python tracker 

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



[issue44243] tkinter button colors on Mac

2021-05-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36128] ResourceReader for FileLoader inconsistently handles path separators

2021-05-26 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

The preferred API as implemented in Python 3.9 and importlib_resources 1.1 is 
the `files()` API. This simpler API returns a Traversable object, a 
pathlib-like handle to the contents of a package. This approach side-steps the 
issues described above. In particular, `is_resource` no longer has a purpose. 
Path traversal is handled naturally through `Traversable.join_path`. Resources 
in subdirectories are now supported.

Parent objects ('..') are allowed, but only incidentally and allowed in the 
same way as they're allowed for any Python code. That is, one can call 
`files('multiprocessing').joinpath('../../../../etc/passwd')`, but that 
provides no advantage over `pathlib.Path('/etc/passwd')`.

I believe this new API addresses the concerns presented.

Please open a new issue (here or in github.com/python/importlib_resources) if 
there are further concerns needing attention.

--
nosy: +jaraco
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44243] tkinter button colors on Mac

2021-05-26 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Mac Mohave, 3.9 with 8.6.8 and 3.10 with 8.6.11

import tkinter as tk
r = tk.Tk()
b = tk.Button(r, text='START', fg='white', bg='red')  # Or '#f00'.
b.pack()
r.mainloop()

On Windows, white on red button, as expected.  On Mac, all white until one 
presses and holds mouse, and then blue background.  Default black on white 
works OK.

This may be new since several years ago, when 2 of us worked on turtle demo, 
which has 3 such buttons.  They all now misbehave (reported by Raymond).  If 
someone tested on Mac, it must have worked then.

I retried with the b= line replaced with

s = ttk.Style()
s.configure('Td.TButton', foreground='white', background='red')
b = ttk.Button(r, text='START', style='Td.TButton')

with the same result.  (Mark, did I get this right?)

--
components: Tkinter, macOS
messages: 394506
nosy: markroseman, ned.deily, rhettinger, ronaldoussoren, taleinat, terry.reedy
priority: normal
severity: normal
status: open
title: tkinter button colors on Mac
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



[issue40172] ZipInfo corrupts file names in some old zip archives

2021-05-26 Thread Daniel Hillier


Daniel Hillier  added the comment:

Looking into this more and it appears that while Appendix D of 
https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT says "If general 
purpose bit 11 is unset, the file name and comment SHOULD conform to the 
original ZIP character encoding" where the original encoding is IBM 437 
(cp437), this is not always followed. This isn't too surprising as cp437 
doesn't have every character for every language! In particular, some archive 
programs on windows will use the user's locale code page.

https://superuser.com/questions/1321371/proper-encoding-for-file-names-in-zip-archives-created-in-windows-and-unpacked-i

A UTF filename can be stored in the extra field 0x7075 in addition to a 
filename encoded in an arbitrary code page stored in the header's filename 
section. There is a open issue to add handling these fields (for reading) to 
zipfile: https://bugs.python.org/issue41928 and that issue may be related to 
this one https://bugs.python.org/issue40407

For this issue, with regards to encoding, I prefer the current situation where 
general purpose bit 11 for UTF is preferentially used because it doesn't change 
the behaviour compared to previous Python versions and it reduces file size as 
the filename isn't repeated in the extra field.

For compatibility with other archive programs that don't support the general 
purpose bit 11, I suggest we add an additional mechanism to allow the code page 
for the path name (and comment) to be set and use the 0x7075 extra field to 
store the UTF name in those cases where the filename can't be encoded in ascii 
(and 0x6075 to store the utf comment where it can't be encoded in ascii)

--

___
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


miss-islington  added the comment:


New changeset 5d569ef9dd57cf03473ef0c04f0e58b6c5cb5d04 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-44241: Incorporate changes from importlib_metadata 4.1. (GH-26382) 
(GH-26395)
https://github.com/python/cpython/commit/5d569ef9dd57cf03473ef0c04f0e58b6c5cb5d04


--

___
Python tracker 

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



[issue43413] tuple subclasses allow arbitrary kwargs

2021-05-26 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
title: tuple subclasses allow kwargs -> tuple subclasses allow arbitrary kwargs

___
Python tracker 

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



[issue41855] FastPath.zip_children can give duplicate results on Python 3.8

2021-05-26 Thread Jason R. Coombs


Change by Jason R. Coombs :


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



[issue43063] zipfile.Path / importlib.resources raises KeyError if a file wasn't found

2021-05-26 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

If this issue affects you, please use the `zipp` backport. I realize there are 
some use-cases that aren't readily amenable to relying on the backport. Please 
report any such use-case here as they may provide a justification for 
back-porting the change.

--
resolution:  -> wont fix
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



[issue37903] IDLE Shell sidebar.

2021-05-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I will link to an IDLE shell followup issue later.

Discussions about other IDLE issues should be on pre-existing issues (use the 
tracker search with Components: IDLE), new issues, or without an issue, on the 
idle-dev list.

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



[issue44241] Sync importlib_metadata enhancements through 4.1.

2021-05-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24988
pull_request: https://github.com/python/cpython/pull/26395

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

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

Note that PYC files are marshalled from code objects including frozenset 
instance, not from AST.
When marshaling, frozenset instance is created already and its creation order 
is lost .

--

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

> Either [...] we should lose the creation time check (not apply the 
> transform), or we should still have the check (raise an error on invalid 
> bits) which would still leave us in this situation.

That is only one option (which undesirable consequences are already 
identified).  We should consider a few options carefully.

>From the start, if default Enum declarations are going to be subject to new 
>runtime exceptions, it's certain that they'll be hit in some existing code.  
>Anything other than the default being legacy-compatible, or defining the new 
>stuff as Enum2, or deferring all the changes to Python 4, is going to lead to 
>bug reports and disgruntled users.  I don't think that suggests we should 
>remove the runtime exceptions-- they are what supports the new API and 
>implementation.

Perhaps KEEP should be renamed to LEGACY, that should be the default, and there 
should be guidance on how to get the KEEP use cases you've found migrated to 
one of the other modes.  (And changing the default could be considered for 
Python 4.)

>> But the [CONFORM] class members themselves should not have that transform 
>> applied, and raise
>> an error on invalid bits.
>
> But I'm not sure I understand that.

It's an important point that should be fixed in the code.  CONFORM should be 
regarding transforming external values into valid member instances.  The enum 
author's declaration itself should be coherent and not rely on such transforms. 
 Users will be surprised when they define a "FOO = 0xFF" and they read the 
value back as 0x1F or something.  The runtime exception lets the enum author 
know about the issue in the declaration, and normalize it.

--

___
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


STINNER Victor  added the comment:


New changeset 4115996342278de7c2a1b59ac348322e7a4e9072 by Miss Islington (bot) 
in branch '3.10':
bpo-42161: mathmodule.c: move _PyLong_GetOne() loop invariant (GH-26391) 
(GH-26393)
https://github.com/python/cpython/commit/4115996342278de7c2a1b59ac348322e7a4e9072


--

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


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



[issue43988] Add test.support.assert_dissallow_instantiation

2021-05-26 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +24987
pull_request: https://github.com/python/cpython/pull/26394

___
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


STINNER Victor  added the comment:

Raymond: "Can you fix all the other cases where this is used in inner-loop; 
otherwise, it is undoing everyone else's optimizations and fast paths."

Done, thanks for the report.

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



[issue41736] test_site: test_s_option() failed on AMD64 Windows8.1 Refleaks 3.7

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see this issue recently, I close the issue (again!).

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



[issue42161] Remove private _PyLong_Zero and _PyLong_One variables

2021-05-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +24986
pull_request: https://github.com/python/cpython/pull/26393

___
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


STINNER Victor  added the comment:


New changeset 3e7ee02327db13e4337374597cdc4458ecb9e3ad by Victor Stinner in 
branch 'main':
bpo-42161: mathmodule.c: move _PyLong_GetOne() loop invariant (GH-26391)
https://github.com/python/cpython/commit/3e7ee02327db13e4337374597cdc4458ecb9e3ad


--

___
Python tracker 

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



[issue40237] Test code coverage (C) job of Travis CI fails on test_distutils which creates _configtest.gcno file

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

> Test code coverage (C) job of Travis CI fails on test_distutils which creates 
> _configtest.gcno file

This Travis CI has been removed, I close the issue.

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

"test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() 
fails with OSError: [Errno 9] Bad file descriptor"

I didn't see this failure recently, I close the issue. Since changes were 
pushed, I mark the issue as fixed.

If someone has ideas to enhance the code, I suggest to open a new more specific 
issue. I consider the initial issue (buildot failure) as 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



[issue39996] test_multiprocessing_fork hangs on AMD64 FreeBSD Shared 3.x

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see this failure recently, I close the issue.

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



[issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6/3.x

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see this failure recently, I close the issue.

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

Include/README.rst and https://devguide.python.org/c-api/ now define guideliens 
for header files and the 3 APIs. I consider that this issue is now fixed. Even 
if there are still non-limited API declared in Include/*.h, changing that can 
be done in follow-up issues.

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



[issue43988] Add test.support.assert_dissallow_instantiation

2021-05-26 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +24985
pull_request: https://github.com/python/cpython/pull/26392

___
Python tracker 

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



[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

Moreover, graminit.h was removed in Python 3.10.

--

___
Python tracker 

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



[issue43244] Move PyArena C API to the internal C API

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-35197 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



[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

Issue fixed in bpo-43244.

I moved the evil public Python-ast.h header file into the internal C API as 
Include/internal/pycore_ast.h. It doesn't define "Yield" anymore: 
"_PyAST_Yield" must be used instead.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Move PyArena C API to the internal C API

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

I'll be offline for a couple hours, but I'll check back.

--

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

I see your point about the str/repr.

> But the class members themselves should not have that transform applied, and 
> raise
> an error on invalid bits.

But I'm not sure I understand that.  Either you are agreeing with me that we 
should lose the creation time check (not apply the transform), or we should 
still have the check (raise an error on invalid bits) which would still leave 
us in this situation.

--

___
Python tracker 

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



[issue35333] [C API] Rename private structs to use names closer to types

2021-05-26 Thread STINNER Victor


Change by STINNER Victor :


--
components: +C API -Interpreter Core
title: Rename private structs to use names closer to types -> [C API] Rename 
private structs to use names closer to types

___
Python tracker 

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



[issue36560] test_functools leaks randomly 1 memory block

2021-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see this failure recently. I close the issue.

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

> 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



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

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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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

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:

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

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



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



[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



[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



[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



[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



[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



[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



[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



[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



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


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



[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



[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



[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



[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



[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



[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


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



[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



[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



[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


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



[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



[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



[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



[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



[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



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



[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


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



[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



[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



[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



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



  1   2   >