[issue46930] Iterating over cls.__dict__ in classmethod causes RuntimeError when printing __annotations__

2022-03-06 Thread Larry Hastings


Larry Hastings  added the comment:

When accessing __annotations__ *in a class without annotations*, and *for the 
first time*.  And your workaround seems reasonable.

--

___
Python tracker 

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



[issue46903] Crash when setting attribute with string subclass as the name (--with-pydebug)

2022-03-06 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The PR introduced some deprecation warnings in tests.

./python -Wall -m test test_unicode   
0:00:00 load avg: 1.54 Run tests sequentially
0:00:00 load avg: 1.54 [1/1] test_unicode
/home/karthikeyan/stuff/python/cpython/Lib/test/test_unicode.py:3058: 
DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(o.name, 1)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_unicode.py:3060: 
DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(list(o.__dict__), [name])
/home/karthikeyan/stuff/python/cpython/Lib/test/test_unicode.py:3067: 
DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(o.name2, 3)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_unicode.py:3069: 
DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(list(o.__dict__), [name, name2])

== Tests result: SUCCESS ==

1 test OK.

Total duration: 952 ms
Tests result: SUCCESS

--
nosy: +xtreak

___
Python tracker 

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



[issue46912] Full gc collection blocked from collecting after some amount of objects in oldest gen

2022-03-06 Thread Alexei Komarov


Change by Alexei Komarov :


--
nosy: +pablogsal, pitrou

___
Python tracker 

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



[issue46903] Crash when setting attribute with string subclass as the name (--with-pydebug)

2022-03-06 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
pull_requests: +29833
pull_request: https://github.com/python/cpython/pull/31718

___
Python tracker 

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



[issue46843] PersistentTaskGroup API

2022-03-06 Thread Joongi Kim


Joongi Kim  added the comment:

I have released the new version of aiotools with rewritten TaskGroup and 
PersistentTaskGroup.

https://aiotools.readthedocs.io/en/latest/aiotools.taskgroup.html

aiotools.TaskGroup has small additions to asyncio.TaskGroup: a naming API and 
`current_taskgroup` context variable.

aiotools.PersistentTaskGroup is what I've described here, highlighting both 
async-with usage and long-lived object usage and `all_ptaskgroups()` 
classmethod for the monitoring purpose except the two-phase graceful shutdown 
(future TODO).

--

___
Python tracker 

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



[issue46925] Document dict behavior when setting equal but not identical key

2022-03-06 Thread Inada Naoki


Inada Naoki  added the comment:

I don't know much about Java, but Java's WeakHashMap is same to Python's 
WeakKeyDictionary.

https://docs.oracle.com/javase/9/docs/api/java/util/WeakHashMap.html

"""
This class is intended primarily for use with key objects whose equals methods 
test for object identity using the == operator. Once such a key is discarded it 
can never be recreated, so it is impossible to do a lookup of that key in a 
WeakHashMap at some later time and be surprised that its entry has been 
removed. This class will work perfectly well with key objects whose equals 
methods are not based upon object identity, such as String instances. With such 
recreatable key objects, however, the automatic removal of WeakHashMap entries 
whose keys have been discarded may prove to be confusing.
"""

--
nosy: +methane

___
Python tracker 

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



