[issue46004] Incorrect bad token identified in 3.10.1

2021-12-06 Thread Andre Roberge


Andre Roberge  added the comment:

>From 
>(https://friendly-traceback.github.io/docs/syntax_tracebacks_en_3.10.html#for-loop-missing-in-operator),
> this is what was shown for Python 3.10.0

for x range(4):
^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

Same as Python 3.11.0a2.

--

___
Python tracker 

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



[issue46004] Incorrect bad token identified in 3.10.1

2021-12-06 Thread Andre Roberge


New submission from Andre Roberge :

In Python 3.10.1, a change occurred compared with 3.10.0 so that an incorrect 
token is flagged for a SyntaxError.  Also, in 3.11.0a2, the suggestion made 
about having forgotten a comma is incorrect.


Python 3.10.1
for x range(4):
  ^
SyntaxError: invalid syntax

(I no longer have 3.10.0 available but I know from my tests that it was 
identifying correctly the wrong token.)


Python 3.11.0a2
for x range(4):
^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

Python 3.9.5
for x range(4):
  ^
SyntaxError: invalid syntax

Python 3.8.10
for x range(4):
  ^
SyntaxError: invalid syntax

Python 3.7.8
for x range(4):
  ^
SyntaxError: invalid syntax

Python 3.6.8
for x range(4):
  ^
SyntaxError: invalid syntax

--
components: Parser
messages: 407894
nosy: aroberge, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Incorrect bad token identified in 3.10.1
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



[issue14965] super() and property inheritance behavior

2021-12-06 Thread Markus Kitsinger (he/him/his)


Change by Markus Kitsinger (he/him/his) :


--
nosy: +SwooshyCueb
nosy_count: 23.0 -> 24.0
pull_requests: +28175
pull_request: https://github.com/python/cpython/pull/29950

___
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-06 Thread Eryk Sun


Eryk Sun  added the comment:

Whether it should be this way or not, here's how it currently works. 

The builtin virtual paths all end with "python":

static SHEBANG builtin_virtual_paths [] = {
{ L"/usr/bin/env python", TRUE },
{ L"/usr/bin/python", FALSE },
{ L"/usr/local/bin/python", FALSE },
{ L"python", FALSE },
{ NULL, FALSE },
};

parse_shebang() loops over this list, simply matching up to the length of each 
virtual path. Thus "/usr/bin/env python-xyz" is matched as a virtual path. 

Supporting user configured "python*" commands would require more sophisticated 
matching. A virtual command has to consume a suffix that looks like a version 
string in the form "[x[.y]][-32|-64]", as determined by validate_version(). But 
otherwise configured "python*" commands don't have to be matched as virtual 
commands.

--
nosy: +eryksun

___
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-06 Thread Ma Lin


Ma Lin  added the comment:

If the special rollback handling is removed, the behavior of 
Connection.rollback() and 'ON CONFLICT ROLLBACK' clause will be consistent.
See attached file on_conflict_rollback.py.

--
Added file: https://bugs.python.org/file50481/on_conflict_rollback.py

___
Python tracker 

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



[issue45798] Move _decimal build setup into configure

2021-12-06 Thread Ned Deily


Ned Deily  added the comment:

The issue here turned out to be that the architecture selection code for 
libmpdec builds on macOS had been scrambled a bit on the move from setup.py to 
configure. To support universal builds correctly, libmpdec has code to decide 
itself which arch(s) to build with on macOS. PR 29949 restores that behavior 
and macOS universal2 builds (builds which have both native arm64 and x86_64 
binaries in each executable or library file) now work again for 3.11.

--
priority: release blocker -> 
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue45798] Move _decimal build setup into configure

2021-12-06 Thread Ned Deily


Ned Deily  added the comment:


New changeset ddbab69b6d44085564a9b5022b96b002a52b2f2b by Ned Deily in branch 
'main':
bpo-45798: Let libmpdec decide which archs to build on macOS as done 
previously. (GH-29949)
https://github.com/python/cpython/commit/ddbab69b6d44085564a9b5022b96b002a52b2f2b


--

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Ned Deily


Ned Deily  added the comment:

I've now verified that the _bootstrap_python fix for framework builds works - 
removing "release blocker" status. Thanks, Christian!

--
priority: release blocker -> 

___
Python tracker 

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



[issue45798] Move _decimal build setup into configure

2021-12-06 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +28174
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29949

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Zernoxi


Zernoxi  added the comment:

