[issue40255] Fixing Copy on Writes from reference counting and immortal objects

2022-02-11 Thread Inada Naoki


Inada Naoki  added the comment:

I think making more objects immortal by default will reduce the gap, although I 
am not sure it can be 2%. (I guess 3% and I think it is acceptable gap.)

* Code attributes (contents of co_consts, co_names, etc...) in deep frozen 
modules.
  * only if subinterpreter shares them.
* Statically allocated strings (previously _Py_IDENTIFIER)

To reduce gap more, we need to reduce Python stack operation in ceval in some 
way.

--

___
Python tracker 

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



Re: PermissionError: [Errno 13] Permission denied: 'Abc.xlsx'

2022-02-11 Thread Dennis Lee Bieber
On Fri, 11 Feb 2022 20:37:57 +0100, "Peter J. Holzer" 
declaimed the following:

>Interestingly, Excel did have the ability for multiple users editing the
>same file at some time (maybe early 2000s? Way before Google docs or
>Office 365). It had to be explicitely enabled and it didn't work very
>reliably (at least not with Samba as file servers), so we never really
>used it but it is clear that somebody at MS thought that users needed or
>at least wanted that ability.

A quick Google does find mention of "shared workbooks":
https://docs.microsoft.com/en-us/office/troubleshoot/excel/use-shared-workbook
https://support.microsoft.com/en-us/office/what-happened-to-shared-workbooks-150fc205-990a-4763-82f1-6c259303fe05

The preferred mode requires "Microsoft 365 subscription" and latest
Office version:
https://support.microsoft.com/en-us/office/collaborate-on-excel-workbooks-at-the-same-time-with-co-authoring-7152aa8b-b791-414c-a3bb-3024e46fb104

However -- the key feature is that these are Excel-Excel(-Excel...)
operations (and the co-author mode needs M$ subscription and use of
OneDrive cloud storage). 

Most Python libraries are working directly with the Excel format data
file, not by running Excel. 

Caveat: there is a product that appears to use the Excel component API
to control Excel itself, not just read/write xls(*) files -- so it might
understand the older shared workbook mode, but I'd recommend a detailed
study of the API and the sharing operations first:
https://www.xlwings.org/
https://docs.xlwings.org/en/stable/
"""
xlwings (Open Source) is a BSD-licensed Python library that makes it easy
to call Python from Excel and vice versa:
*   Scripting: Automate/interact with Excel from Python using a syntax
close to VBA.
*   Macros: Replace VBA macros with clean and powerful Python code.
*   UDFs: Write User Defined Functions (UDFs) in Python (Windows only).
"""

If running under Windows, similar capability should be possible using
the win32py (or whatever the current name is) extension... Or with more
difficulty, ctypes!


-- 
Wulfraed Dennis Lee Bieber AF6VN
wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue46586] In documentation contents enum.property erroneously links to built-in property

2022-02-11 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 9d9cfd61ec3cbe84dbc25c74f664877f3d02b8ef by Meer Suri in branch 
'main':
bpo-46586: Fix documentation links (GH-31216)
https://github.com/python/cpython/commit/9d9cfd61ec3cbe84dbc25c74f664877f3d02b8ef


--

___
Python tracker 

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



[issue46666] IDLE Add indent guide

2022-02-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am guessing that N++ or its GUI framework uses a transparent overlay.  For 
tkinter, that would mean a transparent Canvas on which one could draw vertical 
dotted gray lines 1-pixel wide.  However, Serhiy Storchaka in msg213643 of 
#20920 said: "Tk supports alpha only for photo images and as an attribute of 
top-level window. It doesn't support alpha component in colors."

I searched 'tkinter transparent canvas'.

For pixel positioning, photos with transparent backgrounds can only be used on 
a canvas.  This was one of the answers to 
https://stackoverflow.com/questions/53021603/how-to-make-a-tkinter-canvas-background-transparent
More details, using pil(low) to make images, are in the following:
https://www.tutorialspoint.com/how-to-make-a-tkinter-canvas-rectangle-transparent
https://www.javaer101.com/en/article/921105.html

Another answer to the SO question, for Windows only, was to pip install pywin32 
and use various calls to make a canvas layered with a transparent colorkey.  
Perhaps the same could be done, at least on Windows, with ctypes.

A top-level background is made (partially) transparent with 
"top.attributes('-alpha', d)" where d in [0.0-1.0].  On Windows, 
'top.wm_attributes('-transparentcolor', keycolor) makes that keycolor actually 
be transparent, like the green/blue screen used in television and movies. But 
any keycolor pixel in the toplevel exposes the screen beneath the toplevel, not 
the widget in the toplevel.  This detail is not clear in the tk docs.
https://www.youtube.com/watch?v=75jbNpc8vN4
What also is not clear is whether the keycolor applies only to the one toplevel 
or all toplevels, nor what happens when one toplevel is over another.

I summarized the above so I or anyone else can find the information.  I am 
closing this issue for now, but someone can reopen if the situation changes.

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

___
Python tracker 

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



[issue46727] Should shutil functions support bytes paths?

2022-02-11 Thread Jelle Zijlstra


New submission from Jelle Zijlstra :

The shutil documentation doesn't say anything about bytes paths, and the 
CPython unit tests don't test them. But some functions do work with bytes paths 
in practice, and on typeshed we've received some requests to add support for 
them in the type stubs.

Links:
- https://github.com/python/typeshed/pull/7165/files (shutil.unpack_archive 
works with bytes paths, but only sometimes)
- https://github.com/python/typeshed/pull/6868 (shutil.make_archive)
- https://github.com/python/typeshed/pull/6832 (shutil.move accepts bytes 
paths, except when moving into an existing directory)

My overall impression is that bytes paths sometimes work by accident because 
they happen to not hit any code paths where we do os.path.join or string 
concatenation, but relying on them is risky because minor changes in the call 
site or in the file system can cause the call to break.

Here's three possible proposals:

(1) We document in the shutil docs that only str paths are officially 
supported. Bytes paths may sometimes work, but do it at your own risk.

(2) We add this documentation, but also make code changes to deprecate or even 
remove any support for bytes paths.

(3) We decide that bytes paths are officially supported, and we add tests for 
them and fix any cases where they don't work.

My preference is for (1). (2) feels like gratuitously breaking backward 
compatibility, and (3) is more work and there is little indication that bytes 
path support is a desired feature.

--
components: Library (Lib)
messages: 413113
nosy: AlexWaygood, Jelle Zijlstra, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Should shutil functions support bytes paths?
type: behavior
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



[issue46282] return value of builtins is not clearly indicated

2022-02-11 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy:  -rhettinger

___
Python tracker 

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



[issue46726] Thread spuriously marked dead after interrupting a join call

2022-02-11 Thread Ben


