[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-11-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28062
pull_request: https://github.com/python/cpython/pull/29832

___
Python tracker 

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



[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-11-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 934a82623793e9d52b85f74d5395d65927a52205 by Sam Bull in branch 
'main':
bpo-37658: Actually return result in race condition (GH-29202)
https://github.com/python/cpython/commit/934a82623793e9d52b85f74d5395d65927a52205


--

___
Python tracker 

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



[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-11-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28063
pull_request: https://github.com/python/cpython/pull/29831

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


Change by Christian Heimes :


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

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


Christian Heimes  added the comment:

GH-29768 broke builds on platforms without sem_open (e.g. wasm). GH-29833 fixes 
the issue.

emcc -Wsign-compare -g -O0 -Wall-std=c99 -Wextra -Wno-unused-parameter 
-Wno-missing-field-initializers -Wstrict-prototypes 
-Werror=implicit-function-declaration -fvisibility=hidden  
-I../../Include/internal -IObjects -IInclude -IPython -I. -I../../Include
-DPy_BUILD_CORE_BUILTIN -I../../Modules/_multiprocessing -c 
../../Modules/_multiprocessing/semaphore.c -o 
Modules/_multiprocessing/semaphore.o
../../Modules/_multiprocessing/semaphore.c:16:5: error: unknown type name 
'SEM_HANDLE'
SEM_HANDLE handle;
^
In file included from ../../Modules/_multiprocessing/semaphore.c:38:
../../Modules/_multiprocessing/clinic/semaphore.c.h:220:60: error: unknown type 
name 'SEM_HANDLE'

--

___
Python tracker 

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



[issue45922] Many method, function, built-in... are not clickable and should be

2021-11-29 Thread Alex Waygood


Alex Waygood  added the comment:

I'm already attempting something similar over at 
https://bugs.python.org/issue45840 (though that issue is for one specific piece 
of documentation). See also my attached PR, and the comments on it :)

--
nosy: +AlexWaygood, eric.araujo
versions:  -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



[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread Mark Ao


Mark Ao  added the comment:

I'm experiencing the same issue on Python 3.10.0 when I execute the code that 
uses concurrent.futures.ProcessPoolExecutor.


Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
self.run()
  File "/usr/local/lib/python3.10/concurrent/futures/process.py", line 317, in 
run
result_item, is_broken, cause = self.wait_result_broken_or_wakeup()
  File "/usr/local/lib/python3.10/concurrent/futures/process.py", line 376, in 
wait_result_broken_or_wakeup
worker_sentinels = [p.sentinel for p in self.processes.values()]
  File "/usr/local/lib/python3.10/concurrent/futures/process.py", line 376, in 

PROCESSING DATAFRAME: AKAM
worker_sentinels = [p.sentinel for p in self.processes.values()]
RuntimeError: dictionary changed size during iteration


I also tried to troubleshoot to find out the part that causes this exception, 
but the most difficult part is: it does not happen every time I execute my code 
that uses concurrent.futures.ProcessPoolExecutor. (Really like what Jakub 
mentioend earlier, it is like a coincidence.)

At the same time, I am also testing if the same thing happens on other versions 
like Python 3.8.8 (on Rocky Linux 8.5), but we would appreciate it if someone 
can tell if this is a bug or not? Or even anything we should improve on my own 
code? (if needed I can share the sample code, but honestly I do not think this 
is something wrong with my code, since as I mentioned: the exception is not 
happening every time I execute my code, so I suspect this might be a bug of 
Python 3.10.0)

(Since Jakub already reported it happens on Python 3.9, so I am not testing on 
3.9)

I would appreciate it if there is any update or info that can be shared.

Thank you!

--
nosy: +markao

___
Python tracker 

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



[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-11-29 Thread miss-islington


miss-islington  added the comment:


New changeset 305236e03a274850be8ed399ea3390ee71519ef4 by Miss Islington (bot) 
in branch '3.10':
bpo-37658: Actually return result in race condition (GH-29202)
https://github.com/python/cpython/commit/305236e03a274850be8ed399ea3390ee71519ef4


--

___
Python tracker 

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



[issue45922] Many method, function, built-in... are not clickable and should be

2021-11-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is a good idea in general. Please go ahead, I am sure that the PR will be 
accepted.

But keep in mind that not always additional links make the documentation 
better. The rule of tumb is to not add multiple links to the same entity in one 
paragraph. In many cases the second and the following references are made 
non-links intentionally. There is also not much benefit of making a link to 
itself (if the single-paragraph description of the function contains a 
reference to that function).

--
nosy: +serhiy.storchaka

___
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-11-29 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue45739] The Python implementation of Decimal does not support the "N" format

2021-11-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

You are right about an uppercase converter. I forget this. I withdraw this 
proposition.

It seems that even if we add support of "N" to all numeric formatting it will 
not cover all use cases. "n" is a locale specific variant of "g", but other 
formats could have locale specific variants too. In C all numeric formatting is 
locale specific. Maybe add a flag which makes any numeric formatting locale 
specific? Then "n" will became obsolete.

--

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


Christian Heimes  added the comment:


New changeset 4dc198dedd66e3247aa934fb91c9a158c3eea15a by Christian Heimes in 
branch 'main':
bpo-45847: Fix _multiprocessing on platforms without sem_open (GH-29833)
https://github.com/python/cpython/commit/4dc198dedd66e3247aa934fb91c9a158c3eea15a


--

___
Python tracker 

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



[issue45614] traceback of exception with non-unicode __module__

2021-11-29 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 4d2cc3ed46d2453bad92243128e237e7febca714 by Irit Katriel in 
branch '3.10':
bpo-45614: Fix traceback display for exceptions with invalid module name 
(GH-29726) (GH-29826)
https://github.com/python/cpython/commit/4d2cc3ed46d2453bad92243128e237e7febca714


--

___
Python tracker 

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



[issue45614] traceback of exception with non-unicode __module__

2021-11-29 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 5b6aa6ce20b5b3b45dec2ebd6355e248cdf2fbcc by Irit Katriel in 
branch '3.9':
bpo-45614: Fix traceback display for exceptions with invalid module name 
(GH-29726) (GH-29827)
https://github.com/python/cpython/commit/5b6aa6ce20b5b3b45dec2ebd6355e248cdf2fbcc


--

___
Python tracker 

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



[issue45614] traceback of exception with non-unicode __module__

2021-11-29 Thread Irit Katriel


Change by Irit Katriel :


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



[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-29 Thread keeely

keeely  added the comment:

Regrettably I cannot submit a PR for the docs because I value my online 
anonymity and Python submissions require a real name (IIRC), but my suggestion 
would be pretty simple.

Taking as an example, for termios 
(https://docs.python.org/3/library/termios.html), we currently have:

This module provides an interface to the POSIX calls for tty I/O control. For a 
complete description of these calls, see termios(3) Unix manual page. It is 
only available for those Unix versions that support POSIX termios style tty I/O 
control configured during installation.


For readline (https://docs.python.org/3/library/readline.html#module-readline) 
we have:

The readline module defines a number of functions to facilitate completion and 
reading/writing of history files from the Python interpreter. This module can 
be used directly, or via the rlcompleter module, which supports completion of 
Python identifiers at the interactive prompt. Settings made using this module 
affect the behaviour of both the interpreter’s interactive prompt and the 
prompts offered by the built-in input() function.

In similar way to the first para of the termios description I would add the 
following text:  “It is only available on platforms that support the readline 
functionality, generally POSIX”.


Then perhaps I’d also add to the cmd documentation at 
https://docs.python.org/3/library/cmd.html

The Cmd class provides a simple framework for writing line-oriented command 
interpreters. These are often useful for test harnesses, administrative tools, 
and prototypes that will later be wrapped in a more sophisticated interface.

I would add at the end of that first paragraph:
“Some features will be unavailable on non-POSIX platforms due to the readline 
requirement”.

Hope this helps, if it's not clear I can provide in diff form if you prefer.

--

___
Python tracker 

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



[issue45922] Many method, function, built-in... are not clickable and should be

2021-11-29 Thread Arthur Milchior


Arthur Milchior  added the comment:

Thanks for the warning about double link. I agree with you.
I guess it's another reason why it would be non trivial to automate here.

--

___
Python tracker 

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



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

2021-11-29 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland
nosy_count: 11.0 -> 12.0
pull_requests: +28065
pull_request: https://github.com/python/cpython/pull/29834

___
Python tracker 

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



[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks for the report.

Atomic copy (`list(self.processes.values()`) should fix the bug, sure.

I doubt if writing a reliable test for this situation is possible; 
multithreading is hard.

I think we can accept a patch without a test but with an inline comment that 
describes why copy is crucial.

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



[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
assignee:  -> asvetlov

___
Python tracker 

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



[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-29 Thread keeely


keeely  added the comment:

I'm attaching an example usage of cmd + readline to show how you can have 
context-specific history for sub-shells.  WARNING: WRITES FILES TO CWD! In the 
event that someone does implement this on Windows it would be nice if this 
worked.  That doesn't mean less-capable readline support wouldn't also be 
useful.

thanks.

--
Added file: https://bugs.python.org/file50461/cmd_shell_example.py

___
Python tracker 

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



[issue45921] codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i

2021-11-29 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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



[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +colesbury

___
Python tracker 

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



[issue45921] codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i

2021-11-29 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Even though these are IANA recognized encodings, we need to apply he same logic 
as we do for all new encodings, which essentially boils down to: Are these 
encoding in wider spread use today ?

Reading through the RFC 1556, it seems that the added -i or -e are just 
indications for applications on how to interpret BIDI information: either 
implicit by looking at the order of characters in the stream or explicit via 
control characters embedded in the stream. They are not new encodings, with new 
mappings.

If that's a correct interpretation, we could add those as aliases for the 
non-annotated encodings.

After more than 20 years with Unicode support in Python and the world moving 
towards UTF-8, I have become fairly reluctant towards adding more encoding 
support to Python.

If people are still using unsupported encodings, it's probably better to point 
them to other dedicated tools for converting text to UTF-8, e.g. iconv, than 
extending the pretty extensive support we already have in Python.

--
nosy: +lemburg

___
Python tracker 

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



[issue45923] Improve performance of sys.settracing based tools.

2021-11-29 Thread Mark Shannon


New submission from Mark Shannon :

In our quest for performance, the performance of sys.settracing based tools has 
probably gotten worse.

1. How do we measure this?
2. How do fix this?

We will initially use coverage.py as proxy for all sys.settracing based tools 
when measuring  performance.

The fix is probably to use quickening to insert a minimum set of 
instrumentation instructions required for tracing/profiling.
The existence of `f_trace_opcode` is a bit of a problem however, as we will 
have to instrument *every* instruction.


Ideally, sys.settracing based tools should be faster on 3.11 than 3.10, but at 
the least we should provide a simple alternative to sys.settracing that is 
faster.

--
assignee: Mark.Shannon
components: Interpreter Core
messages: 407263
nosy: Mark.Shannon, nedbat, pablogsal
priority: normal
severity: normal
status: open
title: Improve performance of sys.settracing based tools.
type: performance
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



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

2021-11-29 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset b3f443a35e08a473d52868621e9b268259139cb2 by Erlend Egeberg 
Aasland in branch 'main':
bpo-40280: Disable unusable core extension modules on emscripten (GH-29834)
https://github.com/python/cpython/commit/b3f443a35e08a473d52868621e9b268259139cb2


--

___
Python tracker 

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



[issue45881] Cross compiling on Linux is untested, undocumented, and broken

2021-11-29 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +28066
pull_request: https://github.com/python/cpython/pull/29835

___
Python tracker 

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



[issue45924] Incorrect traceback when future's exception is raised multiple times

2021-11-29 Thread Irit Katriel


New submission from Irit Katriel :

Background: 
https://github.com/python/cpython/pull/29780#issuecomment-981170548
https://github.com/python/cpython/pull/29780#issuecomment-981260365

##

import asyncio, traceback

async def raise_after(fut, delay):
await asyncio.sleep(delay)
fut.set_exception(TypeError(42))

async def main():
loop = asyncio.get_running_loop()
fut = loop.create_future()
loop.create_task(
raise_after(fut, 1))

print('hello ...')

for i in range(3):
try:
print(await fut)
except Exception as e:
traceback.print_exception(e)

asyncio.run(main())
##

Output (traceback accumulates a frame each time):


hello ...
Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main
print(await fut)
  ^
TypeError: 42
Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main
print(await fut)
  ^
  File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main
print(await fut)
  ^
TypeError: 42
Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main
print(await fut)
  ^
  File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main
print(await fut)
  ^
  File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main
print(await fut)
  ^
TypeError: 42

--
components: asyncio
messages: 407265
nosy: asvetlov, gvanrossum, iritkatriel, yselivanov
priority: normal
severity: normal
status: open
title: Incorrect traceback when future's exception is raised multiple times
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue45924] Incorrect traceback when future's exception is raised multiple times

2021-11-29 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.0

2021-11-29 Thread Erlend E. Aasland


New submission from Erlend E. Aasland :

SQLite 3.37.0 was released a couple of days ago: 
https://sqlite.org/releaselog/3_37_0.html

Given that 3.11 feature freeze is approx. May 2022, and that it took approx. 5 
months between SQLite 3.36.0 and 3.37.0, I'd say we aim for a field tested 
SQLite 3.37.0 instead of a possibly fresh-out-of-the-box 3.38.0 in 3.11.

Let's wait a couple of weeks before changing the macOS/Windows installers.

--
components: Windows, macOS
messages: 407266
nosy: erlendaasland, ned.deily, paul.moore, ronaldoussoren, steve.dower, 
tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Upgrade macOS and Windows installers to use SQLite 3.37.0
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



[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 11.0 -> 12.0
pull_requests: +28068
pull_request: https://github.com/python/cpython/pull/29836

___
Python tracker 

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



[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset 7431448b817d3bf87f71661cf8f3d537807ab2e2 by Jakub Kulík in branch 
'main':
bpo-43498: Fix dictionary iteration error in _ExecutorManagerThread (GH-24868)
https://github.com/python/cpython/commit/7431448b817d3bf87f71661cf8f3d537807ab2e2


--
message_count: 10.0 -> 11.0
nosy: +miss-islington
nosy_count: 11.0 -> 12.0
pull_requests: +28068
pull_request: https://github.com/python/cpython/pull/29836

___
Python tracker 

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



[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28069
pull_request: https://github.com/python/cpython/pull/29837

___
Python tracker 

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



[issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11

2021-11-29 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



[issue19460] Add test for MIMENonMultipart

2021-11-29 Thread Andrew Svetlov


Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue45886] Fix Program/_freeze_module for cross compiling Python

2021-11-29 Thread Irit Katriel


Irit Katriel  added the comment:

Is this related to this issue or something else?

https://buildbot.python.org/all/#/builders/310/builds/344

gcc -pthread -c -Wsign-compare -g -Og -Wall-std=c99 -Wextra 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal 
 -I. -I./Include-DPy_BUILD_CORE -o Programs/_freeze_module.o 
Programs/_freeze_module.c
gcc -pthread -o Programs/_freeze_module Programs/_freeze_module.o 
Modules/getbuildinfo.o Parser/token.o  Parser/pegen.o Parser/pegen_errors.o 
Parser/action_helpers.o Parser/parser.o Parser/string_parser.o Parser/peg_api.o 
Parser/myreadline.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o 
Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o 
Objects/bytesobject.o Objects/call.o Objects/capsule.o Objects/cellobject.o 
Objects/classobject.o Objects/codeobject.o Objects/complexobject.o 
Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o 
Objects/genericaliasobject.o Objects/genobject.o Objects/fileobject.o 
Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o 
Objects/interpreteridobject.o Objects/iterobject.o Objects/listobject.o 
Objects/longobject.o Objects/dictobject.o Objects/odictobject.o 
Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o 
Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o 
Objects/picklebufob
 ject.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o 
Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o 
Objects/unicodeobject.o Objects/unicodectype.o Objects/unionobject.o 
Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o 
Python/Python-tokenize.o Python/asdl.o Python/ast.o Python/ast_opt.o 
Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o Python/codecs.o 
Python/compile.o Python/context.o Python/dynamic_annotations.o Python/errors.o 
Python/frame.o Python/frozenmain.o Python/future.o Python/getargs.o 
Python/getcompiler.o Python/getcopyright.o Python/getplatform.o 
Python/getversion.o Python/hamt.o Python/hashtable.o Python/import.o 
Python/importdl.o Python/initconfig.o Python/marshal.o Python/modsupport.o 
Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o Python/preconfig.o 
Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o 
Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/pythonrun.o 
Python/pytime.o Py
 thon/bootstrap_hash.o Python/specialize.o Python/structmember.o 
Python/symtable.o Python/sysmodule.o Python/thread.o Python/traceback.o 
Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/pystrhex.o 
Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o 
Python/suggestions.o Python/dynload_shlib.oModules/config.o 
Modules/getpath.o Modules/main.o Modules/gcmodule.o Modules/atexitmodule.o  
Modules/faulthandler.o  Modules/posixmodule.o  Modules/signalmodule.o  
Modules/_tracemalloc.o  Modules/_codecsmodule.o  Modules/_collectionsmodule.o  
Modules/errnomodule.o  Modules/_io/_iomodule.o Modules/_io/iobase.o 
Modules/_io/fileio.o Modules/_io/bytesio.o Modules/_io/bufferedio.o 
Modules/_io/textio.o Modules/_io/stringio.o  Modules/itertoolsmodule.o  
Modules/_sre.o  Modules/_threadmodule.o  Modules/timemodule.o  
Modules/_weakref.o  Modules/_abc.o  Modules/_functoolsmodule.o  
Modules/_localemodule.o  Modules/_operator.o  Modules/_stat.o  
Modules/symtablemodule.o  Modules/pwdmodule
 .o  Modules/xxsubtype.o -lpthread -ldl  -lutil-lm 
Programs/_freeze_module importlib._bootstrap ./Lib/importlib/_bootstrap.py 
Python/frozen_modules/importlib._bootstrap.h
python3 ./Tools/scripts/deepfreeze.py 
Python/frozen_modules/importlib._bootstrap.h -m importlib._bootstrap -o 
Python/deepfreeze/importlib._bootstrap.c
  File "./Tools/scripts/deepfreeze.py", line 29
res.append(f"\\x{i:02x}")
   ^
SyntaxError: invalid syntax
Makefile:1069: recipe for target 'Python/deepfreeze/importlib._bootstrap.c' 
failed
make: *** [Python/deepfreeze/importlib._bootstrap.c] Error 1
program finished with exit code 2
elapsedTime=45.181814

--
nosy: +iritkatriel

___
Python tracker 

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



[issue45924] Incorrect traceback when future's exception is raised multiple times

2021-11-29 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests:  -28067

___
Python tracker 

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



[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread miss-islington


miss-islington  added the comment:


New changeset 4b11d7118561a12322d3cfa76c5941690b241149 by Miss Islington (bot) 
in branch '3.10':
bpo-43498: Fix dictionary iteration error in _ExecutorManagerThread (GH-24868)
https://github.com/python/cpython/commit/4b11d7118561a12322d3cfa76c5941690b241149


--

___
Python tracker 

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



[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 Thread miss-islington


miss-islington  added the comment:


New changeset 3b9d886567c4fc6279c2198b6711f0590dbf3336 by Miss Islington (bot) 
in branch '3.9':
bpo-43498: Fix dictionary iteration error in _ExecutorManagerThread (GH-24868)
https://github.com/python/cpython/commit/3b9d886567c4fc6279c2198b6711f0590dbf3336


--

___
Python tracker 

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



[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2021-11-29 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 60929576e40038ec71d896230f69e4411c82be4b by Mark Shannon in 
branch 'main':
bpo-45786: Allocate space for frame in frame object. (GH-29729)
https://github.com/python/cpython/commit/60929576e40038ec71d896230f69e4411c82be4b


--

___
Python tracker 

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



[issue45886] Fix Program/_freeze_module for cross compiling Python

2021-11-29 Thread Christian Heimes


Christian Heimes  added the comment:

The issue is related to bpo-45873. The Debian buildbot has an ancient Python 
version that does not support f-strings.

--

___
Python tracker 

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



[issue45926] singledispatchmethod doesn't handle named arguments

2021-11-29 Thread Alisson Oliveira


New submission from Alisson Oliveira :

`functools.singledispatchmethod` doesn't handle named arguments. Ex:

```python
from functools import singledispatchmethod

class Test:
def __init__(self):
...

@singledispatchmethod
def get(self, filters):
return 'Not Implemented!'

@get.register
def _(self, filters: dict):
for k, v in filters.items():
print(k, ' => ' ,  v)

@get.register
def _(self, filters: list):
for f in filters:
print(f)

if __name__ == '__main__':
t = Test()
t.get({'a': 'A'})
t.get(['a'])
t.get(filters={'a': 'A'})
```

This will raise an error:
```
a  =>  A
a
Traceback (most recent call last):
  File "/Users/alisson.oliveira/Farfetch/Git/blueprints-package/main.py", line 
33, in 
t.get(filters={'a': 'A'})
  File 
"/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/functools.py",
 line 926, in _method
method = self.dispatcher.dispatch(args[0].__class__)
IndexError: tuple index out of range
```

the problem is the lib always assume positional arguments in line 194: 
https://github.com/python/cpython/blob/main/Lib/functools.py#L914

--
components: Library (Lib)
messages: 407273
nosy: alisson276
priority: normal
severity: normal
status: open
title: singledispatchmethod doesn't handle named arguments
type: behavior
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-11-29 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



[issue35821] Clarify when logging events are propagated when propagate is true

2021-11-29 Thread Vinay Sajip


Change by Vinay Sajip :


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

___
Python tracker 

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



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

2021-11-29 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +28071
pull_request: https://github.com/python/cpython/pull/29842

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


Christian Heimes  added the comment:


New changeset f7a62f24053c82cf38c3db5848d9ff014470fa40 by Erlend Egeberg 
Aasland in branch 'main':
bpo-45847: Make socket module conditional (GH-29769)
https://github.com/python/cpython/commit/f7a62f24053c82cf38c3db5848d9ff014470fa40


--

___
Python tracker 

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



[issue44391] PC/launcher.c,one more argument than required

2021-11-29 Thread Vinay Sajip


Change by Vinay Sajip :


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

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


Change by Christian Heimes :


--
pull_requests: +28073
pull_request: https://github.com/python/cpython/pull/29844

___
Python tracker 

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



[issue45114] bad example for os.stat

2021-11-29 Thread jiahua wang


Change by jiahua wang :


--
keywords: +patch
nosy: +wangjiahua
nosy_count: 2.0 -> 3.0
pull_requests: +28074
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29845

___
Python tracker 

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



[issue45902] Bytes and bytesarrays can be sorted with a much faster count sort.

2021-11-29 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 26.11.2021 10:56, Ruben Vorderman wrote:
> 
> $ python -m timeit -c "from bytes_sort import bytes_sort" "bytes_sort(b'')"
> 50 loops, best of 5: 495 nsec per loop

Shouldn't this read:

$ python -m timeit -s "from bytes_sort import bytes_sort" "bytes_sort(b'')"

(-s instead of -c) ?

--
nosy: +lemburg

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-29 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +28075
pull_request: https://github.com/python/cpython/pull/29846

___
Python tracker 

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



[issue45927] timeit accepts -c/--clock and -t/--time without any functionality

2021-11-29 Thread Marc-Andre Lemburg


New submission from Marc-Andre Lemburg :

>From the code:

opts, args = getopt.getopt(args, "n:u:s:r:tcpvh",
   ["number=", "setup=", "repeat=",
"time", "clock", "process",
"verbose", "unit=", "help"])

but the options -c and -t are not used in the subsequent code.

This can lead to situations where if you mistype e.g. -s as -c, you get 
completely wrong results (see https://bugs.python.org/issue45902 for an 
example).

--
components: Library (Lib)
messages: 407276
nosy: lemburg
priority: normal
severity: normal
status: open
title: timeit accepts -c/--clock and -t/--time without any functionality
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



[issue45926] singledispatchmethod doesn't handle named arguments

2021-11-29 Thread Alex Waygood


Alex Waygood  added the comment:

This is arguably a duplicate of https://bugs.python.org/issue41122

--
nosy: +AlexWaygood, lukasz.langa, rhettinger
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



[issue44675] Cross-platform issues with private methods and multiprocessing

2021-11-29 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

If we are not going to fix this issue in pickling at this time, I think it 
makes sense to raise an error with a good, clear explanation in 
multiprocessing.Process(target=self.__method), which is affected by this and 
caused some confusion in this issue: #44675 .

Josh: adding you since you reported this issue in another ticket, hope that's 
okay.

--
nosy: +josh.r

___
Python tracker 

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



[issue45912] [argparse] Print texts starting with capital letters and finish with dot for more formality

2021-11-29 Thread Eric V. Smith


Eric V. Smith  added the comment:

I agree with @iritkatriel. Also, such a change to argparse would be too 
disruptive. So, I'm going to close this.

--
components: +Library (Lib) -Parser
nosy: +eric.smith
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue24301] gzip module failing to decompress valid compressed file

2021-11-29 Thread Ruben Vorderman


Ruben Vorderman  added the comment:

>From the spec:

https://datatracker.ietf.org/doc/html/rfc1952


   2.2. File format

  A gzip file consists of a series of "members" (compressed data
  sets).  The format of each member is specified in the following
  section.  The members simply appear one after another in the file,
  with no additional information before, between, or after them.


Gzip files with garbage after them are corrupted or not spec compliant. 
Therefore the gzip module should raise an error in this case.

--
nosy: +rhpvorderman

___
Python tracker 

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



[issue45875] gzip.decompress performance can be improved with memoryviews

2021-11-29 Thread Ruben Vorderman


Change by Ruben Vorderman :


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



[issue45723] Improve and simplify configure.ac checks

2021-11-29 Thread miss-islington


miss-islington  added the comment:


New changeset c1dec9540ab04691f8d4a131671e069913e6eee3 by Erlend Egeberg 
Aasland in branch 'main':
bpo-45723: Sort the grand AC_CHECK_HEADERS check (GH-29846)
https://github.com/python/cpython/commit/c1dec9540ab04691f8d4a131671e069913e6eee3


--

___
Python tracker 

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



[issue24301] gzip module failing to decompress valid compressed file

2021-11-29 Thread Ruben Vorderman


Ruben Vorderman  added the comment:

Whoops. Sorry, I spoke before my turn. If gzip implements it, it seems only 
logical that python's *gzip* module should too. 
I believe it can be fixed quite easily. The code should raise a warning though. 
I will make a PR.

--

___
Python tracker 

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



[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-29 Thread STINNER Victor


STINNER Victor  added the comment:

PyBytes_AS_STRING() and PyByteArray_AS_STRING() are used to modify string 
characters, but not used directly as l-value.

Search in PyPI top 5000 packages:

$ ./search_pypi_top_5000.sh '(PyByteArray|PyBytes)_AS_.*[^!<>=]=[^=]'
pypi-top-5000_2021-08-17/plyvel-1.3.0.tar.gz
pypi-top-5000_2021-08-17/numexpr-2.7.3.tar.gz
pypi-top-5000_2021-08-17/Cython-0.29.24.tar.gz

numexpr-2.7.3, numexpr/numexpr_object.cpp:

PyBytes_AS_STRING(constsig)[i] = 'b';
PyBytes_AS_STRING(constsig)[i] = 'i';
PyBytes_AS_STRING(constsig)[i] = 'l';
PyBytes_AS_STRING(constsig)[i] = 'f';
PyBytes_AS_STRING(constsig)[i] = 'd';
PyBytes_AS_STRING(constsig)[i] = 'c';
PyBytes_AS_STRING(constsig)[i] = 's';

plyvel-1.3.0, plyvel/_plyvel.cpp: 

PyByteArray_AS_STRING(string)[i] = (char) v;
PyByteArray_AS_STRING(string)[i] = (char) v;

Cython-0.29.24:

$ grep -E '(PyByteArray|PyBytes)_AS_.*[^!<>=]=[^=]' -R .
./Cython/Utility/StringTools.c:PyByteArray_AS_STRING(string)[i] = 
(char) v;
./Cython/Utility/StringTools.c:PyByteArray_AS_STRING(string)[i] = 
(char) v;
./Cython/Utility/StringTools.c:PyByteArray_AS_STRING(bytearray)[n] 
= value;

--

___
Python tracker 

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



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

2021-11-29 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 6ac3c8a3140c17bd71ba98dfc5250c371101e77c by Christian Heimes in 
branch 'main':
bpo-40280: Emscripten systems use .wasm suffix by default (GH-29842)
https://github.com/python/cpython/commit/6ac3c8a3140c17bd71ba98dfc5250c371101e77c


--

___
Python tracker 

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



[issue45828] [sqlite3] use unraisable exceptions in callbacks

2021-11-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset c4a69a4ad035513ada1c0d41a46723606b538e13 by Erlend Egeberg 
Aasland in branch 'main':
bpo-45828: Use unraisable exceptions within sqlite3 callbacks (FH-29591)
https://github.com/python/cpython/commit/c4a69a4ad035513ada1c0d41a46723606b538e13


--
nosy: +pablogsal

___
Python tracker 

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



[issue24301] gzip module failing to decompress valid compressed file

2021-11-29 Thread Ruben Vorderman


Change by Ruben Vorderman :


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

___
Python tracker 

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



[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread penguin_wwy


New submission from penguin_wwy <940375...@qq.com>:

Set up file stream for redirecting logs by adding a parameter in `set_debug`.

The stderr is used by default.

--
components: Library (Lib)
messages: 407286
nosy: penguin_wwy
priority: normal
severity: normal
status: open
title: Set up file stream for redirecting GC logs
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread penguin_wwy


Change by penguin_wwy <940375...@qq.com>:


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

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


Christian Heimes  added the comment:


New changeset b394af13f69c1a2ac0e7d32dabf6d86443606ab2 by Christian Heimes in 
branch 'main':
bpo-45847: PY_STDLIB_MOD_SIMPLE now checks py_stdlib_not_available (GH-29844)
https://github.com/python/cpython/commit/b394af13f69c1a2ac0e7d32dabf6d86443606ab2


--

___
Python tracker 

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



[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks for opening this issue..I think you need to elaborate a bit more about 
this feature you are suggesting. In general we don't allow this kind of 
facilities to redirect to file stream anywhere else in the interpreter.

--
nosy: +pablogsal

___
Python tracker 

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



[issue45929] extend json.tool --json-lines to ignore empty rows

2021-11-29 Thread Vito De Tullio


New submission from Vito De Tullio :

It would be useful to let json.tool support empty rows during handling of json 
lines
generally speaking, this tolerance is already present in parsers like srsly and 
jsonlines

actual behavior:

# happy scenario
$ echo -e '{"foo":1}\n{"bar":2}' | python3.10 -mjson.tool --json-lines
{
"foo": 1
}
{
"bar": 2
}
$

# spurious EOL at EOF
$ echo -e '{"foo":1}\n{"bar":2}\n' | python3.10 -mjson.tool --json-lines
{
"foo": 1
}
{
"bar": 2
}
Expecting value: line 2 column 1 (char 1)
$

# two groups of "rows" in jsonl <- my current usecase
$ echo -e '{"foo":1}\n\n{"bar":2}' | python3.10 -mjson.tool --json-lines
{
"foo": 1
}
Expecting value: line 2 column 1 (char 1)
$


my desired outcome is to preserve the EOLs, so to have something like:

# happy scenario
$ echo -e '{"foo":1}\n{"bar":2}' | python3.10 -mjson.tool --json-lines
{
"foo": 1
}
{
"bar": 2
}
$

# spurious EOL at EOF
$ echo -e '{"foo":1}\n{"bar":2}\n' | python3.10 -mjson.tool --json-lines
{
"foo": 1
}
{
"bar": 2
}

$

# two groups of "rows" in jsonl
$ echo -e '{"foo":1}\n\n{"bar":2}' | python3.10 -mjson.tool --json-lines
{
"foo": 1
}

{
"bar": 2
}
$

--
components: Library (Lib)
messages: 407289
nosy: ZeD
priority: normal
severity: normal
status: open
title: extend json.tool --json-lines to ignore empty rows
type: enhancement
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



[issue23017] string.printable.isprintable() returns False

2021-11-29 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

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



[issue45916] documentation link error

2021-11-29 Thread Zachary Ware


Zachary Ware  added the comment:

We had a similar report in bpo-45620, but as Dennis and Eric reported in that 
issue, I can't reproduce that behavior here.

We are using a non-HTTPS link there even though the site supports HTTPS; I'm 
not sure if fixing that might actually fix things for you and others in the 
same situation, though.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, zach.ware

___
Python tracker 

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



[issue45881] Cross compiling on Linux is untested, undocumented, and broken

2021-11-29 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 992565f7f72fd8250b788795f76eedcff5636a64 by Christian Heimes in 
branch 'main':
bpo-45881: configure --with-freeze-module --with-build-python (GH-29835)
https://github.com/python/cpython/commit/992565f7f72fd8250b788795f76eedcff5636a64


--

___
Python tracker 

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



[issue45930] Lambda function bug

2021-11-29 Thread Valery Lovchikov


New submission from Valery Lovchikov :

Python 3.9.7 (default, Sep 10 2021, 14:59:43) 
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> f=[lambda x: y**x for y in [2,3]]
>>> f[0](2)
9
>>> f[1](2)
9
=
I expected 4 as a result of f[0](2), but got 9

--
messages: 407293
nosy: lvch
priority: normal
severity: normal
status: open
title: Lambda function bug
versions: Python 3.9

___
Python tracker 

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



[issue26552] Failing ensure_future still creates a Task

2021-11-29 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

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

___
Python tracker 

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



[issue3354] Improve error reporting for the argument parsing C API

2021-11-29 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced in 3.11:

>>> sorted([1,2,3], reverse=None)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'NoneType' object cannot be interpreted as an integer

--
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.3

___
Python tracker 

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



[issue26552] Failing ensure_future still creates a Task

2021-11-29 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue45930] Lambda function bug

2021-11-29 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This is known behaviour due to binding. Please see  
https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result

--
nosy: +xtreak

___
Python tracker 

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



[issue21915] [doc] telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring

2021-11-29 Thread Irit Katriel


Change by Irit Katriel :


--
title: telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ 
docstring -> [doc] telnetlib.Telnet constructor does not match 
telnetlib.Telnet.__init__ docstring
type:  -> enhancement
versions: +Python 3.11 -Python 2.7, Python 3.4

___
Python tracker 

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



[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread penguin_wwy


penguin_wwy <940375...@qq.com> added the comment:

Thank you for the reminder.

At first, I wanted to analyze the effectiveness of GC through logs.
However, because GC through the stderr output, these logs are mixed in with 
other output(such as warnings). This make it difficult to handle them 
automaticaly.

So, i added an `TestIOWrapper` parameter(Not just file streams, but also other 
io, sockets, buffer and so on) to `set_debug` function in gcmodule.c, to 
redirect GC logs.

I think this will help developers monitor the GC more easily, for example when 
they deal with a memory leak.

Of course, the default will remain the same as the previous behavior , log via 
stderr :)

--

___
Python tracker 

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



[issue23764] [doc] Reference inspect.Signature.bind from functools.wraps documentation

2021-11-29 Thread Irit Katriel


Change by Irit Katriel :


--
title: Reference inspect.Signature.bind from functools.wraps documentation -> 
[doc] Reference inspect.Signature.bind from functools.wraps documentation
versions: +Python 3.11 -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



[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread penguin_wwy


penguin_wwy <940375...@qq.com> added the comment:

Sorry, parameter type is `TextIOWrapper`, not `TestIOWrapper`

--

___
Python tracker 

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



[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

There are several problems with this change:

1) The lifetime of the file descriptor. The file descriptor is borrowed, which 
normally will lead to not being properly cleaned upon failure or interpreter 
deallocation.

2) The statistics you are trying to fetch via parsing the file are actually 
available through better APIS:

https://docs.python.org/3/library/gc.html#gc.callbacks
and
https://docs.python.org/3/library/gc.html#gc.get_stats

3) The stderr output is not stable or considered to be stable between releases. 
The main purpose is to serve as a quick way to debug or check for statistics 
without using proper callbacks, but enything more involved needs to use the 
callbacks.

Based on these, I am afraid I don't feel comfortable supporting this patch :(

--

___
Python tracker 

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



[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

There is another problem: PySys_WriteStderr is faster than your gc_log, which 
can potentially slow down heavy GC-based programs, even if the file descriptor 
is not used.

--

___
Python tracker 

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



[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2021-11-29 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11, and the error message is a little weirder now:

>>> "{0[-1]}".format('fox')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: string indices must be integers, not 'str'

--
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.4

___
Python tracker 

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



[issue45928] Set up file stream for redirecting GC logs

2021-11-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue44391] PC/launcher.c,one more argument than required

2021-11-29 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 4141d94fa608cdf5c8cd3e62f7ea1c27fd41eb8d by Vinay Sajip in branch 
'main':
bpo-44391: Remove unused argument from a varargs call. (GH-29843)
https://github.com/python/cpython/commit/4141d94fa608cdf5c8cd3e62f7ea1c27fd41eb8d


--

___
Python tracker 

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



[issue44391] PC/launcher.c,one more argument than required

2021-11-29 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44391] PC/launcher.c,one more argument than required

2021-11-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28079
pull_request: https://github.com/python/cpython/pull/29850

___
Python tracker 

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



[issue44391] PC/launcher.c,one more argument than required

2021-11-29 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 40a57532a5ad5dfd81ab6c72c5fb2e2dc4509199 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-44391: Remove unused argument from a varargs call. (GH-29843) 
(GH-29850)
https://github.com/python/cpython/commit/40a57532a5ad5dfd81ab6c72c5fb2e2dc4509199


--

___
Python tracker 

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



[issue45930] Lambda function bug

2021-11-29 Thread Eric V. Smith


Change by Eric V. Smith :


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

___
Python tracker 

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



[issue19022] Improve handling of type.__abstractmethods__ descriptor

2021-11-29 Thread Irit Katriel


Change by Irit Katriel :


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



[issue19022] Improve handling of type.__abstractmethods__ descriptor

2021-11-29 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Interpreter Core

___
Python tracker 

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



[issue44391] PC/launcher.c,one more argument than required

2021-11-29 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset af39cfa6ca1e5dc4e5d28c1f09a875a14354e4ae by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-44391: Remove unused argument from a varargs call. (GH-29843) 
(GH-29849)
https://github.com/python/cpython/commit/af39cfa6ca1e5dc4e5d28c1f09a875a14354e4ae


--

___
Python tracker 

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



[issue44391] PC/launcher.c,one more argument than required

2021-11-29 Thread Vinay Sajip


Change by Vinay Sajip :


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

___
Python tracker 

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



[issue45905] Provide a C API for introspectable frames for Cython and similar tools

2021-11-29 Thread da-woods


Change by da-woods :


--
nosy: +da-woods

___
Python tracker 

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



[issue45921] codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i

2021-11-29 Thread Mark Sapiro


Mark Sapiro  added the comment:

The mailman-us...@python.org list received a post with the From: header 
containing a Hebrew display name RFC 2047 encoded with the iso-8859-8-i charset 
which threw a LookupError: unknown encoding: iso-8859-8-i exception in 
processing and shunted the message. The message body also had the charset 
declared as iso-8859-8-i although it contained only ascii. Unfortunately, I 
don't have the original message so I can't say what MUA created it or how 
common this usage is.

I do think that just adding these as aliases for the non-annotated encodings is 
an appropriate response.

--

___
Python tracker 

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



[issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields

2021-11-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28080
pull_request: https://github.com/python/cpython/pull/29851

___
Python tracker 

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



[issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields

2021-11-29 Thread miss-islington


miss-islington  added the comment:


New changeset c1f93f0d378958dfae4f24aad0c0088e3e04e403 by andrei kulakov in 
branch 'main':
bpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154)
https://github.com/python/cpython/commit/c1f93f0d378958dfae4f24aad0c0088e3e04e403


--
nosy: +miss-islington

___
Python tracker 

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



[issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields

2021-11-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28081
pull_request: https://github.com/python/cpython/pull/29852

___
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-11-29 Thread Irit Katriel


Irit Katriel  added the comment:

This seems fixed in 3.11:

>>> from collections import defaultdict
>>> '{foo}{bar}'.format(**defaultdict(str))
Traceback (most recent call last):
  File "", line 1, in 
KeyError: 'foo'

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



[issue45924] Incorrect traceback when future's exception is raised multiple times

2021-11-29 Thread Guido van Rossum


Guido van Rossum  added the comment:

There's a similar issue with concurrent.futures.Future, and really, anything 
that stores exceptions and later raises them can get in trouble if there's a 
way to get the exception raised multiple times. This is rarely noticed because 
usually the exception isn't raised more than once. 

We need separate bpo issues for the other cases.

The fix is easy enough (separately store a traceback and raise using 
e.with_traceback(tb)) so I'm marking this as an easy issue.

--
keywords: +easy -patch
stage: patch review -> needs patch

___
Python tracker 

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



  1   2   >