My bad, I guess its not a bug. Didn't read the documents correctly.

--

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Zernoxi


Zernoxi  added the comment:

Is there a way to "ignore" MSYS2 "bin" folder? Because "pyenv" is a wrapper for 
python versions and its python.exe is not explicitly in the PATH environment 
variable.

--

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Zernoxi


Zernoxi  added the comment:

I did some more testing more testing some more testing and saw that eryksun 
pointed out that the PATH environment variable is also being checked. I thought 
that it only checked for registered pythons but anyway. If I remove the "bin" 
folder to MSYS2 then the issue goes away.

--

___
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-06 Thread Eric Snow


Eric Snow  added the comment:

The key point is that loaders should be using the spec, not any of the module 
attrs (like `__file__` and `__cached__`), nor setting them.

For the specific paragraph I referenced, it would look more like:

  It is also appropriate to set __cached__ when __file__ is not set.
  However, that scenario is quite atypical.  Ultimately, __file__ and
  __cached__ are set by the import system from the module spec provided
  by the finder.  The spec instructs the loader.  If a loader can load
  from a cached module but otherwise does not load from a file, that
  atypical scenario may be appropriate.

--

___
Python tracker 

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



[issue46003] os.replace is not cross-platform: at least improve documentation

2021-12-06 Thread Eryk Sun


Eryk Sun  added the comment:

The os module tries to avoid documenting low-level OS behaviors. It would be 
unreliable and difficult to maintain. 

In the case of os.replace(), in Windows it calls MoveFileExW() with the flag 
MOVEFILE_REPLACE_EXISTING [1]. The source and destination paths must be on the 
same volume. The caller must have permission to delete the source path and, if 
it already exists, the destination path. The caller must have permission to add 
a file or directory to the destination directory. Existing opens of the source 
path must share delete access. If the source path is a directory, none of the 
files and directories in its tree is allowed to be open. If the destination 
path already exists, it cannot be a directory, a readonly file, or mapped as a 
process image (i.e. a data mapping is allowed, but an executing EXE or DLL is 
disallowed). Currently, existing opens of the destination path are not allowed, 
even if they share delete access. 

In Windows 10+, there's new support at the NT system call level (i.e. the layer 
beneath the Windows API) to support replacing a file that has existing opens, 
if the file system supports it (e.g. NTFS, ReFS). Delete access is still 
required, so the opens must share delete access. MoveFileExW() has not been 
updated yet to use this new capability. If and when it's supported, the 
requirement for existing opens to share delete access means it won't help in 
general. Most Windows programs, including Python, do not share delete access on 
open files. To share delete access in Python, one can use a custom opener 
function that calls CreateFileW() and wraps the OS handle in an fd via 
msvcrt.open_osfhandle().

---
[1] 
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-movefileexw

--
nosy: +eryksun

___
Python tracker 

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