Change by Ben :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-02-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ba5725171d9c411fc4764349205eff5cfc028797 by Erlend Egeberg 
Aasland in branch 'main':
bpo-46355: Amend What's New in Python 3.11 C API wording (GH-31288)
https://github.com/python/cpython/commit/ba5725171d9c411fc4764349205eff5cfc028797


--

___
Python tracker 

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



[issue46722] Different behavior for functiools.partial between inspect.isfunction() and other inspect.is*function()

2022-02-11 Thread Kevin Shweh


Kevin Shweh  added the comment:

Frankly, it doesn't make sense that isgeneratorfunction or iscoroutinefunction 
unwrap partials at all. The original justification for making them do that back 
in https://bugs.python.org/issue34890 was invalid - the original argument was 
that isfunction unwraps partials, but it doesn't, and I don't think it ever did.

isfunction is supposed to be a very specific check for Python function objects. 
It rejects all sorts of other callables, like sum (a built-in function), super 
(a type), or method objects (which wrap functions in a very similar way to 
partial). Having it be a check for *either* a Python function object *or* a 
partial object wrapping a Python function object seems to just make it less 
useful.

--
nosy: +Kevin Shweh

___
Python tracker 

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



[issue46726] Thread spuriously marked dead after interrupting a join call

2022-02-11 Thread Ben


Ben  added the comment:

You are right,

What one really needs here is a way to know *who* owns the lock,
but threading.Lock does not provide that.

The race on := is much smaller than the original race and I suspect in practice 
will be very hard to hit.

As the original bpo notes, it may not be possible to write a complete fix for 
this in pure Python, after all there may always be another interrupt between 
the `except` and the second attempted `release`.

The issue with the solution was that it turned a relatively hard-to-hit race 
condition into a really easy-to-hit one,  but perhaps the outcome is slightly 
less worse?

--

___
Python tracker 

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



[issue46726] Thread spuriously marked dead after interrupting a join call

2022-02-11 Thread Kevin Shweh


Kevin Shweh  added the comment:

The PR you submitted doesn't work, unfortunately. It essentially reintroduces 
issue 45274. If this line:

if locked := lock.acquire(block, timeout):

gets interrupted between the acquire and the assignment, locked is still False. 
That's rare, but so is an interruption between the acquire and the release, 
which is the original form of issue 45274.

--

___
Python tracker 

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



[issue46726] Thread spuriously marked dead after interrupting a join call

2022-02-11 Thread Kevin Shweh


Kevin Shweh  added the comment:

Issue 45274 was a subtly different issue. That was a problem that happened if 
the thread got interrupted *between* the acquire and the release, causing it to 
*not* release the lock and *not* perform end-of-thread cleanup.

The fix for that issue caused this issue, which happens if the thread gets 
interrupted *during* the acquire, in which case it *does* release the lock 
(that someone else is holding) and *does* perform end-of-thread cleanup even 
though it's not supposed to do either of those things.

--

___
Python tracker 

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



[issue46726] Thread spuriously marked dead after interrupting a join call

2022-02-11 Thread James Gerity


Change by James Gerity :


--
nosy: +SnoopJeDi

___
Python tracker 

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



[issue46726] Thread spuriously marked dead after interrupting a join call

2022-02-11 Thread Ben


Change by Ben :


--
nosy: +vstinner

___
Python tracker 

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



[issue46726] Thread spuriously marked dead after interrupting a join call

2022-02-11 Thread Ben


Ben  added the comment:

This is a duplicate of https://bugs.python.org/issue45274
but the patch there did not fix it

I've just added a PR there (or should it go here?) that (i think) fixes this.

The issue is that the lock.locked() call just checks that *someone* has the 
lock, not that the previous acquire() is what got the lock.
If it's just that the tstate lock is held because the thread is still running,  
then it's premature to release() the lock.

--
nosy: +bjs

___
Python tracker 

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



[issue45274] Race condition in Thread._wait_for_tstate_lock()

2022-02-11 Thread Ben


Change by Ben :


--
nosy: +bjs
nosy_count: 6.0 -> 7.0
pull_requests: +29450
pull_request: https://github.com/python/cpython/pull/31290

___
Python tracker 

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



[issue46726] Thread spuriously marked dead after interrupting a join call

2022-02-11 Thread Kevin Shweh


New submission from Kevin Shweh :

This code in Thread._wait_for_tstate_lock:

try:
if lock.acquire(block, timeout):
lock.release()
self._stop()
except:
if lock.locked():
# bpo-45274: lock.acquire() acquired the lock, but the function
# was interrupted with an exception before reaching the
# lock.release(). It can happen if a signal handler raises an
# exception, like CTRL+C which raises KeyboardInterrupt.
lock.release()
self._stop()
raise

has a bug. The "if lock.locked()" check doesn't check whether this code managed 
to acquire the lock. It checks if *anyone at all* is holding the lock. The lock 
is almost always locked, so this code will perform a spurious call to 
self._stop() if it gets interrupted while trying to acquire the lock.

Thread.join uses this method to wait for a thread to finish, so a thread will 
spuriously be marked dead if you interrupt a join call with Ctrl-C while it's 
trying to acquire the lock. Here's a reproducer:


import time
import threading
 
event = threading.Event()
 
def target():
event.wait()
print('thread done')
 
t = threading.Thread(target=target)
t.start()
print('joining now')
try:
t.join()
except KeyboardInterrupt:
pass
print(t.is_alive())
event.set()


Interrupt this code with Ctrl-C during the join(), and print(t.is_alive()) will 
print False.

--
components: Library (Lib)
messages: 413106
nosy: Kevin Shweh
priority: normal
severity: normal
status: open
title: Thread spuriously marked dead after interrupting a join call
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



[issue46666] IDLE Add indent guide

2022-02-11 Thread primexx


primexx  added the comment:

very informative discussion. i'll just say that if it's not possible to do 
purely visually, and it can only be done by modifying the textual content, then 
it probably should not be done at all. preserving the code (and copy+paste 
integrity) is more important. maybe this is actually something to raise with Tk 
first?

--

___
Python tracker 

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



[issue46661] Duplicate deprecation warnings in docs for asyncio

2022-02-11 Thread Guido van Rossum


Change by Guido van Rossum :


--
title: Duplicat deprecation warnings in docs for asyncio -> Duplicate 
deprecation warnings in docs for asyncio

___
Python tracker 

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



[issue46716] regrtest didn't respect the timeout when running test_subprocess on AMD64 Windows11 3.x

2022-02-11 Thread Eryk Sun


Eryk Sun  added the comment:

> test_call_timeout() or test_timeout() in test_subprocess.py.

These tests don't override the standard files, and they only spawn a single 
child with no descendants. I don't see why this would hang. It shouldn't be a 
problem with leaked pipe handles (see bpo-43346). It probably will need to be 
diagnosed by attaching a debugger, or offline with a dump file.

> process trees whereas terminating a parent automatically kills the children

One can use a job object to manage a child process and all of its descendants, 
including resource usage and termination. A process can belong to multiple job 
objects in Windows 8+, which is required by Python 3.9+.

