[issue45979] Fix Tkinter tests with old Tk

2021-12-05 Thread E. Paine


E. Paine  added the comment:

Is support for such old Tk versions useful? 8.5.4 was released in late 2008, 
and I highly doubt anyone would still be using it. IMO, 8.5.12 would be a good 
compromise, since we're giving support to a version more than 9 years old, but 
would simplify PR-29913 by removing several 8.5.x specific branches. (FYI, 
8.5.12 was released on 2012-07-27 and 8.6.0 on 2012-12-20)

--

___
Python tracker 

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



[issue45985] AttributeError from @property inadvertantly flows into __getattr__

2021-12-05 Thread Ofer Koren


New submission from Ofer Koren :

There's For quite a long time I've been seeing this bug:

>>> class A():

... @property
... def foo(self):
... return self.bar  # < this is where it all starts ('bar' isn't 
found)
... 
... def __getattr__(self, attr):
... raise AttributeError(attr)  # <--- let's pretend our getattr 
couldn't find the attr


>>> A().foo


Traceback (most recent call last):
  File "t.py", line 13, in 
A().foo
  File "t.py", line 10, in __getattr__
raise AttributeError(attr)
AttributeError: foo


So an AttributeError spawned by `self.bar` caused us to "fallback" on 
__getattr__ with attr='foo', leading the naive code there to produce a very 
confusing error message.


My workaround was to use a @safe_property decorator, one that catches 
AttributeError exceptions and converts them to RuntimeErrors instead, so that 
they don't flow into the unsuspecting __getattr__.
I believe python should adopt this behavior into the built-in property 
decorator, perhaps with a more appropriate exception type.

--
messages: 407701
nosy: koreno
priority: normal
severity: normal
status: open
title: AttributeError from @property inadvertantly flows into __getattr__
type: behavior
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2021-12-05 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue45985] AttributeError from @property inadvertantly flows into __getattr__

2021-12-05 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +AlexWaygood

___
Python tracker 

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



[issue43806] asyncio.StreamReader hangs when reading from pipe and other process exits unexpectedly

2021-12-05 Thread Marko


Marko  added the comment:

Thanks, takluyver!

You are right. Synchronous code that I was comparing it to had os.close(ctx), 
but I forgot to add it in the async example, so I thought it was a bug.

Closing this issue.

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



[issue45986] 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer problems

2021-12-05 Thread Athanasius


New submission from Athanasius :

Python 3.10.0 ships with version 8.6.2.10 of both tcl86t.dll and tk86t.dll.

Python 3.9.9, released after 3.10.0, ships with the later version 8.6.2.12 of 
both files.

Releasing a project using py2exe and WiX to build a windows MSI installer file 
means that upgrading Python we use from 3.9.9 to 3.10.0 then refuses to install 
the files tcl86t.dll and tk86t.dll because their versions are older than the 
already installed files (but for some reason it *does* remove those older 
versions).

For the user this then means the application crashes on startup when import of 
_tkinter.pyd fails due to the missing DLLs.  There are two workarounds of: 1) 
Do a subsequent repair install of the MSI, 2) Manually uninstall the 
application before installing our version based on Python 3.10.  Neither of 
these are attractive given the often non-technical backgrounds of our users.

How soon is a 3.10.1 expected that will address this ?  In the meantime I'm 
either going to have to special-case things and pull in the Python 3.9.9 
versions of the files, or just not upgrade the project to Python 3.10.

--
components: Tkinter
messages: 407703
nosy: Athanasius
priority: normal
severity: normal
status: open
title: 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer 
problems
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



[issue45986] 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer problems

2021-12-05 Thread Alex Waygood


Alex Waygood  added the comment:

You can find the release schedule here, which says that 3.10.1 is expected... 
tomorrow https://www.python.org/dev/peps/pep-0619/#id6

--
nosy: +AlexWaygood

___
Python tracker 

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