[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-12-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

I notified lahey.com, and it looks like the behavior is now normal (at least, 
it looks okay by testing with the curl commands). Could someone who say this 
problem in a browser please double-check?

--

___
Python tracker 

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



[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-06 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-06 Thread miss-islington


miss-islington  added the comment:


New changeset c5c365220ed2c867fe81078f70b827de22db2ee6 by 180909 in branch 
'main':
bpo-28953: Use `raise from` when raising new IncompleteRead (GH-29861)
https://github.com/python/cpython/commit/c5c365220ed2c867fe81078f70b827de22db2ee6


--
nosy: +miss-islington

___
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-06 Thread Steve Dower


Steve Dower  added the comment:


New changeset b7ef27bc084665ce58d89fc69530c6f9d2d37754 by Steve Dower in branch 
'main':
bpo-45582: Ensure PYTHONHOME still overrides detected build prefixes (GH-29948)
https://github.com/python/cpython/commit/b7ef27bc084665ce58d89fc69530c6f9d2d37754


--

___
Python tracker 

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



[issue20936] test_strftime: enormous allocation, fails under Clang sanitizer

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

3.5 is no longer maintained. Please create a new issue if you see this on a 
current version (>= 3.().

--
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue21731] Calendar Problem with Windows (XP)

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> locale.py resetlocale throws exception on Windows 
(getdefaultlocale returns value not usable in setlocale)

___
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-06 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +28173
pull_request: https://github.com/python/cpython/pull/29948

___
Python tracker 

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



[issue23819] test_asyncio fails when run under -O

2021-12-06 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 265918bb1d782ab85c7dbc835eb62d6cfc2145b7 by Kumar Aditya in 
branch 'main':
bpo-23819: asyncio: Replace AssertionError with TypeError where it makes sense 
(GH-29894)
https://github.com/python/cpython/commit/265918bb1d782ab85c7dbc835eb62d6cfc2145b7


--
nosy: +asvetlov

___
Python tracker 

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



[issue20459] [doc] No Argument Clinic documentation on how to specify a return converter

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
title: No Argument Clinic documentation on how to specify a return converter -> 
[doc] No Argument Clinic documentation on how to specify a return converter
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4

___
Python tracker 

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



[issue25633] The documentation for urllib.request should mention http.client.HTTPException

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue18531] Undocumented different between METH_KEYWORDS and **kws

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


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



[issue22684] message.as_bytes() produces recursion depth exceeded

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> works for me
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



[issue36706] Python script on startup stucks at import

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


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



[issue38522] Py_USING_MEMORY_DEBUGGER is referenced in docs but not present in code

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
versions: +Python 3.10, Python 3.11 -Python 2.7, 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



[issue8161] inconsistency behavior in ctypes.c_char_p dereferencing

2021-12-06 Thread Eryk Sun


Eryk Sun  added the comment:

This appears to be misreported. The implementation in 3.1.2rc1 looks correct to 
me [1]. Either way, it's out of date.

That said, the emulation of a simple type in an aggregate type is still 
incomplete nowadays. It's not implemented when a c_char or c_wchar array type 
is itself the type of an array. It's also inconsistent with simple types 
because the automatic get-set conversion isn't disabled for subclasses of 
c_char and c_wchar array types. For a subclass, one should have to use the 
`value` attribute.

---
[1] 
https://github.com/python/cpython/blob/v3.1.2rc1/Modules/_ctypes/cfield.c#L110-L137

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

___
Python tracker 

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



[issue13548] line number when tracing an implicit return

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

Yes, you're right. I don't know what I thought I saw before. It works on the 
mac as well.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue46003] os.replace is not cross-platform: at least improve documentation

2021-12-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

I suspect anti-virus software.

--
nosy: +eric.smith

___
Python tracker 

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