For reliability, the child has to be created in a suspended state via 
CREATE_SUSPENDED. It can be resumed with ResumeThread() after adding it to the 
job with AssignProcessToJobObject().

You can try to terminate a job cleanly, which is similar in effect to sending 
SIGTERM to a process group in POSIX. In Windows, this has to be approached 
differently for console vs graphical processes.

To handle console apps, assuming the child inherits the current console, spawn 
it as a new process group via 
creationflags=subprocess.CREATE_NEW_PROCESS_GROUP. You can request an exit by 
sending a Ctrl+Break event to the group via os.kill(p.pid, 
signal.CTRL_BREAK_EVENT) [1]. The request might be ignored, but typically the 
default handler is called, which calls ExitProcess().

To handle GUI apps, assuming the child inherits the current desktop (usually 
"WinSta0\Default"), first enumerate the top-level and message-only windows on 
the current desktop via EnumWindows() and FindWindowExW(). Use 
GetWindowThreadProcessId() to filter the list to include only windows that 
belong to the job. Post WM_CLOSE to each window in the job. A process might 
ignore a request to close. It could keep the window open or continue running in 
the background.

After an internal timeout, you can call TerminateJobObject() to kill any 
process in the job that remains alive. This is a forced and abrupt termination, 
which is similar to sending SIGKILL to a process group in POSIX.

---

[1] This usage of os.kill() is what we're stuck with. Rightfully, we should be 
using os.killpg(p.pid, signal.SIGBREAK) or os.kill(-p.pid, signal.SIGBREAK) 
(note the negative pid value).

--

___
Python tracker 

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



[issue46720] Add support for path-like objects to multiprocessing.set_executable for Windows to be on a par with Unix-like systems

2022-02-11 Thread Géry

Change by Géry :


--
title: Add support of path-like objects to multiprocessing.set_executable for 
Windows to match Unix-like systems -> Add support for path-like objects to 
multiprocessing.set_executable for Windows to be on a par with Unix-like systems

___
Python tracker 

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



[issue46708] test_asyncio: test_sock_client_fail() changes asyncio.events._event_loop_policy

2022-02-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

Heh, I just ran into this for test_taskgroups as well. (Alas, I had debugged 
and fixed it independently before I found this. :-)

--
nosy: +gvanrossum

___
Python tracker 

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



[issue46614] Add option to output UTC datetimes as "Z" in `.isoformat()`

2022-02-11 Thread Matt Wozniski


Matt Wozniski  added the comment:

> I feel like "If the offset is 00:00, use Z" is the wrong rule to use 
> conceptually

This is a really good point that I hadn't considered: `+00:00` and `Z` are 
semantically different, and just because a datetime has a UTC offset of 0 
doesn't mean it should get a `Z`; `Z` is reserved specifically for UTC.

It seems like the most semantically correct thing would be to only use `Z` if 
`tzname()` returns exactly "UTC". That would do the right thing for your London 
example for every major timezone library I'm aware of:

>>> datetime.datetime.now(zoneinfo.ZoneInfo("Europe/London")).tzname()
'GMT'
>>> datetime.datetime.now(zoneinfo.ZoneInfo("UTC")).tzname()
'UTC'
>>> datetime.datetime.now(datetime.timezone.utc).tzname()
'UTC'

>>> datetime.datetime.now(dateutil.tz.gettz("Europe/London")).tzname()
'GMT'
>>> datetime.datetime.now(dateutil.tz.UTC).tzname()
'UTC'

>>> datetime.datetime.now(pytz.timezone("Europe/London")).tzname()
'GMT'
>>> datetime.datetime.now(pytz.UTC).tzname()
'UTC'

I think the right rule to use conceptually is "if `use_utc_designator` is true 
and the timezone name is 'UTC' then use Z". We could also check the offset, but 
I'm not convinced we need to.

--
nosy: +godlygeek

___
Python tracker 

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



[issue46072] Unify handling of stats in the CPython VM

2022-02-11 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher
nosy_count: 2.0 -> 3.0
pull_requests: +29449
pull_request: https://github.com/python/cpython/pull/31289

___
Python tracker 

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



Re: How do you log in your projects?

2022-02-11 Thread alister via Python-list
On Wed, 9 Feb 2022 19:38:23 +, Martin Di Paola wrote:

>>> - On a line per line basis? on a function/method basis?
> 
> In general I prefer logging line by line instead per function.
> 
> It is easy to add a bunch of decorators to the functions and get the
> logs of all the program but I most of the time I end up with very
> confusing logs.
> 
> There are exceptions, yes, but I prefer the line by line where the log
> should explain what is doing the code.
> 
>>> - Which kind of variable contents do you write into your logfiles?
>>> - How do you decide, which kind of log message goes into which level?
>>> - How do you prevent logging cluttering your actual code?
> 
> These three comes to the same answer: I think on whom is going to read
> the logs.
> 
> If the logs are meant to be read by my users I log high level messages,
> specially before parts that can take a while (like the classic
> "Loading...").
> 
> If I log variables, those must be the ones set by the users so he/she
> can understand how he/she is controlling the behaviour of the program.
> 
> For exceptions I print the message but not the traceback. Across the
> code tag some important functions to put an extra message that will
> enhance the final message printed to the user.
> 
> https://github.com/byexamples/byexample/blob/master/byexample/
common.py#L192-L238
> 
> For example:
> 
>  for example in examples:
>  with enhance_exceptions(example, ...):
>  foo()
> 
> So if an exception is raised by foo(), enhance_exceptions() will attach
> to it useful information for the user from the example variable.
> 
> In the main, then I do the pretty print
> https://github.com/byexamples/byexample/blob/master/byexample/
byexample.py#L17-L22
> 
> If the user of the logs is me or any other developer I write more
> debugging stuff.
> 
> My approach is to not log anything and when I have to debug something I
> use a debugger + some prints. When the issue is fixed I review which
> prints would be super useful and I turn them into logs and the rest is
> deleted.
> 
> 
> On Tue, Feb 08, 2022 at 09:40:07PM +0100, Marco Sulla wrote:
>>These are a lot of questions. I hope we're not off topic.
>>I don't know if mine are best practices. I can tell what I try to do.
>>
>>On Tue, 8 Feb 2022 at 15:15, Lars Liedtke  wrote:
>>> - On a line per line basis? on a function/method basis?
>>
>>I usually log the start and end of functions. I could also log inside a
>>branch or in other parts of the function/method.
>>
>>> - Do you use decorators to mark beginnings and ends of
>>> methods/functions in log files?
>>
>>No, since I put the function parameters in the first log. But I think
>>that such a decorator it's not bad.
>>
>>> - Which kind of variable contents do you write into your logfiles? Of
>>> course you shouldn't leak secrets...
>>
>>Well, all the data that is useful to understand what the code is doing.
>>It's better to repeat the essential data to identify a specific call in
>>all the logs of the function, so if it is called simultaneously by more
>>clients you can distinguish them
>>
>>> - How do you decide, which kind of log message goes into which level?
>>
>>It depends on the importance, the verbosity and the occurrences of the
>>logs.
>>
>>> - How do you prevent logging cluttering your actual code?
>>
>>I have the opposite problem, I should log more. So I can't answer your
>>question.
>>--
>>https://mail.python.org/mailman/listinfo/python-list
In my current project I use the loggin module & write to a file
I log at info level for the entry & exit of each function/method
& scatter debug level logs for arease where I need to check data is as 
expected
I have also found Ansi colour codes usefull when skiming through the 
output