[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +28143
pull_request: https://github.com/python/cpython/pull/29919

___
Python tracker 

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



[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset d15cdb2f32f572ce56d7120135da24b9fdce4c99 by Serhiy Storchaka in 
branch 'main':
bpo-27946: Fix possible crash in ElementTree.Element (GH-29915)
https://github.com/python/cpython/commit/d15cdb2f32f572ce56d7120135da24b9fdce4c99


--

___
Python tracker 

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



[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28144
pull_request: https://github.com/python/cpython/pull/29920

___
Python tracker 

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



[issue45986] 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer problems

2021-12-05 Thread Athanasius


Athanasius  added the comment:

Thanks, I have my fingers crossed that 3.10.1 will have automatically picked up 
>= 8.6.2.12 versions of the files.  I'll check once it's available.

--

___
Python tracker 

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



[issue44166] Make IndexError messages for list more informative

2021-12-05 Thread Akash Mishra


Akash Mishra  added the comment:

While browsing some traceback error reporting i land on this solution threads. 

Specially beginner face traceback error for 
- KeyError
- IndexError (As mentioned in current message thread) 
- ValueError
..

It is sometime self explanatory from error reports but may be it can help to 
design some error document in python to more generalize errors.

Found some of traceback error with some possible cause explanations. Sharing if 
this is useful.  

https://github.com/pablorgarcia/Learn-to-program-with-Python-guide/blob/master/Understanding%20errors/IndexError-list-index-out-of-range.py

https://www.quizcure.com/python/traceback-most-recent-call-last-in-python#Keyerror-dictionary

https://stackoverflow.com/questions/64428188/deep-learning-chatbot-specific-index-error-list-index-out-of-range

--
nosy: +mishra.akash.myself

___
Python tracker 

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



[issue19153] [doc] Embedding into a shared library fails again

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
title: Embedding into a shared library fails again -> [doc] Embedding into a 
shared library fails again
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.3, Python 
3.4

___
Python tracker 

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



[issue29251] [doc] Class __dict__ is only a mapping proxy

2021-12-05 Thread Irit Katriel

Irit Katriel  added the comment:

The patch would still apply to Doc/library/functions.rst.


https://docs.python.org/3.10/reference/datamodel.html#the-standard-type-hierarchy
  seems to have been changed quite a lot, but still has:

1. "Special read-only attribute: __dict__ is the module’s namespace as a 
dictionary object."


2. "__dict__
The dictionary containing the class’s namespace."

--
keywords: +easy -patch
nosy: +iritkatriel
title: Class __dict__ is only a mapping proxy -> [doc] Class __dict__ is only a 
mapping proxy
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6, Python 3.7

___
Python tracker 

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



[issue43805] multiprocessing.Queue hangs when process on other side dies

2021-12-05 Thread Marko


Marko  added the comment:

Yes, something like that would indeed be really helpful.
How likely is that something like that gets implemented?

--

___
Python tracker 

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



[issue44245] Cross-compilation of CPython 3.8 with _socket module using Anddroid NDK fails

2021-12-05 Thread Ladislav Heller


Ladislav Heller  added the comment:

Tried to cross-compile with an old version of Android NDK.
Using the latest NDK it works perfectly.

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



[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Toshihiro Kamiya


New submission from Toshihiro Kamiya :

When I was writing unit tests, I noticed that os.chdir in the unittest test 
case failed with RecursionError.

It seems to work fine on Ubuntu 20.04, but fails on Windows 10 (might fail on 
macOS).

The attached file is a minimal code to reproduce this.

When I run it, I got an error message as follows

```
PS C:\Users\toshihiro\tmp> python .\test_chdir_fails.py
Traceback (most recent call last):
  File "C:\Users\toshihiro\tmp\test_chdir_fails.py", line 11, in 
unittest.main()
  File 
"C:\Users\toshihiro\AppData\Local\Programs\Python\Python39\lib\unittest\main.py",
 line 101, in __init__
self.runTests()
(snip)
  File 
"C:\Users\toshihiro\AppData\Local\Programs\Python\Python39\lib\traceback.py", 
line 493, in __init__
context = TracebackException(
  [Previous line repeated 487 more times]
RecursionError: maximum recursion depth exceeded
PS C:\Users\toshihiro\tmp>
```

The version of python was:
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit 
(AMD64)] on win32

Regards,

--
components: Library (Lib)
files: test_chdir_fails.py
messages: 407711
nosy: tos-kamiya
priority: normal
severity: normal
status: open
title: os.chdir in unittest's test case causes RecursionError on Windows
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50476/test_chdir_fails.py

___
Python tracker 

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



[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2021-12-05 Thread hongweipeng


hongweipeng  added the comment:

I think PR https://github.com/python/cpython/pull/28674 has resolved this issue.

--
nosy: +hongweipeng

___
Python tracker 

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



[issue3687] Popen() object stdout attribute reassignment behaviour

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

The situation is the same in 3.11, both doc and implementation.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6, Python 3.7

___
Python tracker 

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



[issue45986] 3.10.0 ships with older tcl/tk DLLs than 3.9.9 causing Windows Installer problems

2021-12-05 Thread E. Paine


E. Paine  added the comment:

I can confirm that 3.10.1 is going to use Tk 8.6.12 (see #45732). Python 3.10.0 
was meant to use Tk 8.6.11, but there was an issue with the build process 
(#43652).

--
nosy: +epaine

___
Python tracker 

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



[issue45988] inspect.signature fails on a @staticmethod

2021-12-05 Thread Filippo Vicentini


New submission from Filippo Vicentini :

Attempting to inspect the signature of a method marked as @staticmethod during 
class construction fails.
This happens in 3.8, 3.9.

A MWE is given here:
```python
from typing import signature

def decorator(fun):
print(signature(fun))
return fun

class Test2:
@decorator
@staticmethod
def test(arg):
return arg
```
which fails with error
```python
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 4, in Test
  File "", line 2, in decorator
  File 
"/Users/filippovicentini/.pyenv/versions/3.9.7/lib/python3.9/inspect.py", line 
3111, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
  File 
"/Users/filippovicentini/.pyenv/versions/3.9.7/lib/python3.9/inspect.py", line 
2860, in from_callable
return _signature_from_callable(obj, sigcls=cls,
  File 
"/Users/filippovicentini/.pyenv/versions/3.9.7/lib/python3.9/inspect.py", line 
2259, in _signature_from_callable
raise TypeError('{!r} is not a callable object'.format(obj))
TypeError:  is not a callable object
```

--
components: Library (Lib)
messages: 407715
nosy: PhilipVinc
priority: normal
severity: normal
status: open
title: inspect.signature fails on a @staticmethod
versions: Python 3.8

___
Python tracker 

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



[issue28816] [doc] Clarify that zipimport does not invoke import hooks to load custom files from zip.

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

I think that
(1) the patch is not worded very clearly
(2) the docs should not reference py2exe for instructions how to do something

Perhaps it would suffice to change the sentence:

Any files may be present in the ZIP archive, but only files .py and .pyc are 
available for import

to:

Any files may be present in the ZIP archive, but the importer is only invoked 
for .py and .pyc files

?

--
keywords: +easy
nosy: +iritkatriel
status: open -> pending
title: Document if zipimport can respect import hooks to load custom files from 
zip. -> [doc] Clarify that zipimport does not invoke import hooks to load 
custom files from zip.
type:  -> enhancement
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5, Python 
3.6, Python 3.7

___
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

2021-12-05 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +28145
pull_request: https://github.com/python/cpython/pull/29921

___
Python tracker 

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



[issue12833] Document the need to pass the prompt to raw_input() with readline

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

I agree with Martin that this belongs in the input() rather than readline() 
docs. However, the input() does is quite concise, and the sole example 
specifies the right way to use it:

https://docs.python.org/3/library/functions.html#input

I find it hard to justify real estate in this doc in which to explain what 
happens if you combine input with readline and do the wrong thing. 

I suggest we leave it as it is.

--
nosy: +iritkatriel
resolution:  -> wont fix
status: open -> pending

___
Python tracker 

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



[issue44166] Make IndexError messages for list more informative

2021-12-05 Thread Andre Roberge


Change by Andre Roberge :


--
nosy: +aroberge

___
Python tracker 

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



[issue1705393] Document select() failure with buffered file

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6

___
Python tracker 

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



[issue26897] [doc] Clarify Popen stdin, stdout, stderr

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
title: Clarify Popen stdin, stdout, stderr -> [doc] Clarify Popen stdin, 
stdout, stderr
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6

___
Python tracker 

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



[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Alex Waygood


Change by Alex Waygood :


--
type: crash -> behavior

___
Python tracker 

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



[issue28546] [doc] Clarify setting pdb breakpoints

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy -patch
title: Better explain setting pdb breakpoints -> [doc] Clarify setting pdb 
breakpoints
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.3, Python 
3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue28546] [doc] Clarify setting pdb breakpoints

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

The patch needs to be converted to a GitHub PR.

--
nosy: +iritkatriel

___
Python tracker 

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



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

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +28146
pull_request: https://github.com/python/cpython/pull/29922

___
Python tracker 

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



[issue45989] Getting key of max value of dict really dose not sense

2021-12-05 Thread Masoud Azizi


New submission from Masoud Azizi :

Maximum_signal_key=max(collective_signals,key=collective_signals.get)
This code is really hard to learn and remember.
Please change it to something that more sense.

--
messages: 407719
nosy: mablue
priority: normal
severity: normal
status: open
title: Getting key of max value of dict really dose not sense
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue45582] Rewrite getpath.c in Python

2021-12-05 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 628abe4463ed40cd54ca952a2b4cc2d6e74073f7 by Christian Heimes in 
branch 'main':
bpo-45582: Fix signature of _Py_Get_Getpath_CodeObject (GH-29921)
https://github.com/python/cpython/commit/628abe4463ed40cd54ca952a2b4cc2d6e74073f7


--

___
Python tracker 

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



[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

Would it suffice to change

"Ultimately, the loader is what makes use of __file__ and/or __cached__"

to 

"Ultimately, the loader set the values of __file__ and/or __cached__"

?

--
nosy: +iritkatriel
title: language reference describes the role of module.__file__ inaccurately -> 
[doc] language reference describes the role of module.__file__ inaccurately
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue45990] Exception notes need more documentation

2021-12-05 Thread Ram Rachum


New submission from Ram Rachum :

The new __note__ feature for exception could be useful, but the documentation 
(and the section in "What's new") aren't good enough:

"__note__: A mutable field which is :const:`None` by default and can be set to 
a string. If it is not :const:`None`, it is included in the traceback. This 
field can be used to enrich exceptions after they have been caught."

This is more of a definition than an explanation. If this is solving a problem, 
there should be an explanation that starts from the problem being solved, 
hopefully with 2-3 examples where this is useful. If people start using this 
feature without some guidance, they might put things in the note that should 
have been in the message.

--
assignee: docs@python
components: Documentation
messages: 407722
nosy: cool-RR, docs@python, iritkatriel
priority: normal
severity: normal
status: open
title: Exception notes need more documentation
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



[issue45989] Getting key of max value of dict really dose not sense

2021-12-05 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

The code makes perfect sense. If you want to find the maximum key in a dict, 
you write:

max(collective_signals)

If you want to find the maximum key according to some key function, you write:

max(collective_signals, key=function)


If you want to find the maximum key according to its associated value, the key 
function that will work is collective_signals.get. That makes perfect sense.

Not every one-line piece of code needs to be a builtin function.

In any case, Python 3.6 to 3.10 are all in feature-freeze. Even if we added 
some special function to do this, which I doubt we will do, it could only go 
into 3.11.

--
nosy: +steven.daprano
versions:  -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue45989] Add new function or method to return the dict key with the maximum value

2021-12-05 Thread Steven D'Aprano


Change by Steven D'Aprano :


--
title: Getting key of max value of dict really dose not sense -> Add new 
function or method to return the dict key with the maximum value

___
Python tracker 

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



[issue45934] python curses newterm implementation

2021-12-05 Thread Julius Hamilton

Julius Hamilton  added the comment:

I’m trying to patch this bug.

Here are my current working questions:

1. What is the relationship between an fd (file descriptor) and a terminal? 
What software / hardware component goes to “fd 0” to receive input from it? Is 
there a GNU Screen command to receive stdin from “fd n”, fd 3 for example?

2. Looking at the source code:

def initscr():
import _curses, curses
# we call setupterm() here because it raises an error
# instead of calling exit() in error cases.
setupterm(term=_os.environ.get("TERM", "unknown"),
  fd=_sys.__stdout__.fileno())
stdscr = _curses.initscr()
for key, value in _curses.__dict__.items():
if key[0:4] == 'ACS_' or key in ('LINES', 'COLS'):
setattr(curses, key, value)

return stdscr

- why does initscr() begin by importing _curses and curses? Precompiled C 
curses and non-compiled C or is the second importing Python? How can a module 
be importing itself?

- they call “setupterm”, a C curses function, because it raises an error if 
there’s a problem in case of just quitting. But how so, specifically? Do the 
errors get detected at stderr and then the terminal raises another error or 
something? I’m not clear on the details. Plus, why can they call this function 
without referring to the enclosing package, curses.setupterm? Is that a C thing 
that all functions are automatically added to the namespace?

- Someone wrote that “initscr” actually calls “newterm”, in the code. So I 
guess I should look at the C newterm code, see how it works and see if a direct 
implementation is possible.


(I said in an email I would double post an email I sent but instead I’m posting 
more specific questions here related to that email. Also, I’m still studying an 
email Guido sent, so apologies for any redundant questions here.)

Thanks,
Julius

--

___
Python tracker 

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



[issue45934] python curses newterm implementation

2021-12-05 Thread Julius Hamilton

Julius Hamilton  added the comment:

I’m trying to patch this bug.

Here are my current working questions:

1. What is the relationship between an fd (file descriptor) and a terminal?
What software / hardware component goes to “fd 0” to receive input from it?
Is there a GNU Screen command to receive stdin from “fd n”, fd 3 for
example?

2. Looking at the source code:

def initscr():
import _curses, curses
# we call setupterm() here because it raises an error
# instead of calling exit() in error cases.
setupterm(term=_os.environ.get("TERM", "unknown"),
fd=_sys.__stdout__.fileno())
stdscr = _curses.initscr()
for key, value in _curses.__dict__.items():
if key[0:4] == 'ACS_' or key in ('LINES', 'COLS'):
setattr(curses, key, value)
return stdscr

- why does initscr() begin by importing _curses and curses? Precompiled C
curses and non-compiled C or is the second importing Python? How can a
module be importing itself?

- they call “setupterm”, a C curses function, because it raises an error if
there’s a problem in case of just quitting. But how so, specifically? Do
the errors get detected at stderr and then the terminal raises another
error or something? I’m not clear on the details. Plus, why can they call
this function without referring to the enclosing package, curses.setupterm?
Is that a C thing that all functions are automatically added to the
namespace?

- Someone wrote that “initscr” actually calls “newterm”, in the code. So I
guess I should look at the C newterm code, see how it works and see if a
direct implementation is possible.

(I said in an email I would double post an email I sent but instead I’m
posting more specific questions here related to that email. Also, I’m still
studying an email Guido sent, so apologies for any redundant questions
here.)

Thanks,
Julius

On Sun 5. Dec 2021 at 00:01, Éric Araujo  wrote:

>
> Change by Éric Araujo :
>
>
> --
> stage:  -> needs patch
> versions:  -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue45989] Add new function or method to return the dict key with the maximum value

2021-12-05 Thread Eric V. Smith


Eric V. Smith  added the comment:

I agree that we don't need a special function for this, so I'm going to close 
this.

--
nosy: +eric.smith
resolution:  -> rejected
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



[issue45991] Improve ambiguous docstrings in pkgutil

2021-12-05 Thread Kevin Hock


New submission from Kevin Hock :

# Issue

If you search for "list of paths" in 
https://github.com/KevinHock/cpython/blob/main/Lib/pkgutil.py

A lot of people mistake this as `PosixPath`. You can see an example here: 
https://github.com/duo-labs/parliament/pull/207 that references other OSS 
repositories.

# Solution

We can
- Change the wording. e.g. "list of strings of the paths" or some variation of 
that.

and perhaps additionally

- Throw a ValueError similar to: 
https://github.com/python/cpython/blob/628abe4463ed40cd54ca952a2b4cc2d6e74073f7/Lib/pkgutil.py#L122

--
assignee: docs@python
components: Documentation
messages: 407727
nosy: docs@python, khock
priority: normal
severity: normal
status: open
title: Improve ambiguous docstrings in pkgutil
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue45977] Unexpected effect of sys.pycache_prefix = ""

2021-12-05 Thread Christian Heimes


Christian Heimes  added the comment:

It works as designed and documented. An empty string is considered a relative 
directory.

https://docs.python.org/3/library/sys.html#sys.pycache_prefix


> If this is set (not None), Python will write bytecode-cache .pyc files to 
> (and read them from) a parallel directory tree rooted at this directory...
>
> A relative path is interpreted relative to the current working directory.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread miss-islington


miss-islington  added the comment:


New changeset 52a9a71fe682e47f6c78a9c34aa9a797ca632c86 by Miss Islington (bot) 
in branch '3.9':
bpo-27946: Fix possible crash in ElementTree.Element (GH-29915)
https://github.com/python/cpython/commit/52a9a71fe682e47f6c78a9c34aa9a797ca632c86


--

___
Python tracker 

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



[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread miss-islington


miss-islington  added the comment:


New changeset beb834292db54fea129dd073cc822179430cee52 by Miss Islington (bot) 
in branch '3.10':
bpo-27946: Fix possible crash in ElementTree.Element (GH-29915)
https://github.com/python/cpython/commit/beb834292db54fea129dd073cc822179430cee52


--

___
Python tracker 

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



[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What is (snip)?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45934] python curses newterm implementation

2021-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What is it about? The first message is by Guido, but not this message nor the 
title does not give me any idea what is it about.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45984] Error messages for invalid string prefixes and potential attribute accesses

2021-12-05 Thread theeshallnotknowethme


theeshallnotknowethme  added the comment:

Can I know the reason for rejection?

--

___
Python tracker 

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



[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Eryk Sun


Eryk Sun  added the comment:

Windows opens the working directory without delete sharing, so trying to delete 
it fails with a PermissionError for ERROR_SHARING_VIOLATION (winerror 32).

I discussed a modified version of the _rmtree() method in msg377358. The 
proposed version would try to reset the permissions in the first pass, recur 
once, and then give up because the permission error cannot be handled.

--
nosy: +eryksun

___
Python tracker 

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



[issue37295] Possible optimizations for math.comb()

2021-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 60c320c38e4e95877cde0b1d8562ebd6bc02ac61 by Serhiy Storchaka in 
branch 'main':
bpo-37295: Optimize math.comb() and math.perm() (GH-29090)
https://github.com/python/cpython/commit/60c320c38e4e95877cde0b1d8562ebd6bc02ac61


--

___
Python tracker 

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



[issue44166] Make IndexError messages for list more informative

2021-12-05 Thread Spencer Brown


Spencer Brown  added the comment:

One potential solution would be to add two Py_ssize_t to IndexError, storing 
the index and length along with the existing exception value. Then __str__() 
can append that to the message if set, perhaps having len be negative to signal 
they're not passed. 

An issue though is that it might be backwards incompatible with classes trying 
to multiply inherit from other exceptions too. To deal with that it could put 
the values in the args tuple, though then it'd have to allocate the tuple and 
ints which might hurt perf.

--
nosy: +Spencer Brown

___
Python tracker 

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



[issue45662] Incorrect repr of InitVar of a type alias

2021-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1fd4de5bddbbf2a97cdbac4d298c89e1156bdc6c by Serhiy Storchaka in 
branch 'main':
bpo-45662: Fix the repr of InitVar with a type alias to the built-in class 
(GH-29291)
https://github.com/python/cpython/commit/1fd4de5bddbbf2a97cdbac4d298c89e1156bdc6c


--

___
Python tracker 

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



[issue45662] Incorrect repr of InitVar of a type alias

2021-12-05 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45662] Incorrect repr of InitVar of a type alias

2021-12-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28148
pull_request: https://github.com/python/cpython/pull/29924

___
Python tracker 

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



[issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias

2021-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 446be166861b2f08f87f74018113dd98ca5fca02 by Serhiy Storchaka in 
branch 'main':
bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of 
types.GenericAlias (GH-29294)
https://github.com/python/cpython/commit/446be166861b2f08f87f74018113dd98ca5fca02


--

___
Python tracker 

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



[issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias

2021-12-05 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias

2021-12-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28150
pull_request: https://github.com/python/cpython/pull/29926

___
Python tracker 

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



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28152
pull_request: https://github.com/python/cpython/pull/29928

___
Python tracker 

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



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-05 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +28151
pull_request: https://github.com/python/cpython/pull/29927

___
Python tracker 

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



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 2b318ce1c988b7b6e3caf293d55f289e066b6e0f by Serhiy Storchaka in 
branch 'main':
bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a 
base (GH-29298)
https://github.com/python/cpython/commit/2b318ce1c988b7b6e3caf293d55f289e066b6e0f


--

___
Python tracker 

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



[issue45840] Improve cross-references in the data model documentation

2021-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset c0521fe49fd75e794a38a216813658ab40185834 by Alex Waygood in 
branch 'main':
bpo-45840: Improve cross-references in the data model documentation (GH-29633)
https://github.com/python/cpython/commit/c0521fe49fd75e794a38a216813658ab40185834


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue13236] unittest needs more flush calls

2021-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +28153
pull_request: https://github.com/python/cpython/pull/29929

___
Python tracker 

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



[issue45662] Incorrect repr of InitVar of a type alias

2021-12-05 Thread miss-islington


miss-islington  added the comment:


New changeset f1dd5ed1f35a7ed5c3833c822e9965de2400d77e by Miss Islington (bot) 
in branch '3.10':
bpo-45662: Fix the repr of InitVar with a type alias to the built-in class 
(GH-29291)
https://github.com/python/cpython/commit/f1dd5ed1f35a7ed5c3833c822e9965de2400d77e


--

___
Python tracker 

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



[issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias

2021-12-05 Thread miss-islington


miss-islington  added the comment:


New changeset abceb66c7e33d165361d8a26efb3770faa721aff by Miss Islington (bot) 
in branch '3.10':
bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of 
types.GenericAlias (GH-29294)
https://github.com/python/cpython/commit/abceb66c7e33d165361d8a26efb3770faa721aff


--

___
Python tracker 

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



[issue44166] Make IndexError messages for list more informative

2021-12-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I also share Serhiy's concerns and prefer that it be left as-is.

Conceptually, adding more information in the error message would make it more 
useful for debugging, but in practice, it would rarely be helpful.  In teaching 
and coaching Python, I've learned that the intended, dominant effect of seeing 
"IndexError: list index out of range" is that a person understands that index 
is invalid because it is out of range.  That is a helpful dominant impression.  
IMO it would be distracting and rarely helpful to focus on the specific index 
and length.  The important point is that a nonsense lookup was being made.

--
nosy: +rhettinger

___
Python tracker 

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



[issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias

2021-12-05 Thread miss-islington


miss-islington  added the comment:


New changeset 19050711f5a68e50b942b3b7f1f4cf398f27efff by Miss Islington (bot) 
in branch '3.9':
bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of 
types.GenericAlias (GH-29294)
https://github.com/python/cpython/commit/19050711f5a68e50b942b3b7f1f4cf398f27efff


--

___
Python tracker 

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



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-05 Thread miss-islington


miss-islington  added the comment:


New changeset cb68c0a3a4aeb4ec58ab1f71b70bc8bfecbceef6 by Miss Islington (bot) 
in branch '3.10':
bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a 
base (GH-29298)
https://github.com/python/cpython/commit/cb68c0a3a4aeb4ec58ab1f71b70bc8bfecbceef6


--

___
Python tracker 

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



[issue44166] Make IndexError messages for list more informative

2021-12-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Here's another way to think of it:  

The call s[i] raising an IndexError isn't a numerical error, it is a conceptual 
error.  Knowing that i==15 and len(s)==10 doesn't usually help resolve the 
problem.  The fix typically isn't replacing s[i] with s[i - 5].  Usually the 
issue is usually deeper than that.

Note, this is different than KeyError where misspellings are common and where 
the fix can be indicated by knowing the key:   d['missteak'] -> d['mistake'].

--

___
Python tracker 

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



[issue44166] Make IndexError messages for list more informative

2021-12-05 Thread Vedran Čačić

Vedran Čačić  added the comment:

> fix typically isn't replacing s[i] with s[i - 5]

... especially since that will still raise IndexError (in case when i==15 and 
len(s)==10). ;-P

--
nosy: +veky

___
Python tracker 

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



[issue1512163] mailbox (2.5b1): locking doesn't work (esp. on FreeBSD)

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

The original bug has been fixed, so I am closing this. Please create a new 
issue (probably of type enhancement) for the .lock()/.unlock() override support 
if this is still an issue.  The use case/test can be discussed on that issue.

--
nosy: +iritkatriel
resolution:  -> fixed
stage: test needed -> 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



[issue45988] inspect.signature fails on a @staticmethod

2021-12-05 Thread Vedran Čačić

Vedran Čačić  added the comment:

Of course, signature should be imported from inspect, not from typing. In that 
case, the example works on Python 3.10 and 3.11.

--
nosy: +veky

___
Python tracker 

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



[issue45984] Error messages for invalid string prefixes and potential attribute accesses

2021-12-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Check my multiple comments in PR29916

--

___
Python tracker 

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



[issue44166] Make IndexError messages for list more informative

2021-12-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I concur with Serhiy and Raymond and I would prefer to leave as is.

--

___
Python tracker 

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



[issue25668] Deadlock in logging caused by a possible race condition with "format"

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

> Please tell me what is unusual for you with this testcase?

Grabbing a lock in __str__/__repr__ strikes me as unusual and a recipe for 
problems.

You don't really know when those functions are called - from the debugger, from 
exception handlers, etc..   Even if the logging module protected you from the 
deadlock you found, you won't be safe from similar situations with other 
libraries that use locks.

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

___
Python tracker 

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



[issue13821] [doc] misleading return from isidentifier

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
title: misleading return from isidentifier -> [doc] misleading return from 
isidentifier
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5, Python 
3.6

___
Python tracker 

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



[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Toshihiro Kamiya


Toshihiro Kamiya  added the comment:

Sorry, the "(snip)" means that it was omitted because it was too long.
I' ll attach a screenshot.

--
Added file: https://bugs.python.org/file50477/FF2dfQ_acAc497b.png

___
Python tracker 

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



[issue12290] __setstate__ is called for false values

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

See also issue26695.

--
nosy: +iritkatriel
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue26695] pickle and _pickle accelerator have different behavior when unpickling an object with falsy __getstate__ return

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

See also issue12290.

--
nosy: +iritkatriel
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Toshihiro Kamiya


Toshihiro Kamiya  added the comment:

Thank you, eryksun, for pointing out the cause of the problem. I have modified 
the test script and it can now be run on Windows.

The attached file is a revised version of the reproduction script, which 
reflects the modifications made to the test script to prevent the error.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
Added file: https://bugs.python.org/file50478/test_chdir_wo_fail.py

___
Python tracker 

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



[issue38836] Links are duplicated in documentation search result

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

On a Mac I was unable to reproduce this - the link to the search results give 
me a list of two items:

1. os.walk linking to 
https://docs.python.org/3.9/library/os.html?highlight=os.walk#os.walk

2. Changelog linking to 
https://docs.python.org/3.9/whatsnew/changelog.html?highlight=os.walk

However, on windows I got a list of 4 items:

1. os.walk : 
https://docs.python.org/3.9/library/os.html?highlight=os%20walk#os.walk

2. os.fwalk: 
https://docs.python.org/3.9/library/os.html?highlight=os%20walk#os.fwalk

3. os.fwalk: 
https://docs.python.org/3.9/library/os.html?highlight=os%20walk#os.fwalk

4. os.walk: 
https://docs.python.org/3.9/library/os.html?highlight=os%20walk#os.walk


In summary: 

Mac didn't know os.fwalk. Windows didn't show the Changelog. Windows showed 
each link twice.

--
nosy: +iritkatriel
status: open -> pending
versions: +Python 3.10, Python 3.11 -Python 3.5, 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



[issue29317] test_copyxattr_symlinks fails

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue26894] Readline not aborting line edition on sigint

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue31879] Launcher fails on custom command starting with "python"

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +loewis, mhammond
type: behavior -> enhancement

___
Python tracker 

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



[issue16247] Report failing url in URLError?

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

Senthil, can this issue be closed now or is there something left to do?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

I am unable to reproduce this on 3.11. Is it still a problem?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Toshihiro Kamiya


Toshihiro Kamiya  added the comment:

I think it may be difficult to understand the error message that deleting a 
directory causes "RecursionError or stack overflow", though.

I hope the issue reported as msg377358 will be resolved in some way.

--

___
Python tracker 

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



[issue27920] Embedding python in a shared library fails to import the Python module

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

Did Antoine's fix from issue19153 solve your problem?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue27920] Embedding python in a shared library fails to import the Python module

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
status: open -> pending

___
Python tracker 

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



[issue17179] Misleading error from type() when passing unknown keyword argument

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


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



[issue24851] infinite loop in faulthandler._stack_overflow

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


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



[issue23360] Content-Type when sending data with urlopen()

2021-12-05 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



[issue45977] Unexpected effect of sys.pycache_prefix = ""

2021-12-05 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

If CWD=/a/b and pycache_prefix=c, the resulting dir is /a/b/c as I would expect.

If CWD=/a/b and pycache_prefix='', I would expect resulting dir to be /a/b 
 instead of /a/b/a/b .

For example as the shell `cd` command accepts relative path as arg, I would 
expect that `cd c` changes to /a/b/c ; but it would be very strange to expect 
`cd ` with empty arg to change to /a/b/a/b .

--

___
Python tracker 

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



[issue45977] Unexpected effect of sys.pycache_prefix = ""

2021-12-05 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Can this also create the risk of 'path too long' issues?

--

___
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

2021-12-05 Thread neonene


Change by neonene :


--
pull_requests: +28154
pull_request: https://github.com/python/cpython/pull/29930

___
Python tracker 

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



[issue45981] Get raw file name in bytes from ZipFile

2021-12-05 Thread Daniel Hillier


Daniel Hillier  added the comment:

Handling different character sets is not completely supported yet. There are a 
couple of open issues relating to this: https://bugs.python.org/issue40407 
(reading file names), https://bugs.python.org/issue41928 (support for reading 
and writing filenames using the unicode filename extra field) and 
https://bugs.python.org/issue40172 (issues with reading and then writing a 
filename from and back into a zip where the initial filename isn't encoded in 
cp437).

Most modern zip programs that deal with characters outside ascii or cp437 
either set the utf-8 flag or write both an ascii or cp437 compatible filename 
(to the original filename field in the zip header) and the actual filename with 
all non-ascii characters in the unicode filename extra field. I think adding 
support for the unicode field to Python would probably cover the majority files 
generated by modern zip programs.

For complete support, including older zip programs that don't support the utf-8 
flag or unicode filename extra field, we may need to provide another parameter 
in Python's ZipFile's read and write functions to be able to override the 
charset used for the filename stored directly in the zip file header.

I've added my thoughts on how to approach this in 
https://bugs.python.org/issue40172 but haven't had time to implement these 
myself.

--
nosy: +dhillier

___
Python tracker 

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



[issue44166] Make IndexError messages for list more informative

2021-12-05 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue44166] Make IndexError messages for list more informative