[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

> python-snappy-0.6.0: maybe_resize() in snappy/snappymodule.cc

I proposed a fix: https://github.com/andrix/python-snappy/pull/114

--

___
Python tracker 

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



[issue45798] Move _decimal build setup into configure

2021-12-06 Thread Ned Deily


Ned Deily  added the comment:

It looks like this change broke macOS universal2 builds of libmpdec. I'm 
looking at it now but wanted to flag it as a "release blocker" for tagging 
3.11.0a3.

--
nosy: +ned.deily
priority: normal -> release blocker
resolution: fixed -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



[issue13548] line number when tracing an implicit return

2021-12-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The attached badlineevent.py with print updated.

--

___
Python tracker 

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



[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

> In the PyPI top 5000, I found two projects using PyDescr_TYPE() and 
> PyDescr_NAME() as l-value: M2Crypto and mecab-python3. In both cases, it was 
> code generated by SWIG

I proposed a first PR for Py_TYPE():
https://github.com/swig/swig/pull/2116

--

___
Python tracker 

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



[issue13548] line number when tracing an implicit return

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

Terry, I'm pretty sure I saw the problem on the mac earlier. Can you paste the 
contents of tem.py?

--

___
Python tracker 

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



[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Or use python.org installer ;-).

--

___
Python tracker 

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



[issue13548] line number when tracing an implicit return

2021-12-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This seems to be fixed.  On 3.11.0a2 installed on Windows and fresh build of 
.0a2+, I see return on line 11, which is correct.

f:\dev\3x>python ../tem/tem.py
Running Debug|x64 interpreter...
f:\dev\tem\tem.py 7 call
f:\dev\tem\tem.py 8 line
f:\dev\tem\tem.py 10 line
f:\dev\tem\tem.py 11 line
f:\dev\tem\tem.py 11 return

Irit, please confirm (or not) on your *nix system.

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue41174] asyncio.coroutine decorator returns a non-generator function when using PYTHONASYNCIODEBUG

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

asyncio.coroutine was removed in 3.11, and I don't think this will be changed 
in stable versions. I will close this issue unless I am corrected.

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



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

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy

___
Python tracker 

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



[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2021-12-06 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

It's a bit more readable to start by stating what a function does rather than 
what it doesn't do. I also wouldn't worry about possible future minor 
optimizations that might be added, because if that happens, a simple ".. aside 
from internal optimizations, ... " would suffice.

Something like this should work:

The __enter__ method returns the ExitStack instance, and performs no additional 
operations.

 OR

 ... and does not perform any additional operations.

--
nosy: +andrei.avk

___
Python tracker 

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



[issue44077] IP_RECVTOS option is missing from socket module

2021-12-06 Thread Andrei Kulakov


Change by Andrei Kulakov :


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



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

2021-12-06 Thread Brett Cannon


Brett Cannon  added the comment:

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

Change it to "sets" and +1 from me!

--

___
Python tracker 

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



[issue46000] NetBSD curses compatibility

2021-12-06 Thread Thomas Klausner


Thomas Klausner  added the comment:

Done: https://github.com/python/cpython/pull/29947

--

___
Python tracker 

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



[issue46000] NetBSD curses compatibility

2021-12-06 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +28172
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29947

___
Python tracker 

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



[issue46003] os.replace is not cross-platform: at least improve documentation

2021-12-06 Thread nobody


New submission from nobody :

When using threads, os.replace gives no errors on Linux. On Windows however you 
get PermissionErrors like: '[WinError 5] Access is denied' for os.replace and 
'[Errno 13] Permission denied' when reading the os.replace file.
The only way I could get this to work was to add retries with delay.
At least the documentation should be improved.

--
messages: 407864
nosy: hancos
priority: normal
severity: normal
status: open
title: os.replace is not cross-platform: at least improve documentation
type: behavior
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



[issue46000] NetBSD curses compatibility

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:

Could you please open a pull request on GitHub? A PR will run our CI and our 
bots will verify that your changeset follows our guidelines.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Eryk Sun


Eryk Sun  added the comment:

The shebang "#!/usr/bin/env python" searches PATH for 
"python" plus the PATHEXT file extensions.

The shebang "#!/usr/bin/env python3" uses the highest version of Python 3 from 
the registry. It doesn't search PATH because Python installations do not 
necessarily include "python3.exe" or "python3.x.exe" binaries. Alternatives 
that also search PATH for this case have been discussed in prior issues.

--
nosy: +eryksun

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset fc012d801202a9ea139df143b934778060d51a60 by Christian Heimes in 
branch 'main':
bpo-45847: Fix uuid detection on macOS (GH-29946)
https://github.com/python/cpython/commit/fc012d801202a9ea139df143b934778060d51a60


--

___
Python tracker 

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



[issue38523] ignore_dangling_symlinks in shutil.copytree does not apply recursively

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -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



[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-06 Thread Ned Deily


Ned Deily  added the comment:

> How does one go about upgrading their tkinter version?

Since, based on your path names, you appear to be using a Python from 
miniconda, you should check with that project. Perhaps they have a newer 
version available. Good luck!

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-06 Thread Ali Amin-Nejad


Ali Amin-Nejad  added the comment:

It seems like it must be a mac-specific issue just on 8.6.11 then if ned 
couldn't reproduce on 8.6.12. How does one go about upgrading their tkinter 
version? Thanks

--

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Steve Dower


Steve Dower  added the comment:

("2" and "3" are just arbitrary numbers... substitute however many Python 
runtimes you actually have, or "N" and "N+1" if you prefer.)

--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-12-06 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +28171
pull_request: https://github.com/python/cpython/pull/29946

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Steve Dower


Steve Dower  added the comment:

So if I've understood you, there are three Python installs on your machine. Two 
of them are Windows builds, which are listed in the registry and discovered by 
py.exe -0p. The third is the MSYS2 build, which is *not* listed in the registry 
and is *not* discovered by py.exe -0p.

However, when you specify the shebang line "/usr/bin/env python" in a file and 
launch it as "py.exe myfile.py" from a non-MSYS2 prompt, it launches the MSYS2 
Python.

Is that correct?

--

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2021-12-06 Thread Mark Dickinson


Mark Dickinson  added the comment:

I'd support having this functionality available for `format` and for f-strings. 
(As Steven says, changing %-formatting doesn't seem viable.) It really _is_ 
awkward to do this in any other way, and I'm reliably informed that normal 
people don't expect to see negative zeros in formatted numeric output.

It did take me a few minutes to get my head around the idea that 
`f"{-0.01:+.1f}"` would return `"+0.0"` rather than `"-0.0"` or `" 0.0"` or 
just plain `"0.0"` under this proposal, but I agree that it seems like the only 
thing that can be consistent and make sense.

I'm not 100% convinced by the particular spelling proposed, but I don't have 
anything better to suggest. If C++ might be going with a "z", would it make 
sense to do the same for Python?

I don't forsee any implementation difficulties for float and complex types. For 
Decimal, we'd need to "own" the string formatting, taking that responsibility 
away from mpdecimal, but there are already other reasons to do that. Once we've 
done that, again the implementation doesn't seem onerous.

--

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

2021-12-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

import tkinter as tk
tk.Menu(type='')

crashes on current Windows 3.9-11 with 8.6.12

--

___
Python tracker 

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



[issue19864] [doc] multiprocessing Proxy docs need locking semantics explained

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
title: multiprocessing Proxy docs need locking semantics explained -> [doc] 
multiprocessing Proxy docs need locking semantics explained
type:  -> enhancement
versions: +Python 3.11 -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



[issue8161] inconsistency behavior in ctypes.c_char_p dereferencing

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

On 3.11 I'm not getting str for the second expression, I get an empty bytes 
object:


>>> import ctypes
>>> class T(ctypes.Structure):
... _fields_ = (
... ('member', ctypes.c_char * 16),
... )
... 
>>> print('%r'%((ctypes.c_char * 16)()[:]))
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
>>> print('%r'%(T().member[:]))
b''

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



[issue41062] Advanced Debugger Support C-API is useless without HEAD_LOCK()/HEAD_UNLOCK()

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.10, Python 3.5, 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



[issue27016] BlockingIOError not raised inside function.

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

On a Mac I get the "BlockingIOError: [Errno 35] Resource temporarily 
unavailable" with both version (with and without the function).

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



[issue45995] string formatting: normalize negative zero

2021-12-06 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +eric.smith

___
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-06 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset f16f93e5279f957ca25dd8b91233a44833167a8a by Christian Heimes in 
branch 'main':
bpo-45582: framework build: modPath must not be const (GH-29944)
https://github.com/python/cpython/commit/f16f93e5279f957ca25dd8b91233a44833167a8a


--

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Zernoxi


Zernoxi  added the comment:

I am launching "py" from a regular prompt ("powershell"). I should only have 2 
registered python versions in the registry. "py -0p" shows the correct 
information.

One thing to note is that if I "#!/usr/bin/env python3 -V", it will show the 
correct default python3 version and is consistence when in a virtual 
environment.

--

___
Python tracker 

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



[issue45992] distutils paths are scattered between PythonXY and PythonXY-32 on WoW64

2021-12-06 Thread Tzu-ping Chung

Tzu-ping Chung  added the comment:

They are old, but so are purelib and platlib, which were changed regardless. 
The problem is that distutils’s values are now half wrong and half right, 
neither matching pre-3.10 behaviour, nor matching post-3.10 sysconfig behaviour.

--

___
Python tracker 

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



[issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError

2021-12-06 Thread James Gerity


James Gerity  added the comment:

Correction: the bug whose resolution adds the OverflowError mentioned above is 
bpo-24522, not bpo-43255

--

___
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-06 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +28170
pull_request: https://github.com/python/cpython/pull/29944

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Steve Dower


Steve Dower  added the comment:

Are you launching "py" from inside MSYS2? Or a regular prompt?

What does the output of "py -0p" show? (It should list all the discovered 
installs)

We might need someone who understands how MSYS2 works here, because I don't.

--

___
Python tracker 

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



[issue45992] distutils paths are scattered between PythonXY and PythonXY-32 on WoW64

2021-12-06 Thread Steve Dower


Steve Dower  added the comment:

They should all be under "-32" when in roaming appdata, because otherwise 
having 32-bit and 64-bit installs side-by-side will conflict.

If these fields were newly added to distutils then should probably fix them to 
match sysconfig. If they're old and wrong, I'd just ignore them.

--

___
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-06 Thread Steve Dower


Steve Dower  added the comment:


New changeset af1db4eb555e02d2bff3476f99f7a653764203b0 by neonene in branch 
'main':
bpo-45582: Fix getpath_isxfile() and test_embed on Windows (GH-29930)
https://github.com/python/cpython/commit/af1db4eb555e02d2bff3476f99f7a653764203b0


--

___
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-06 Thread Steve Dower


Steve Dower  added the comment:

Not sure if Mark and Martin are part of an expert group, but neither are active 
in this area these days.

For the original question, I have no idea why the command can't use a builtin 
name, so hard to say whether we'd change it. A summary of why it's broken and 
what the fix would be is needed before we can say whether the change would be 
accepted or not.

--

___
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-06 Thread Julius Hamilton

Julius Hamilton  added the comment:

I’m currently planning on studying the C code for initscr and newterm so I can 
really understand how they work.

I’ll post any updates about this soon.

Thanks.

--

___
Python tracker 

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



[issue45997] asyncio.Semaphore waiters deque doesn't work

2021-12-06 Thread Yevhenii Hyzyla


Yevhenii Hyzyla  added the comment:

Thanks for response!

> A hero who can help is welcome!

I will try to make PR :raising_hand

--
type: behavior -> 
versions: +Python 3.8 -Python 3.11

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Tze Chian Kam


Tze Chian Kam  added the comment:

This is not in a a virtual environment by the way.

--

___
Python tracker 

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



[issue45997] asyncio.Semaphore waiters deque doesn't work

2021-12-06 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Or, maybe, there is a way to do everything without changing public API.

The idea is: _wake_up_next can create a future which is set by *waked up task* 
on its acquiring. acquire method should wait for this future first before 
entering in `while self._value < 0:` loop.

If the future is cancelled, `_wake_up_next` should be called again and waiting 
for the next future acquiring to be performed.

If there is no *acquire waiting* future exists -- do everything as usual.

All other lock objects should be modified also.

--
title: asyncio.Semaphore waiters deqeueu doesn't work -> asyncio.Semaphore 
waiters deque doesn't work
type:  -> behavior
versions: +Python 3.11 -Python 3.8

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Tze Chian Kam


New submission from Tze Chian Kam :

Using "pyenv" for python installations. "py" launcher detects all installed 
python versions from "pyenv". When using the shebang feature, if the following 
shebang is specified, "#!/usr/bin/env python -V", it will detect python version 
of "3.9.9" from MSYS2 (where the latest version is "3.9.9"). But MSYS2 python 
is not in registered in registry so it should not be detecting it.

--
components: Windows
messages: 407840
nosy: Zernoxi, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: py Launcher for Windows with MSYS2
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError

2021-12-06 Thread James Gerity


Change by James Gerity :


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

___
Python tracker 

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



[issue45994] Add simple usage to email module

2021-12-06 Thread Taiga Katarao


Taiga Katarao  added the comment:

There are the simplest example to send text email and a little bit complicated 
example to an email with some files.

However, beginners like me want simple example to create an email composed of 
the combination of multipart/alternative and multipart/mixed.

There are many web sites to explain sending an email composed of 
multipart/alternative and multipart/mixed, but all of them use MIMEText and 
MIMEMultipart, which can be replaced and simplified with EmailMessage like 
below.

```
import smtplib
from email.message import EmailMessage

msg = EmailMessage()
msg['From'] = 'f...@example.com'
msg['To'] = 't...@example.com'
msg['Subject'] = 'Subject'

msg.add_alternative('Hello, world.', subtype='text')
msg.add_alternative('Helo, world.', subtype='html')
with open('example.pdf', 'rb') as f:
msg.add_attachment(
f.read(),
maintype='application',
subtype='pdf',
filename='example.pdf'
)

with smtplib.SMTP('SMTP_HOST', 'SMTP_PORT') as smtp:
smtp.starttls()
smtp.login('USER', 'PASSWORD')
smtp.send_message(msg)
```

Of cause I know we can obtain the code above from the combination of existing 
example codes, but it's a little bit difficult.

I guess the reason why they cannot find simple way partially because the 
official documentation does not provide example.

--

___
Python tracker 

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



[issue45755] Specialized generic class does not return class attributes in dir

2021-12-06 Thread Ken Jin


Ken Jin  added the comment:

Not exactly sure if this is a bug, but the reason is that Foo[int] used to be a 
class, now it's a plain object. It's a change brought in 3.7 by PEP 560.

3.6:
>>> isinstance(Foo[int], type)
True
>>> Foo[int].__dir__
>> type(Foo[int].__dir__)


main:
>>> isinstance(Foo[int], type)
False
>>> Foo[int].__dir__

>>> type(Foo[int].__dir__)


The fix is just a 2-line change in either _GenericAlias or _BaseGenericAlias:
+def __dir__(self):
+return dir(self.__origin__)

Should we go ahead with this?

--

___
Python tracker 

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



[issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError

2021-12-06 Thread James Gerity


New submission from James Gerity :

The docstrings for `json.JSONEncoder, json.dump(), json.dumps()` all refer to 
`OverflowError` when describing the behavior of the `check_circular` parameter, 
but the module's test of this parameter catches a `RecursionError` and the 
documentation does make reference to recursion.

Since the fix for bpo-43225 (7b78d43) the string-escaping machinery in 
`_json.c` is capable of raising OverflowError, but the reference in the 
documentation predates this addition by quite a long time.

--
assignee: docs@python
components: Documentation
messages: 407837
nosy: SnoopJeDi, docs@python
priority: normal
severity: normal
status: open
title: JSON module documentation mentions OverflowError for case that raises 
RecursionError
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



[issue45997] asyncio.Semaphore waiters deqeueu doesn't work

2021-12-06 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Good point.
Currently, asyncio lock objects don't provide a strong FIFO guarantee.

In a tight loop, a task can re-acquire the lock just after releasing even if 
there are pending waiters that were scheduled earlier. It's true also for Lock, 
Conditional, Event, etc.

The solution requires *async* release method. Since the change is not backward 
compatible, a new method should be added, e.g. `await sem.release_and_wait()` 
for endorsing the context switch if there are pending waiters.

async context manager can be modified for using the new method without backward 
compatibility problems easily.

A hero who can help is welcome!

--
assignee:  -> asvetlov
title: asyncio.Semaphore waiters deque doesn't work -> asyncio.Semaphore 
waiters deqeueu doesn't work
type: behavior -> 

___
Python tracker 

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



[issue45973] Not possible to clear PyImport_Inittab after PyImport_AppendInittab

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-1 (fixed).

--

___
Python tracker 

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



[issue22815] unexpected successes are not output

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

Or do you mean that there should be more output?

--
status: pending -> open

___
Python tracker 

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



[issue22815] unexpected successes are not output

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

I think this has been fixed:

% cat mm.py 
import unittest

class TestStringMethods(unittest.TestCase):

@unittest.expectedFailure
def test_upper(self):
self.assertEqual(2, 2)

if __name__ == '__main__':
unittest.main()




% ./python.exe mm.py 
x
--
Ran 1 test in 0.001s

OK (expected failures=1)
iritkatriel@Irits-MBP cpython % vi mm.py  
iritkatriel@Irits-MBP cpython % ./python.exe mm.py
u
--
Ran 1 test in 0.000s

FAILED (unexpected successes=1)

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue45973] Not possible to clear PyImport_Inittab after PyImport_AppendInittab

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

Currently, the global variable PyImport_Inittab is used. It should be made 
per-interpreter and I suggest to add something like PyConfig_AppendInittab() to 
the PyConfig API, so the configuration change would only impact a single 
interpreter. It would be possible to run two interpreters with two different 
inittab configuration.

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



[issue31139] Improve tracemalloc demo code in docs

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

https://github.com/python/cpython/pull/3020 is closed, I close this issue as 
well.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:

Ned, I have implemented a fix for _bootstrap_python for framework builds and 
re-enabled --with-build-python for all builds. Previously I disabled the option 
for standard builds, because --with-build-python can cause build issues when a 
user runs ./configure --with-build-python with an older 3.11 alpha build.

--

___
Python tracker 

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



[issue21952] fnmatch.py can appear in tracemalloc diffs

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

Exposing internal caches in tracemalloc is not a bug but a deliberate choice. 
It's easy to write your own filters to ignore selected files (or even specific 
functions if you can locate them by line nubmers).

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



[issue44016] Enum related deprecation warnings in test_httpservers and test_faulthandler

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

test_httpservers warnings have been fixed.

I cannot reproduce test_faulthandler warnings. I close the issue. If someone 
still gets warnnings in test_faulthandler, please provide the full command line 
to reproduce them.


commit d3b9134ebb40bdb01ff52a37515c7c96970c9a0b
Author: Shreyan Avigyan 
Date:   Tue May 4 00:57:47 2021 +0530

Remove Enum warnings from test_httpservers (GH-25844)

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 612e59b53f0c730ce1b881f7c08dc6d49f02c123 by Christian Heimes in 
branch 'main':
bpo-45950: Fix macOS framework builds of _bootstrap_python (GH-29936)
https://github.com/python/cpython/commit/612e59b53f0c730ce1b881f7c08dc6d49f02c123


--

___
Python tracker 

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



[issue12413] make faulthandler dump traceback of child processes

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

There is not activity for 10 years. I consider that this feature is not really 
needed. I reject this feature request.

--
resolution:  -> rejected
stage: needs patch -> 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



[issue46000] NetBSD curses compatibility

2021-12-06 Thread Thomas Klausner


New submission from Thomas Klausner :

The code in Modules/_cursesmodule.c has an assumption on ncurses.
The attached simple patch fixes this and works with both NetBSD curses and 
ncurses.

--
components: Extension Modules
files: patch-Modules___cursesmodule.c
messages: 407825
nosy: wiz
priority: normal
severity: normal
status: open
title: NetBSD curses compatibility
type: behavior
versions: Python 3.10
Added file: https://bugs.python.org/file50480/patch-Modules___cursesmodule.c

___
Python tracker 

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



[issue45999] Links to packaging broken

2021-12-06 Thread Douglas Wright


New submission from Douglas Wright :

Links in this section from the docs from 3.9 and newer are currently broken.

https://docs.python.org/3.9/distributing/index.html#reading-the-python-packaging-user-guide

They are currently leading to a "page not found" error.

--
assignee: docs@python
components: Documentation
messages: 407824
nosy: docs@python, douglas277
priority: normal
severity: normal
status: open
title: Links to packaging broken
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



[issue45997] asyncio.Semaphore waiters deque doesn't work

2021-12-06 Thread Alex Waygood


Change by Alex Waygood :


--
type:  -> behavior

___
Python tracker 

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



[issue45997] asyncio.Semaphore waiters deque doesn't work

2021-12-06 Thread Alex Waygood


Change by Alex Waygood :


--
title: asyncio.Semaphore waiters deqeueu doesn't work -> asyncio.Semaphore 
waiters deque doesn't work

___
Python tracker 

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



[issue13548] line number when tracing an implicit return

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11. 


An implicit return doesn't have a line, so it's not clear what should happen. 
Assigning the next line to it wouldn't be correct either (it could be the first 
line of the next function). 

We could say that in this case there is no line event, just a return event 
(unless that messes up the tracer somehow).

If you add a return statement it makes sense:

/Users/iritkatriel/src/cpython/mm.py 7 call
/Users/iritkatriel/src/cpython/mm.py 8 line
/Users/iritkatriel/src/cpython/mm.py 10 line
/Users/iritkatriel/src/cpython/mm.py 11 line
/Users/iritkatriel/src/cpython/mm.py 14 line
/Users/iritkatriel/src/cpython/mm.py 14 return

(line 13 does not appear because that's the else, the return is assigned line 
14 which is where it really is).

--
nosy: +iritkatriel
title: Invalid 'line' tracer event on pass within else clause -> line number 
when tracing an implicit return
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2021-12-06 Thread John Belmonte


John Belmonte  added the comment:

Here is the same proposal made for C++ `std::format`:

  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1496r2.pdf

It makes fair arguments for the feature's use, and explains why the problem is 
hard to work around.

It was withdrawn by the author for C++20, but a consensus proposal is promised 
for C++23.

--

___
Python tracker 

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



[issue45998] Document best practice for including and linking python framework

2021-12-06 Thread Ronald Oussoren


New submission from Ronald Oussoren :

There are two ways to develop against a Python.framework on MacOS:

1. Use the regular Unix pattern with "#include "Python.h", using compiler flags 
to select the right headers and libraries.

2. Using the native framework pattern with "#import " and 
"-framework Python"

Both works, but the latter has the disadvantage of loosing control over which 
version of Python is used when multiple versions are installed.  The version is 
selected by the "Current" link in the framework, which is overwritten to point 
to whatever version was last installed or updated.

IMHO we should document this pitfall in the C API documentation.

--
assignee: docs@python
components: Documentation, macOS
messages: 407821
nosy: docs@python, ned.deily, ronaldoussoren
priority: normal
severity: normal
stage: needs patch
status: open
title: Document best practice for including and linking python framework
type: enhancement
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



[issue36392] IPv4Interface Object has no attributte prefixlen

2021-12-06 Thread Ken Jin


Ken Jin  added the comment:

The link to what Andrei is referring to:
https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network.prefixlen

--

___
Python tracker 

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



[issue29309] Interpreter hang when interrupting a loop.run_in_executor() future

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

@asyncio.coroutine was removed in 3.10, and the run_in_executor.py doesn't run 
with async def because that does not allow yield.

I'll close this as out of date, please create a new issue if you are still 
having a related problem with async def.

--
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



  1   2   >