-- 
If an experiment works, something has gone wrong.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Will prepare a PR

--

___
Python tracker 

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



[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-02-11 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland
nosy_count: 4.0 -> 5.0
pull_requests: +29448
pull_request: https://github.com/python/cpython/pull/31288

___
Python tracker 

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



[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-02-11 Thread miss-islington


miss-islington  added the comment:


New changeset f2fbfbe0ec57ec39b3099dae62571a48d5fe8729 by Miss Islington (bot) 
in branch '3.10':
bpo-46483: [doc] pathlib classes no longer support parameterized generics 
(GH-31281)
https://github.com/python/cpython/commit/f2fbfbe0ec57ec39b3099dae62571a48d5fe8729


--

___
Python tracker 

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



[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-02-11 Thread miss-islington


miss-islington  added the comment:


New changeset a7c1cc41696740bb528f4d24816c59e38b8be345 by Miss Islington (bot) 
in branch '3.9':
bpo-46483: [doc] pathlib classes no longer support parameterized generics 
(GH-31281)
https://github.com/python/cpython/commit/a7c1cc41696740bb528f4d24816c59e38b8be345


--

___
Python tracker 

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



[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

Let's just document it for 3.11.

--

___
Python tracker 

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



[issue46615] Use-after-free by mutating set during set operations

2022-02-11 Thread miss-islington


miss-islington  added the comment:


New changeset 1f5fe9962f768c8bfd4ed06a22532d31d3424dc9 by Miss Islington (bot) 
in branch '3.10':
bpo-46615: Don't crash when set operations mutate the sets (GH-31120)
https://github.com/python/cpython/commit/1f5fe9962f768c8bfd4ed06a22532d31d3424dc9


--

___
Python tracker 

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



[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-02-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29447
pull_request: https://github.com/python/cpython/pull/31287

___
Python tracker 

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



[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-02-11 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +29446
pull_request: https://github.com/python/cpython/pull/31286

___
Python tracker 

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



[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-02-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset e0bc8ee945af96f9395659bbe3cc30b082e7a361 by Alex Waygood in 
branch 'main':
bpo-46483: [doc] pathlib classes no longer support parameterized generics 
(GH-31281)
https://github.com/python/cpython/commit/e0bc8ee945af96f9395659bbe3cc30b082e7a361


--

___
Python tracker 

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



[issue46724] Odd Bytecode Generation in 3.10

2022-02-11 Thread Saul Shanabrook


Change by Saul Shanabrook :


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

___
Python tracker 

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



[issue46713] Provide a C implementation of collections.abc.KeysView and friends

2022-02-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

- arbitrary mappings supports by the view ABCs
+ arbitrary mappings supported by the view ABCs

- A first look,
+ At first glance,

--

___
Python tracker 

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



[issue46615] Use-after-free by mutating set during set operations

2022-02-11 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +29444
pull_request: https://github.com/python/cpython/pull/31284

___
Python tracker 

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



[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-02-11 Thread Andreas H.


Change by Andreas H. :


--
pull_requests: +29443
pull_request: https://github.com/python/cpython/pull/31283

___
Python tracker 

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



Re: PermissionError: [Errno 13] Permission denied: 'Abc.xlsx'

2022-02-11 Thread Peter J. Holzer
On 2022-02-11 08:11:32 +1100, Chris Angelico wrote:
> Excel doesn't have the sophistication to need or want anything more
> than simple "I have this file, nobody else touch it" exclusive
> locking.

Interestingly, Excel did have the ability for multiple users editing the
same file at some time (maybe early 2000s? Way before Google docs or
Office 365). It had to be explicitely enabled and it didn't work very
reliably (at least not with Samba as file servers), so we never really
used it but it is clear that somebody at MS thought that users needed or
at least wanted that ability.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue46511] dataclasses: Allow typing.Annotated to wrap dataclasses-specific annotations

2022-02-11 Thread Gregory Beauregard


Gregory Beauregard  added the comment:

It occurred to be that we do need to add the __call__ to KW_ONLY, but for a 
different reason than this bpo:

If you call get_type_hints on a dataclass with a KW_ONLY parameter when PEP 563 
is enabled, the entire call will fail if KW_ONLY isn't callable(). This can 
also happen if you stringize KW_ONLY without PEP 563. I made a bpo to suggest 
removing the callable() check entirely, but it's waiting discussion currently: 
https://bugs.python.org/issue46644

My feeling is you probably wanted to wait on making changes of this kind for 
the 5.11 PEP 563 et al decision to play out, but on the other hand I think the 
KW_ONLY (and similar __call__ method for InitVar this patch already adds) 
change would likely be backportable so we may want to make them anyway for that 
purpose. Do you have an opinion on this?

This patch might be backportable to mirror https://bugs.python.org/issue46491 
but I don't have a strong opinion on that.

--

___
Python tracker 

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



[Python-announce] pytest-7.0.1

2022-02-11 Thread Bruno Oliveira
pytest 7.0.1 has just been released to PyPI.

This is a bug-fix release, being a drop-in replacement. To upgrade::

  pip install --upgrade pytest

The full changelog is available at
https://docs.pytest.org/en/stable/changelog.html.

Thanks to all of the contributors to this release:

* Anthony Sottile
* Bruno Oliveira
* Ran Benita


Happy testing,
The pytest Development Team
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[issue46713] Provide a C implementation of collections.abc.KeysView and friends

2022-02-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Some thoughts:

* Other than set operations, most of the pure python code in the dict view ABCs 
are fast pass throughs.  There is no point in rewriting these in C:

def __contains__(self, key):
return key in self._mapping

def __iter__(self):
yield from self._mapping

def __len__(self):
return len(self._mapping)

* For the set operations, the pure python code has only a simple for-loop and 
contains test.  There isn't much fat to be cut:

def __ge__(self, other):
if not isinstance(other, Set):
return NotImplemented
if len(self) < len(other):
return False
for elem in other:
if elem not in self:
return False
return True

* Possibly the eval-loop overhead can be eliminated with Python by using 
itertools:

def __ge__(self, other):
if not isinstance(other, Set):
return NotImplemented
if len(self) < len(other):
return False
for elem in filterfalse(self.__contains__, other):
return False
return True

* That leaves the question of why the dict views are so much faster (presuming 
that the posted timings are representative).  I haven't looked in detail, but 
the first candidate that comes to mind is that dictviews_to_set() has a fast 
path for exact dicts.  That lets it bypass the mapping proxy and exploit the 
fast path in PySet_New for exact dicts.  That fast path reuses the stored hash 
values and exploits knowing that the input has no duplicates.  Off-hand, I 
don't see how that can generalize to the arbitrary mappings supports by the 
view ABCs.  

* Summary:  A first look, it doesn't seem like a C rewrite of the view ABCs 
would bear fruit.

--

___
Python tracker 

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



[issue46724] Odd Bytecode Generation in 3.10

2022-02-11 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-11 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

+1 (what Jelle said)

--
nosy: +erlendaasland

___
Python tracker 

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



[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-11 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

I'd lean towards keeping this syntax:
- It's already been out for two releases, so there's user code out there 
relying on it. (In fact we found out about this because somebody complained 
that Black's parser couldn't handle this code.)
- The syntax isn't obviously confusing and the meaning is clear.
- It's not hard to parse; it was easy to adjust Black's parser to allow it.

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-11 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

Since this was already allowed in 3.9 and 3.10 stable relases, and since it is 
consistent with the RHS of an assignment (something = *a, *b); I'd lean towards 
keeping it (and maybe fixing the old parser's grammar to reflect that) and 
documenting this.

--

___
Python tracker 

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



[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-11 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

Seems that this is allowed since the PEG parser rewrite:

for x in *a, *b:
print(x)

but I cannot find anywhere were we discussed this. I am not sure if we should 
keep it or treat it as a bug and fix it.

--
components: Parser
messages: 413089
nosy: BTaskaya, gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Unpacking without parentheses is allowed since 3.9
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



[issue46724] Odd Bytecode Generation in 3.10

2022-02-11 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2022-02-11 Thread Hasan


Change by Hasan :


--
pull_requests: +29442
pull_request: https://github.com/python/cpython/pull/31282

___
Python tracker 

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



[issue46724] Odd Bytecode Generation in 3.10

2022-02-11 Thread Saul Shanabrook


New submission from Saul Shanabrook :

I noticed that in Python 3.10, and also in main, a certain control flow 
construct produces some very odd bytecode (showing on main but same on python 
3.10 tags):

```
./python.exe -c 'import dis; dis.dis("while not (a < b < c): pass")'
  0 RESUME   0

  1   2 LOAD_NAME0 (a)
  4 LOAD_NAME1 (b)
  6 SWAP 2
  8 COPY 2
 10 COMPARE_OP   0 (<)
 12 POP_JUMP_IF_FALSE   11 (to 22)
 14 LOAD_NAME2 (c)
 16 COMPARE_OP   0 (<)
 18 POP_JUMP_IF_TRUE28 (to 56)
 20 JUMP_FORWARD 1 (to 24)
>>   22 POP_TOP
>>   24 LOAD_NAME0 (a)
 26 LOAD_NAME1 (b)
 28 SWAP 2
 30 COPY 2
 32 COMPARE_OP   0 (<)
 34 POP_JUMP_IF_FALSE   23 (to 46)
 36 LOAD_NAME2 (c)
 38 COMPARE_OP   0 (<)
 40 POP_JUMP_IF_FALSE   12 (to 24)
 42 LOAD_CONST   0 (None)
 44 RETURN_VALUE
>>   46 POP_TOP
 48 EXTENDED_ARG   255
 50 EXTENDED_ARG 65535
 52 EXTENDED_ARG 16777215
 54 JUMP_FORWARD 4294967280 (to 8589934616)
>>   56 LOAD_CONST   0 (None)
 58 RETURN_VALUE
```

The last JUMP_FORWARD has a rather larger argument! This was the minimal 
example I could find to replicate this.

However, this is an example of some runnable code that also encounters it:

```
a = b = c = 1
while not (a < b < c):
if c == 1:
c = 3
else:
b = 2
print(a, b, c)
```

This actually executes fine, but I notice that when it's executing it does 
execute that very large arg, but that the `oparg` to JUMP_FORWARD ends up being 
negative! By adding some tracing, I was able to see that the `oparg` variable 
in the `TARGET(JUMP_FORWARD)` case is `-32`.

I am not sure if this is a bug or intended behavior. It does seem a bit odd to 
have this unnecessarily large argument that ends up turning into a negative 
jump! But the behavior seems fine.

At the least, maybe `dis` should be modified so that it properly sees this as a 
negative jump and debugs it properly? I am happy to submit a PR to modify `dis` 
to handle this case, but I also wanted to flag that maybe it's a bug to being 
with.

--
components: Interpreter Core
messages: 413088
nosy: saulshanabrook
priority: normal
severity: normal
status: open
title: Odd Bytecode Generation in 3.10
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



[issue46723] SimpleQueue.put_nowait() documentation error

2022-02-11 Thread Antony Cardazzi


New submission from Antony Cardazzi :

SimpleQueue.put_nowait(item) documentation says it is equivalent to 
SimpleQueue.put(item) when it's actually equivalent to Simple que.put(item, 
block=False)

--
assignee: docs@python
components: Documentation
messages: 413087
nosy: antonycardazzi, docs@python
priority: normal
severity: normal
status: open
title: SimpleQueue.put_nowait() documentation error
type: behavior

___
Python tracker 

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



[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-02-11 Thread Alex Waygood


Change by Alex Waygood :


--
pull_requests: +29441
pull_request: https://github.com/python/cpython/pull/31281

___
Python tracker 

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



[issue46541] Replace _Py_IDENTIFIER() with statically initialized objects.

2022-02-11 Thread Eric Snow


Eric Snow  added the comment:

On Fri, Feb 11, 2022 at 1:36 AM Christoph Reiter  wrote:
> Sorry if off topic, but I noticed that CPython doesn't deprecate macros in 
> code, while with gcc/clang it's possible to show compiler warnings for them 
> using some pragma magic:
> [snip]
> Maybe that makes getting rid of them easier in the long run?

That's a good question.  We do have Py_DEPRECATED() (in
Include/pyport.h), which is used for symbols.  I'm not sure anyone has
given much thought to deprecating macros, but it's probably worth
considering.  I recommend that you post something about this to
python-...@python.org.

FWIW, here are other explanations of how to deprecate macros:

* 
https://stackoverflow.com/questions/57478368/what-is-the-best-way-to-mark-macro-as-deprecated/57479189#57479189
* 
https://stackoverflow.com/questions/2681259/how-to-deprecate-a-c-pre-processor-macro-in-gcc/29297970#29297970

--

___
Python tracker 

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



[issue46615] Use-after-free by mutating set during set operations

2022-02-11 Thread Dennis Sweeney


Dennis Sweeney  added the comment:


New changeset 4a66615ba736f84eadf9456bfd5d32a94cccf117 by Dennis Sweeney in 
branch 'main':
bpo-46615: Don't crash when set operations mutate the sets (GH-31120)
https://github.com/python/cpython/commit/4a66615ba736f84eadf9456bfd5d32a94cccf117


--

___
Python tracker 

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



[issue46722] Different behavior for functiools.partial between inspect.isfunction() and other inspect.is*function()

2022-02-11 Thread Iliya Zinoviev


Change by Iliya Zinoviev :


Removed file: https://bugs.python.org/file50622/isfuncs_behavior.py

___
Python tracker 

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



[issue46722] Different behavior for functiools.partial between inspect.isfunction() and other inspect.is*function()

2022-02-11 Thread Iliya Zinoviev


Change by Iliya Zinoviev :


Added file: https://bugs.python.org/file50622/isfuncs_behavior.py

___
Python tracker 

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



[issue46337] urllib.parse: Allow more flexibility in schemes and URL resolution behavior

2022-02-11 Thread Lincoln Auster


Lincoln Auster  added the comment:

> Maybe a new parse function, or new parameter to the existing one,
> could be easier to add.

If I'm understanding you right, that's what this (and the PR) is - an
extra optional parameter to urllib.parse to supplement the existing
(legacy?) hard-coded list.

--

___
Python tracker 

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



[issue46613] Add PyType_GetModuleByDef to the public & limited API

2022-02-11 Thread Petr Viktorin


Petr Viktorin  added the comment:

It's in public API, adding it to limited is still pending.

--

___
Python tracker 

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



[issue46720] Add support of path-like objects to multiprocessing.set_executable for Windows to match Unix-like systems

2022-02-11 Thread Géry

Change by Géry :


--
type:  -> enhancement

___
Python tracker 

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



[issue46613] Add PyType_GetModuleByDef to the public & limited API

2022-02-11 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 204946986feee7bc80b233350377d24d20fcb1b8 by Petr Viktorin in 
branch 'main':
bpo-46613: Add PyType_GetModuleByDef to the public API (GH-31081)
https://github.com/python/cpython/commit/204946986feee7bc80b233350377d24d20fcb1b8


--

___
Python tracker 

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



[issue44953] Add vectorcall on operator.itemgetter and attrgetter objects

2022-02-11 Thread Dennis Sweeney


Change by Dennis Sweeney :


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



[issue40379] multiprocessing's default start method of fork()-without-exec() is broken

2022-02-11 Thread Michał Górny

Michał Górny  added the comment:

After updating PyPy3 to use Python 3.9's stdlib, we hit very bad hangs because 
of this — literally compiling a single file with "parallel" compileall could 
hang.  In the end, we had to revert the change in how Python 3.9 starts workers 
because otherwise multiprocessing would be impossible to use:

https://foss.heptapod.net/pypy/pypy/-/commit/c594b6c48a48386e8ac1f3f52d4b82f9c3e34784

This is a very bad default and what's even worse is that it often causes 
deadlocks that are hard to reproduce or debug.  Furthermore, since "fork" is 
the default, people are unintentionally relying on its support for passing 
non-pickleable projects and are creating non-portable code.  The code often 
becomes complex and hard to change before they discover the problem.

Before we managed to figure out how to workaround the deadlocks in PyPy3, we 
were experimenting with switching the default to "spawn".  Unfortunately, we've 
hit multiple projects that didn't work with this method, precisely because of 
pickling problems.  Furthermore, they were surprised to learn that their code 
wouldn't work on macOS (in the end, many people perceive Python as a language 
for writing portable software).

Finally, back in 2018 I've made one of my projects do parallel work using 
multiprocessing.  It gave its users great speedup but for some it caused 
deadlocks that I couldn't reproduce nor debug.  In the end, I had to revert it. 
 Now that I've learned about this problem, I'm wondering if this wasn't 
precisely because of "fork" method.

--
nosy: +mgorny

___
Python tracker 

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



[issue40255] Fixing Copy on Writes from reference counting and immortal objects

2022-02-11 Thread Eddie Elizondo


Eddie Elizondo  added the comment:

@eric.snow great to hear about this update! I'll start looking at some of the 
techniques that we talked about to improve performance, I'm optimistic that 
we'll be able to close down the gap to 2%.

--

___
Python tracker 

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



[issue45490] [C API] PEP 670: Convert macros to functions in the Python C API

2022-02-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e0bcfd0e4db193743d4bafc48d10f15ae9ed7b2b by Victor Stinner in 
branch 'main':
bpo-45490: Rename static inline functions (GH-31217)
https://github.com/python/cpython/commit/e0bcfd0e4db193743d4bafc48d10f15ae9ed7b2b


--

___
Python tracker 

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



[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
dependencies: +Use-after-free by mutating set during set operations

___
Python tracker 

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



[issue46677] TypedDict docs are incomplete

2022-02-11 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Please do submit a PR! Agree that more examples of inheritance and attributes 
would be useful.

Note that we're about to deprecate the keyword argument syntax (issue46066).

--

___
Python tracker 

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



Re: Abstraction level at which to create SQLAlchemy ORM object

2022-02-11 Thread Loris Bennett
Hi Cameron,

Cameron Simpson  writes:

> On 10Feb2022 14:14, Loris Bennett  wrote:
>>I am writing a command line program which will modify entries in a
>>database and am trying out SQLAlchemy.
>>
>>A typical command might look like
>>
>>  um --operation add --uid ada --gid coders --lang en
>>
>>Parsing the arguments I get, ignoring the operation, a dict
>>
>>  {uid: "ada", gid: "coders", lang: "en"}
>>
>>At some point this needs to be converted into an object of the class User:
>>
>>  class User(Base):
>>  __tablename__ = "users"
>>
>>  uid = Column('uid', String, primary_key=True)
>>  gid = Column('gid', String)
>>  lang = Column('lang', String)
>>
>>In a way it seems it would be economical to do the conversion as early
>>as possible, so I can just pass around User objects.  However, this
>>would mean that the entry point for the program would already be tightly
>>coupled to the specifics of the database interaction.
>>
>>On the other hand, delaying the conversion would mean probably having to
>>define my own User class, which seems like unnecessary overhead.  It
>>would have the advantage that I could ditch SQLAlchemy more easily if I
>>find it too mind-bending.
>
> If the entire persistent state of the user lives in the db I'd just 
> define the User ORM type and give it whatever methods you need. So 
> exactly what you've got above.
>
> It is close to the db, but if you only interact via the methods and the 
> core attributes/columns that should be mostly irrelevant to you.
>
> If you're concerned about switching backends, maybe define an 
> AbstractUser abstract class with the required methods. Then you can at 
> least ensure method coverage if you make another backend:
>
> class AbstractUser(ABC):
> @abstractmethod
> def some_user_method(self,...):
>
>
> class SQLAUser(Base, AbstractUser):
> ... your SQLA ORM User class above ...
>
> User = SQLAUser
>
> ... everything else just talks about user ...
>
> But you can do all of that _later_, only needed if you decide to change 
> backends in a controlled manner.

Thanks for reminding me about abstract classes, but more importantly
that I can do this kind of stuff later. 

Cheers,

Loris


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue46722] Different behavior for functiools.partial between inspect.isfunction() and other inspect.is*function()

2022-02-11 Thread Iliya Zinoviev

New submission from Iliya Zinoviev :

1) isfunction() returns `True` for partial object only when one passes `func` 
attribute of it.
2) For instance, `isgeneratorfunction()` and `iscoroutinefunction()` for 
partial obj work with passing partial obj as well as with passing `func` attr 
of this obj, when obj is partially applied generator function or partially 
applied coroutine function respectively.

I offer to unify behavior for handling partial object for 
r'inspect.is*function()' by the next way:
1) Add `functools._unwrap_partial()` to `inspect.isfunction()` as well as it 
were done in other r'inspect.is*function()'.

P.S.I'm ready to deal with this issue.  

Python 3.10.2 (main, Jan 15 2022, 19:56:27) [GCC 11.1.0]
Type 'copyright', 'credits' or 'license' for more information

Operating System: Manjaro Linux
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.4.176-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 11.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520

--
components: Library (Lib)
files: isfuncs_behavior.py
messages: 413077
nosy: IliyaZinoviev
priority: normal
severity: normal
status: open
title: Different behavior for functiools.partial between inspect.isfunction() 
and other inspect.is*function()
type: behavior
versions: Python 3.10
Added file: https://bugs.python.org/file50621/isfuncs_behavior.py

___
Python tracker 

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



[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The new code is similar to the code of set.isdisjoint(), so we can share the 
code if generalize it.

--

___
Python tracker 

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



[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

If the argument of set.issuperset() is not a set, it is first converted to a 
set. It is equivalent to the following code:

if not isinstance(other, (set, frozenset)):
other = set(other)
# The following is equivalent to:
# return set.issubset(other, self)
for x in other:
if x not in self
return False
return True

Two drawbacks of this algorithm:

1. It creates a new set, which takes O(len(other)) time and consumes 
O(len(set(other))) memory.
2. It needs to iterate other to the end, even if the result is known earlier.

The proposed PR straightforward the code. The C code is now larger, but it no 
longer need additional memory, performs less operations and can stop earlier.

--
components: Interpreter Core
messages: 413075
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Optimize set.issuperset() for non-set argument
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



[issue46705] Memory optimization for set.issubset

2022-02-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See also issue18032.

--

___
Python tracker 

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



[issue46720] Add support of path-like objects to multiprocessing.set_executable for Windows to match Unix-like systems

2022-02-11 Thread Géry

Change by Géry :


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

___
Python tracker 

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



[issue46720] Add support of path-like objects to multiprocessing.set_executable for Windows to match Unix-like systems

2022-02-11 Thread Géry

New submission from Géry :

Any [path-like object](https://docs.python.org/3/glossary.html) can be passed 
to `multiprocessing.set_executable`, i.e. objects with `str`, `bytes`, or 
`os.PathLike` type.

For instance these work (tested on MacOS with all start methods: ‘spawn’, 
‘fork’, and ‘forkserver’):

- `multiprocessing.set_executable(sys.executable)` (`str`);
- `multiprocessing.set_executable(sys.executable.encode())` (`bytes`);
- `multiprocessing.set_executable(pathlib.Path(sys.executable))` 
(`os.PathLike`).

This is because the ‘fork’ start method does not exec any program in the 
subprocess, the ‘spawn’ start method converts its path argument to `bytes` with 
`os.fsencode` before passing to 
[`_posixsubprocess.fork_exec`](https://github.com/python/cpython/blob/v3.10.2/Lib/multiprocessing/util.py#L452-L455),
 and the ‘forkserver’ start method spawns a server process (like with the 
‘spawn’ start method) which then forks itself at each request (like the ‘fork’ 
start method):

```
return _posixsubprocess.fork_exec(
args, [os.fsencode(path)], True, passfds, None, None,
-1, -1, -1, -1, -1, -1, errpipe_read, errpipe_write,
False, False, None, None, None, -1, None)
```

Linux (and other Unix-like systems) uses the same code than MacOS for the three 
start methods so it should work for it too.

However I have not tested this on Windows which uses the function 
[`_winapi.CreateProcess`](https://github.com/python/cpython/blob/v3.10.2/Lib/multiprocessing/popen_spawn_win32.py#L73-L75)
 for the ‘spawn’ start method (the only start method available on this OS) but 
I noticed that no conversion to `str` (not to `bytes` this time, since [the 
function expects 
`str`](https://github.com/python/cpython/blob/v3.10.2/Modules/_winapi.c#L1049)) 
of the path argument with `os.fsdecode` (not `os.fsencode` this time) is 
performed before passing it to the function:

```
hp, ht, pid, tid = _winapi.CreateProcess(
python_exe, cmd,
None, None, False, 0, env, None, None)
```

So on Windows only `str` path can be passed to 
`multiprocessing.set_executable`. This PR fixes this to be on a par with 
Unix-like systems which accept any path-like objects.

--
components: Library (Lib)
messages: 413073
nosy: maggyero
priority: normal
severity: normal
status: open
title: Add support of path-like objects to multiprocessing.set_executable for 
Windows to match Unix-like systems
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



[issue33436] Add an interactive shell for Sqlite3

2022-02-11 Thread Diego Ramirez


Diego Ramirez  added the comment:

Do we still want to do this? See 
https://discuss.python.org/t/titling-sqlite3-table-columns-with-number/13656/3.

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



[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2022-02-11 Thread Éric Araujo

Éric Araujo  added the comment:

Both active PRs have comments pointing out issues, that’s why this is still 
open.  A clean fix with unit tests and no regression is needed.

--
nosy: +eric.araujo
versions: +Python 3.10, Python 3.11, Python 3.9 -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



[issue46719] Call not visited in ast.NodeTransformer

2022-02-11 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> It looks like calls in function arguments are ignored.

Please share a small, self-contained reproducer.

>From what I can assume by this message, the problem is that you are not 
>calling self.generic_visit(node) on the first call you are handling. If you 
>don't call visit/generic_visit on the rood node that you are handling 
>(print(ord('A')), then it will never visit ord('A') in a standalone fashion.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue46119] Update bundled pip to 21.3.1 and setuptools to 59.7.0

2022-02-11 Thread Kumar Aditya


Change by Kumar Aditya :


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

___
Python tracker 

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



[issue46719] Call not visited in ast.NodeTransformer

2022-02-11 Thread David Castells-Rufas


New submission from David Castells-Rufas :

If I create a class derived from ast.NodeTransformer and implement the 
visit_Call.
When run on the below code, the visit_Call function is only called once (for 
the print function, and not for ord). It looks like calls in function arguments 
are ignored.

def main():
print(ord('A'))


On the other hand, on the following code it correctly visits both functions 
(print and ord).

def main():
c = org('A')
print(c)

--
components: Library (Lib)
messages: 413069
nosy: davidcastells
priority: normal
severity: normal
status: open
title: Call not visited in ast.NodeTransformer
type: behavior
versions: Python 3.10, 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



[issue46465] Regression caused by CALL_FUNCTION specialization for C function calls (test_urllib fails when run multiple times)

2022-02-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: Regression caused by CALL_FUNCTION specialization for C function calls 
-> Regression caused by CALL_FUNCTION specialization for C function calls 
(test_urllib fails when run multiple times)

___
Python tracker 

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



[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-11 Thread STINNER Victor


STINNER Victor  added the comment:

Oops, I forgot about my own bpo-46465. I failed to find it when I searched for 
"test_urllib".

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Regression caused by CALL_FUNCTION specialization for C 
function calls

___
Python tracker 

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



[issue46718] Feature: itertools: add batches

2022-02-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

For large n, I don't think a C implementation would do much better than your 
Python version where most of the work is done by chain() and islice() which are 
already in C.  The best that could be done is to eliminate the overhead of 
chain() which is likely about a third of the cost.

For smaller n, the grouper recipe is already very close to optimal.

--
assignee:  -> rhettinger

___
Python tracker 

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



[issue44011] Borrow asyncio ssl implementation from uvloop

2022-02-11 Thread Kumar Aditya


Change by Kumar Aditya :


--
versions: +Python 3.11 -Python 3.10

___
Python tracker 

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



[issue46718] Feature: itertools: add batches

2022-02-11 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +rhettinger, tim.peters
title: Feature: iptertools: add batches -> Feature: itertools: add batches

___
Python tracker 

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



[issue46337] urllib.parse: Allow more flexibility in schemes and URL resolution behavior

2022-02-11 Thread Éric Araujo

Éric Araujo  added the comment:

I remember a discussion about this years ago.
urllib is a module that pre-dates the idea of universal parsing for URIs, where 
the delimiters (like ://) are enough to determine the parts of a URI and give 
them meaning (host, port, user, path, etc).
Backward compat for urllib is always a concern; someone said at the time that 
it could be good to have a new module for modern, generic parsing, but that 
hasn’t happened.  Maybe a new parse function, or new parameter to the existing 
one, could be easier to add.

--
nosy: +brett.cannon, eric.araujo, lukasz.langa, orsenthil
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



[issue44011] Borrow asyncio ssl implementation from uvloop

2022-02-11 Thread Christian Heimes


Change by Christian Heimes :


--
nosy:  -christian.heimes

___
Python tracker 

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



[issue44011] Borrow asyncio ssl implementation from uvloop

2022-02-11 Thread Kumar Aditya


Kumar Aditya  added the comment:

I created a draft PR by rebasing the old implementation of 3.10 for 3.11 so we 
can investigate the build-bots failure and fix them so this can be committed 
for 3.11.

See https://github.com/python/cpython/pull/31275

--

___
Python tracker 

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



[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-11 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> Do you plan to make the function public? It would be nice!

See https://github.com/python/cpython/pull/31081

--

___
Python tracker 

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



[issue44011] Borrow asyncio ssl implementation from uvloop

2022-02-11 Thread Kumar Aditya


Change by Kumar Aditya :


--
pull_requests: +29438
pull_request: https://github.com/python/cpython/pull/31275

___
Python tracker 

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



[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-11 Thread STINNER Victor


STINNER Victor  added the comment:

> It also adds a precondition that's not feasible public API, which this was 
> meant to become

Do you plan to make the function public? It would be nice!

--

___
Python tracker 

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



[issue44011] Borrow asyncio ssl implementation from uvloop

2022-02-11 Thread Kumar Aditya


Kumar Aditya  added the comment:

Since it was reverted as it was beta period, Can this be committed again as 
3.11 is in alpha currently?  @asvetlov

--
nosy: +kumaraditya303

___
Python tracker 

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



[issue46718] Feature: iptertools: add batches

2022-02-11 Thread Марк Коренберг

New submission from Марк Коренберг :

I want a new function introduced in intertools. Something like this, but more 
optimal, and in C:

===
from itertools import chain, islice
from typing import Iterable, TypeVar

T = TypeVar('T')  # pylint: disable=invalid-name


def batches(items: Iterable[T], num: int) -> Iterable[Iterable[T]]:
items = iter(items)
while True:
try:
first_item = next(items)
except StopIteration:
break
yield chain((first_item,), islice(items, 0, num - 1))
===

Splits big arrays to iterable chunks of fixed size (except the last one). 
Similar to `group_by`, but spawns new iterable group based on the group size.

For example, when passing many record to a database, passing one by one is 
obviously too slow. Passing all the records at once may increase latency. So, a 
good solution is to pass, say, 1000 records in one transaction. The smae in 
REST API batches.

P.S. Yes, I saw solution  
https://docs.python.org/3/library/itertools.html#itertools-recipes `def 
grouper`, but it is not optimal for big `n` values.

--
components: Library (Lib)
messages: 413061
nosy: socketpair
priority: normal
severity: normal
status: open
title: Feature: iptertools: add batches
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



[issue43216] Removal of @asyncio.coroutine in Python 3.11

2022-02-11 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Closed.
Thanks for the reminder!

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



[issue43216] Removal of @asyncio.coroutine in Python 3.11

2022-02-11 Thread Kumar Aditya


Kumar Aditya  added the comment:

Can this be closed now?

--
nosy: +kumaraditya303

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2022-02-11 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
nosy: +sobolevn
nosy_count: 4.0 -> 5.0
pull_requests: +29437
pull_request: https://github.com/python/cpython/pull/31273

___
Python tracker 

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



[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-11 Thread Petr Viktorin


Change by Petr Viktorin :


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



[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-11 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 8b8673fe940c4ebc4512bff5af180b66def3d1ae by Petr Viktorin in 
branch '3.10':
[3.10] bpo-46433: _PyType_GetModuleByDef: handle static types in MRO (GH-30696) 
(GH-31262)
https://github.com/python/cpython/commit/8b8673fe940c4ebc4512bff5af180b66def3d1ae


--

___
Python tracker 

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



[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-11 Thread Kumar Aditya


Kumar Aditya  added the comment:

Same issue as https://bugs.python.org/issue46465, PR 
https://github.com/python/cpython/pull/30826 fixes this.

--
nosy: +kumaraditya303

___
Python tracker 

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



[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2022-02-11 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> There will be huge changes for this issue as this keyword has been used in a 
> lot of places.

For external extension modules, it should be sufficient to change only the 
exposed headers; that is Include/*.h and Include/cpython/*.h. We should also 
change the AC tool, since that may be used by external projects.

--

___
Python tracker 

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



  1   2   >