[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-03-06 Thread Ofey Chan


Ofey Chan  added the comment:

I updated NEWS and all checks have passed!

--

___
Python tracker 

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



[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2022-03-06 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> not a bug
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



[issue46912] Full gc collection blocked from collecting after some amount of objects in oldest gen

2022-03-06 Thread Irit Katriel


Irit Katriel  added the comment:

See if you can write a script that makes this happen.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue46461] Kodi crashing

2022-03-06 Thread Eric V. Smith

Eric V. Smith  added the comment:

I don’t have Ubuntu to test on. Plus the steps to reproduce are too much for 
the average volunteer to work through. I don’t think we’ll be able to help.

--

___
Python tracker 

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



[issue46925] Document dict behavior when setting equal but not identical key

2022-03-06 Thread Malthe Borch


Malthe Borch  added the comment:

Java's HashMap has also the (current) Python behavior. An existing same key is 
not replaced.

--

___
Python tracker 

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



[issue46461] Kodi crashing

2022-03-06 Thread Patric Gustavsson


Patric Gustavsson  added the comment:

any update on this?
can i do something more to help?

BR
Patric

--

___
Python tracker 

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



[issue46938] dataclass __post_init__ recursion

2022-03-06 Thread Bar Harel


New submission from Bar Harel :

Not sure if a continuance of https://bugs.python.org/issue44365 or not, but the 
suggestion to call super().__init__() in __post__init__ will cause infinite 
recursion if the superclass also contains __post__init__:

>>> @d
... class A:
...  test: int
...  def __post_init__(self):
...pass

>>> @d
... class B(A):
...  test2: int
...  def __post_init__(self):
...super().__init__(test=1)

>>> B(test2=1, test=3) <-- infinite recursion.

This is caused by line 564 
(https://github.com/python/cpython/blob/4716f70c8543d12d18c64677af650d479b99edac/Lib/dataclasses.py#L564)
 checking for post init on current class, and calling it on self (child class).

Not sure if the bug is in the documentation/suggestion, or if it's a bug in the 
implementation, in which case we need to call the current class's __post_init__.

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 414613
nosy: bar.harel, docs@python
priority: normal
severity: normal
status: open
title: dataclass __post_init__ recursion
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue46936] Fix grammar_grapher with the new forced directive

2022-03-06 Thread Luca


New submission from Luca :

The grammar_grapher.py utility has not been updated after the introduction  of 
the new "forced" directive ('&&') in the grammar (see 
https://github.com/python/cpython/pull/24292) and fails to visualize the 
current Python grammar.

--
components: Parser
messages: 414608
nosy: lucach, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Fix grammar_grapher with the new forced directive

___
Python tracker 

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



[issue46937] convert remaining functions to AC in _weakref

2022-03-06 Thread Kumar Aditya


Change by Kumar Aditya :


--
nosy: +corona10

___
Python tracker 

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



[issue46461] Kodi crashing

2022-03-06 Thread Jacob Nilsson


Jacob Nilsson  added the comment:

>From Kodi GH issues, they suspect is related to the work on subinterpreters 
>https://github.com/xbmc/xbmc/issues/19961#issuecomment-1008151611:

"The bulk of this issue is due to how python and it's modules handle sub 
interpreters.
There are several open python bpos and have been many prs to cpython to handle 
sub interpreters better, but it's still very much a work in progress.

All C modules are/were being updated to what they call multi phase init, which 
essentially moves away from static init of members. Sub interpreters can modify 
these static members which can cause other sub interpreter states to crash 
horribly.

For the user with the SSL crash running python 3.9, if you go to 3.10, the SSL 
module was converted to multiphase init, and shouldn't crash in the same manner 
for that particular module. However not all modules are converted still, so 
there are still failure points on other modules.

This is a cpython issue, and there's not much we can do but wait for it to be 
resolved in cpython"

--
nosy: +ajoino

___
Python tracker 

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



[issue37609] support "UNC" device paths in ntpath.splitdrive

2022-03-06 Thread Eryk Sun


Change by Eryk Sun :


--
Removed message: https://bugs.python.org/msg390391

___
Python tracker 

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



[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2022-03-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset eafec26ae5327bb23b6dace2650b074c3327dfa0 by MojoVampire in branch 
'main':
bpo-14156: Make argparse.FileType work correctly for binary file modes when 
argument is '-' (GH-13165)
https://github.com/python/cpython/commit/eafec26ae5327bb23b6dace2650b074c3327dfa0


--

___
Python tracker 

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



[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2022-03-06 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 17.0 -> 18.0
pull_requests: +29826
pull_request: https://github.com/python/cpython/pull/31706

___
Python tracker 

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



[issue46936] Fix grammar_grapher with the new forced directive

2022-03-06 Thread Luca


Change by Luca :


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

___
Python tracker 

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



[issue46937] convert remaining functions to AC in _weakref

2022-03-06 Thread Kumar Aditya


New submission from Kumar Aditya :

Convert remaining functions to AC in _weakref so that they use the FASTCALL 
calling convection.

--
messages: 414609
nosy: kumaraditya303
priority: normal
severity: normal
status: open
title: convert remaining functions to AC in _weakref
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



[issue46937] convert remaining functions to AC in _weakref

2022-03-06 Thread Kumar Aditya


Change by Kumar Aditya :


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

___
Python tracker 

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



[issue43447] Generate vectorcall code to parse arguments using Argument Clinic

2022-03-06 Thread Kumar Aditya


Change by Kumar Aditya :


--
nosy: +kumaraditya303

___
Python tracker 

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



[issue46938] dataclass __post_init__ recursion

2022-03-06 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +eric.smith

___
Python tracker 

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



[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2022-03-06 Thread miss-islington


miss-islington  added the comment:


New changeset ee18df425209cfa4f394b57220177c168fc3a1da by Miss Islington (bot) 
in branch '3.10':
bpo-14156: Make argparse.FileType work correctly for binary file modes when 
argument is '-' (GH-13165)
https://github.com/python/cpython/commit/ee18df425209cfa4f394b57220177c168fc3a1da


--

___
Python tracker 

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



[issue46939] Specialize calls for Python classes

2022-03-06 Thread Ken Jin


Change by Ken Jin :


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

___
Python tracker 

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



[issue46841] Inline bytecode caches

2022-03-06 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +29828
pull_request: https://github.com/python/cpython/pull/31709

___
Python tracker 

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



[issue37609] support "UNC" device paths in ntpath.splitdrive

2022-03-06 Thread Steve Dower


Steve Dower  added the comment:

If you can build this on top of nt._path_splitroot then it could save a decent 
amount of work, though at the same time I think it's worthwhile having a pure 
Python implementation which is cross-platform.

Haven't looked at the PR yet (or Eryk's implementation recently), but at the 
very least it would be nice to have tests that verify consistency with 
nt._path_splitroot. That way at least we'll discover if the native version 
changes.

--

___
Python tracker 

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



[issue46939] Specialize calls for Python classes

2022-03-06 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue46940] Suggestion messages don't properly work in nested getattr calls

2022-03-06 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

Consider this code:

class A:
__slots__ = [
"_color",
]

color = None

@property
def color(self):
return self._color


A().color


Executing this shows:

Traceback (most recent call last):
  File "/Users/pgalindo3/lel.py", line 21, in 
A().color
  File "/Users/pgalindo3/lel.py", line 18, in color
return self._color
AttributeError: 'A' object has no attribute '_color'. Did you mean: '_color'?

This is because the nested getattr call of "@property" overrides the metadata 
information in the exception object and it tries to produce an error message 
for the attribute "color" instead of "_color".

--
assignee: pablogsal
messages: 414623
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Suggestion messages don't properly work in nested getattr calls
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



[issue46940] Suggestion messages don't properly work in nested getattr calls

2022-03-06 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue46903] Crash when setting attribute with string subclass as the name (--with-pydebug)

2022-03-06 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Your PR fixed the issue for me.

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



[issue45582] Rewrite getpath.c in Python

2022-03-06 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 55a5e17d19fecb6a7af85a1a9d44304e5fcb19c7 by Christian Heimes in 
branch 'main':
bpo-45582: Don't fail if ENV_PATH is None in getpath.py (GH-31699)
https://github.com/python/cpython/commit/55a5e17d19fecb6a7af85a1a9d44304e5fcb19c7


--

___
Python tracker 

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



[issue46935] import of submodule polutes global namespace

2022-03-06 Thread Max Bachmann


Max Bachmann  added the comment:

Thanks Dennis. This helped me track down the issue in rapidfuzz.

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



[issue46939] Specialize calls for Python classes

2022-03-06 Thread Ken Jin


New submission from Ken Jin :

Please see https://github.com/faster-cpython/ideas/issues/267.

I hope I'm not stepping on anyone's toes here (sorry if I cause any duplicate 
work)!

--
messages: 414618
nosy: Mark.Shannon, kj
priority: normal
severity: normal
status: open
title: Specialize calls for Python classes
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



[issue46938] dataclass __post_init__ recursion

2022-03-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think this is a bug in the code. I'll have a PR ready shortly.

But since it's a non-trivial change, I'm going to target it for 3.11 only.

--
assignee: docs@python -> eric.smith
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



[issue43253] asyncio open_connection fails when a socket is explicitly closed

2022-03-06 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Please consider passing 'sock' argument as the ownership transfer.

You should not perform any action on 'sock' object directly anymore.
This is true for all asyncio API.

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



[issue46903] Crash when setting attribute with string subclass as the name (--with-pydebug)

2022-03-06 Thread Mark Shannon


Mark Shannon  added the comment:

Ronald, does PR 31658 fix your issue?

--
stage: patch review -> 

___
Python tracker 

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



[issue43253] asyncio open_connection fails when a socket is explicitly closed

2022-03-06 Thread Adhika Setya Pramudita


Change by Adhika Setya Pramudita :


--
nosy: +adhika.setyap

___
Python tracker 

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



[issue46846] functools.partial objects should set __signature__ and _annotations__

2022-03-06 Thread Éric Araujo

Change by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue46938] dataclass __post_init__ recursion

2022-03-06 Thread Bar Harel


Bar Harel  added the comment:

@Eric, I can easily fix it if you wish :-)