2021-12-05 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue44166] Make IndexError messages for list more informative

2021-12-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thank for the suggestion.  While we're going to a pass on this one, no doubt 
there are other places that language can improve its communication with the 
user.  Please continue to submit ideas and patches.

--

___
Python tracker 

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



[issue44092] [sqlite3] Remove special rollback handling

2021-12-05 Thread Ma Lin


Ma Lin  added the comment:

I think this change is no problem.
Erlend E. Aasland's explanation is very clear. 

There is only one situation that a problem may occur. Write code with SQLite 
3.8.7.2+ (2014-11-18), and run it on 3.7.15 (2012-12-12) ~ 3.8.7.1-, but this 
situation may be difficult to happen, we can note this situation in doc.

More securely, if run on SQLite 3.8.7.1-, and encounter SQLITE_ABORT_ROLLBACK 
error code, a prompt can be given to explain the reason.

Also note that the current main branch is buggy. If don't adopt this change or 
revert this change later, don't forget to fix the bug of msg407185 
(`pysqlite_Statement.in_use` flag is not reset).

--
nosy: +malin

___
Python tracker 

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



[issue45934] python curses newterm implementation

2021-12-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

Serhiy, this started with a post by Julius to the core-mentorship list. He 
wants to add newterm(), and found that an issue about that was just created by 
a different user (draganic1) -- apparently without a comment body, so it 
appears the first comment is mine (I didn't know that was possible in bpo).

Windows experts are welcome to take themselves off the nosy list.

--
nosy: +gvanrossum

___
Python tracker 

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



  1   2   >