Just wondered if it's intended or not, as it looked like a bug but the 
documentation was somewhat endorsing it and I got confused.

Either case, a simple fix.

--

___
Python tracker 

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



[issue46938] dataclass __post_init__ recursion

2022-03-06 Thread Bar Harel


Bar Harel  added the comment:

Actually I'm not sure if the fix is so simple. What happens if B does not 
inherit from dataclass, but still inherits from A? Do we want to use the new 
__post_init__? I would assume we do, meaning we don't necessarily want to 
attach the __post_init__ to the dataclass, but to subclasses.

If so, the suggestion to call __init__() from __post_init__() might be the 
problematic part, and is what conceptually breaks the inheritance linearization.

--

___
Python tracker 

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



[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2022-03-06 Thread Géry

Change by Géry :


--
nosy: +maggyero

___
Python tracker 

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



[issue46769] Improve documentation for `typing.TypeVar`

2022-03-06 Thread Alex Waygood


Change by Alex Waygood :


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

___
Python tracker 

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



[issue34810] Maximum and minimum value of C types integers from Python

2022-03-06 Thread Irit Katriel


Irit Katriel  added the comment:

Closing because there was no reply to questions asking to clarify the use case. 
Please reopen if you would like to continue the discussion.

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



[issue46938] dataclass __post_init__ recursion

2022-03-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

Yeah, I've come to the conclusion that it's not so simple, either. I'm also 
thinking that advising to call the base __init__ is a mistake.

--

___
Python tracker 

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



[issue30693] tarfile add uses random order

2022-03-06 Thread Roundup Robot


Change by Roundup Robot :


--
nosy: +python-dev
nosy_count: 8.0 -> 9.0
pull_requests: +29831
pull_request: https://github.com/python/cpython/pull/31713

___
Python tracker 

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



[issue46744] installers on ARM64 suggest wrong folders

2022-03-06 Thread conio


conio  added the comment:

Thank you very much, Steve.

I took a look but didn't get to making the patch. I'm happy to see it was just 
removing the
calculation of the PF(ARM) folder.

For the second issue, even though I prefer it the way I said (unqualified = 
native), since

(i)   the default is using the value of `sys.winver` at the end of the path, 
and it's "VER"
  for amd64 Python and "VER-32" for x86 Python regardless of the OS (i.e. 
even on 32-bit
  Windows); 
(ii)  this has been the situation long enough to be a compatibility concern as 
you said, and
(iii) if someone really wants the names to be the other way around they may 
choose whatever
  they like during the install, and it's only the defaults that are that way

I think you are right in keeping it out for now. I wouldn't insist on it. If 
there comes a
time when more arguments in favor of this change come up or the circumstances 
change (e.g.
the compatibility issue becomes less of a concern) I'm sure you'd revisit this.

I did notice one small issue when I tried to build Python for ARM64 following 
your message
from 2022-02-15.

The help message for `Tools/msi/build.bat` says to use the `-ARM64` flag to 
build installers
for ARM64 but it didn't work for me. I took me a few attempts at clean and 
rebuild before I
finally looked at the script itself and saw that it actually expects `-arm64` 
in lowercase.

If you could change either the help string or the flag itself so they'd math it 
would be great.

Uppercase is nice because it is consistent with `PCbuild/build.bat` and 
lowercase is nice
because if there's come CI that uses this flag it wouldn't have to be modified 
too. Obviously
you if there are such consideration better than me so I leave the decision to 
you.

If there's no problem or difficulty in changing the arguments for 
`Tools/msi/build.bat` it
might be nice if building for ARM64 would be "-ARM64" and building for x86 
would be "-Win32"
to match the platform names for `PCbuild/build.bat`.

--

___
Python tracker 

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



[issue44863] Allow TypedDict to inherit from Generics

2022-03-06 Thread Marc Mueller


Change by Marc Mueller :


--
nosy: +cdce8p

___
Python tracker 

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



[issue46941] Bug or plug not removed (The operator "is")

2022-03-06 Thread Роман Слабицкий

New submission from Роман Слабицкий :

I understand it's a stub that hasn't been removed, so it's a message from the C 
language that Python runs on in principle.

--
components: Interpreter Core
files: изображение_2022-03-07_023751.png
messages: 414630
nosy: semina054
priority: normal
severity: normal
status: open
title: Bug or plug not removed (The operator "is")
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50659/изображение_2022-03-07_023751.png

___
Python tracker 

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



[issue44863] Allow TypedDict to inherit from Generics

2022-03-06 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Related issue:  https://bugs.python.org/issue43923

--
nosy: +rhettinger

___
Python tracker 

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



[issue46941] Bug or plug not removed (The operator "is")

2022-03-06 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

I don't understand what you are referring to. What do you think is wrong?

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue46941] Bug or plug not removed (The operator "is")

2022-03-06 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

In the future, please copy and paste the relevant code and errors as text. 
Images of code are harder for screen-readers for the visually impaired, harder 
to copy-and-paste to verify, and are more likely to be perceived as spam.

Your code is essentially this:

>>> i = 0
>>> i is 0
:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
True

This warning isn't a "stub", it was intentionally added in GH-9642. The warning 
exists because comparing numbers with `is` is generally unsafe (numbers should 
be compared using `==` instead), and can lead to unpredictable results, 
especially if using a different Python implementation (e.g. PyPy or RustPython 
or Jython rather than CPython).

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue46941] Bug or plug not removed (The operator "is")

2022-03-06 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The code in the screenshot looks correct.



>>> i = 0
>>> i is int
False
>>> type(i) is int
True

The code above does not get warning because "int" is a variable.  This kind of 
comparison is always allowed and will work reliably.



>>> i is 0
:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
True

The above code generates a warning because 0 is a numeric literal and there may 
be more than one instance of that literal.  While this kind of comparison is 
allowed, it is unreliable because numeric literals are not guaranteed to be 
singletons:

>>> x = 600
>>> (x + x) is 1200
:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
False



The reliable and correct way to test numeric values with an equality:

>>> x + x == 1200
True

--
nosy: +rhettinger -Dennis Sweeney, Jelle Zijlstra

___
Python tracker 

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



[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2022-03-06 Thread Owen T. Heisler


Change by Owen T. Heisler :


--
nosy:  -owenh

___
Python tracker 

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



[issue45100] Improve help() by making typing.overload() information accessible at runtime

2022-03-06 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


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

___
Python tracker 

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



[issue46941] Bug or plug not removed (The operator "is")

2022-03-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

As others have noted, the behavior is intentional, so I'm closing this.

--
nosy: +Dennis Sweeney, Jelle Zijlstra, eric.smith
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