[issue44423] copy2 / sendfile fails on linux with large file

2021-09-21 Thread karl


karl  added the comment:

could not reproduce the error

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



[issue45260] Implement superinstruction UNPACK_SEQUENCE_ST

2021-09-21 Thread zcpara


New submission from zcpara :

PEP 659 quickening provides a mechanism for replacing instructions.

We add another super-instruction UNPACK_SEQUENCE_ST to replace the original 
UNPACK_SEQUENCE and the following n STROE_FAST instructions.

See https://github.com/faster-cpython/ideas/issues/16.

--
messages: 402407
nosy: gvanrossum, zhangchaospecial
priority: normal
severity: normal
status: open
title: Implement superinstruction UNPACK_SEQUENCE_ST
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



[issue41266] IDLE call hints and completions confused by ints and floats

2021-09-21 Thread wyz23x2


wyz23x2  added the comment:

Ping.
>>> from datetime import datetime as d
>>> d(2021, 9, 22)-d(2020, 7, 10)
datetime.timedelta(days=439)

--

___
Python tracker 

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



[issue45258] sysroot_paths in setup.py does not consider -isysroot for macOS

2021-09-21 Thread Ned Deily


Ned Deily  added the comment:

See my comment on the PR.

--
components: +macOS -Build
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue45215] Add docs for Mock name and parent args and deprecation warning when wrong args are passed

2021-09-21 Thread Andrei Kulakov

Andrei Kulakov  added the comment:

Łukasz:

For parent, there's this issue: #39222 (which is why I started looking into 
this).

For name, I couldn't find anything here or on SO, but it's hard to search for 
this because keywords 'mock argument name' on SO finds over 700 results but 
they're referring to argument names, rather than literal argument `name`. I 
didn't look through all 700 though :)

The scenario that I was thinking about that could cause issues is that one 
developer creates a bunch of tests with Mock(name=1) for example, that doesn't 
cause any issues if the mocks aren't printed (for example if they're 
attributes). Some time later another dev is expanding or debugging the tests 
and needs to print the mocks, which causes errors. Now the 2nd dev will need to 
figure out why the first dev used these names and if they can be safely changed 
to strings - quite annoying.

It seems like the instances in the std lib of name args are of the form:

init(name)
 self.name = name

repr()
 return '<... %s ...>' % self.name

or equivalent; I've also did a grep for `return self.name` and it was a fairly 
short list so i was able to check all of them, and all of the hits either 
internal use classes or functions, or check the type of `name` in __init__, or 
the return is not from __repr__ but from some other function.

I didn't check all instances of where name arg is passed to init, because it's 
a much longer list and I figured the cases where it could be a problem would be 
ones with `__repr__(): return self.name`, and those are all fine.

The case with Mock is also different because users are not passing it as a 
known argument but as a "mock accepts all arguments and sets them as attrs" 
type of usage.

On the other hand, I don't think this is a high priority issue, users are 
probably not using name and parent args that often, and when they do, most of 
them probably try to print them as they work on the test; and if they do run 
into this issue later, it's not very hard to fix.

So it might be worth just leaving this open and seeing if more users run into 
it.

Let me know what you think!

--

___
Python tracker 

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



[issue45259] No _heappush_max()

2021-09-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The underscore functions are private and for internal use.  There is no 
_heappush_max() because we didn't need it internally and it would just be dead 
code.

Thanks for the report.

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

___
Python tracker 

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



[issue44958] [sqlite3] only reset statements when needed

2021-09-21 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> Now that pysqlite_statement_reset() is only used in cursor.c, I suggest to 
> move it to cursor.c and make it a static function.

I'll wait until PR 25984 is merged before opening a PR for relocating 
pysqlite_statement_reset().

--

___
Python tracker 

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



[issue38620] Shell python-config --includes returns the same path twice

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue38564] test_asyncio: test_run_coroutine_threadsafe_with_timeout() has a race condition

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue36136] Windows: python._pth sets isolated mode late during Python initialization

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue35333] [C API] Rename private structs to use names closer to types

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue35479] multiprocessing.Pool.join() always takes at least 100 ms

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

Nobody managed to find a solution in 3 years. I close the issue.

--
dependencies:  -multiprocessing.Pool._worker_handler(): use SIGCHLD to be 
notified on worker exit, multiprocessing: ApplyResult.get() hangs if the pool 
is terminated
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



[issue35478] multiprocessing: ApplyResult.get() hangs if the pool is terminated

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


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



[issue35518] test_timeout uses blackhole.snakebite.net domain which doesn't exist anymore

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


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



[issue36437] method_descriptor surprising error message when self is passed a keyword argument

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

ResourceWarning is no longer emitted. I close the issue.

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



[issue37475] What is urllib.request.urlcleanup() function?

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue38199] python3.8-config --ldflags must not generate -L/usr/lib64

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

No activity for 2 years, I close the issue.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue35276] Document thread safety

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

It would be nice to document thread safety, but it's a large project. Maybe the 
Documentation Working Group could look into this issue.

But nobody managed to write the doc in 3 years, I prefer to close the issue.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 09390c837a0bf73e213db2fbde34d756fa77a837 by Miss Islington (bot) 
in branch '3.9':
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in 
shutil.copyfile() (GH-28421) (GH-28507)
https://github.com/python/cpython/commit/09390c837a0bf73e213db2fbde34d756fa77a837


--

___
Python tracker 

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



[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 09390c837a0bf73e213db2fbde34d756fa77a837 by Miss Islington (bot) 
in branch '3.9':
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in 
shutil.copyfile() (GH-28421) (GH-28507)
https://github.com/python/cpython/commit/09390c837a0bf73e213db2fbde34d756fa77a837


--

___
Python tracker 

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



[issue33793] asyncio: _ProactorReadPipeTransport reads by chunk of 32 KiB: chunk size should be configurable

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

Nobody implemented the feature. I prefer to abandon my idea.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue32085] [Security] A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages!

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

No activity for 3 years, I close the issue.

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

___
Python tracker 

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



[issue29811] Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs()

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

This issue has no activity for 3 years and was created 4 years ago. I close it.

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

___
Python tracker 

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



[issue29312] Use FASTCALL in dict.update()

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like using FASTCALL would make the code slower, not faster. I close 
this old issue.

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



[issue28977] Document PyObject_CallFunction() special case more explicitly

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

I don't know what to do with this old issue, so I prefer to simply close it.

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

___
Python tracker 

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



[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:

Pablo, this regression was fixed in GH-28508 which should go into 3.10.0.

--
nosy: +pablogsal
priority: normal -> release blocker

___
Python tracker 

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



[issue27069] webbrowser creates zombi processes in the background mode

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3.6 was released 5 years ago. Nobody complained about ResourceWarning. 
While it would be nice to fix the issue, nobody managed to write a fix in 5 
years and this issue has no activity for 3 years. I close the issue.

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

___
Python tracker 

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



[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 41d48bc038b254cc4a78a2d840097196b9545a84 by Miss Islington (bot) 
in branch '3.10':
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in 
shutil.copyfile() (GH-28421) (GH-28508)
https://github.com/python/cpython/commit/41d48bc038b254cc4a78a2d840097196b9545a84


--

___
Python tracker 

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



[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 41d48bc038b254cc4a78a2d840097196b9545a84 by Miss Islington (bot) 
in branch '3.10':
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in 
shutil.copyfile() (GH-28421) (GH-28508)
https://github.com/python/cpython/commit/41d48bc038b254cc4a78a2d840097196b9545a84


--

___
Python tracker 

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



[issue19829] _pyio.BufferedReader and _pyio.TextIOWrapper destructor don't emit ResourceWarning if the file is not closed

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

While it would be great to also emit ResourceWarning, in the last 8 years, 
nobody managed to implement the feature. Also, this issue has no activity. I 
prefer to close the issue.

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

___
Python tracker 

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



[issue45035] sysconfig's posix_home scheme has different platlib value to distutils's unix_home

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

Should we simply close the issue and leave distutils as it is?

--

___
Python tracker 

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



[issue43770] Rework C types initialization

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

The code is way more complicated than what I expected. I hope that my work on 
this issue will help future developers who will try to understand the code. But 
I prefer to stop the refactoring at this point. I pushed enough changes ;-)

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



[issue45041] [sqlite3] simplify executescript()

2021-09-21 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +26906
pull_request: https://github.com/python/cpython/pull/28509

___
Python tracker 

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



[issue42671] Make the Python finalization more deterministic

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

I'm not really excited about breaking applications. While there is maybe a way 
to make the Python finalization more determistic, sorry, I'm not the one who 
will be brave enough to do it today. I abandon my idea for now.

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



[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:

Marking issue as "pending" until we figure out how PEP 544 should be amended.

--
status: open -> pending

___
Python tracker 

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



[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

I failed finding time to finish to design this feature. I'm not convinced that 
it's really needed. I abandoned my idea of deprecating os.popen(): bpo-42641. I 
close the issue.

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



[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

The PEP 620 is still a draft. I prefer to work on other C API changes before 
coming back to this change which may break many C extensions. I failed finding 
time to design an API to expose a PyObject** array "view" with a function to 
release/destroy the view.

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



[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset df1006b561f9dca5a15af98d54f0337a75b69445 by Miss Islington (bot) 
in branch '3.9':
bpo-45216: Remove extraneous method docs from `difflib` (GH-28445) (GH-28506)
https://github.com/python/cpython/commit/df1006b561f9dca5a15af98d54f0337a75b69445


--

___
Python tracker 

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



[issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

I still consider that these functions must be moved to the internal C API. But 
I failed to find time to design a *public* C API for that, or help projects 
using these functions to avoid it. I prefer to close the isseu for now.

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



[issue42260] [C API] Add _PyInterpreterState_SetConfig(): reconfigure an interpreter

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

The initial issue, adding an API to reconfigure an interepreter, is 
implemented: I added _PyInterpreterState_SetConfig().

But I failed finding time to finish the larger project "rewrite getpath.c in 
Python" (PR 23169). It requires changing the C API of the PEP 587 which is not 
easy. Also I'm not fully convinced that there is a strong need to change 
getpath.c.

I would be interested to move code from site.py to _getpath.py, but it's also 
not obvious if there a strong benefit.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter 
-> [C API] Add _PyInterpreterState_SetConfig(): reconfigure an interpreter

___
Python tracker 

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



[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26904
pull_request: https://github.com/python/cpython/pull/28508

___
Python tracker 

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



[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e6b6c1d23b3702052637f70551451d12695403a1 by Miss Islington (bot) 
in branch '3.10':
bpo-45216: Remove extraneous method docs from `difflib` (GH-28445) (GH-28505)
https://github.com/python/cpython/commit/e6b6c1d23b3702052637f70551451d12695403a1


--

___
Python tracker 

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



[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26903
pull_request: https://github.com/python/cpython/pull/28507

___
Python tracker 

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



[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26905
pull_request: https://github.com/python/cpython/pull/28508

___
Python tracker 

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



[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset b7eac52b466f697d3e89f47508e0df0196a98970 by andrei kulakov in 
branch 'main':
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in 
shutil.copyfile() (GH-28421)
https://github.com/python/cpython/commit/b7eac52b466f697d3e89f47508e0df0196a98970


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset b7eac52b466f697d3e89f47508e0df0196a98970 by andrei kulakov in 
branch 'main':
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in 
shutil.copyfile() (GH-28421)
https://github.com/python/cpython/commit/b7eac52b466f697d3e89f47508e0df0196a98970


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef()

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

There is no consensus on changing things, so I just close my issue.

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



[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

I don't want to add a deallocator to bytes and int types to detect when their 
singleton is destroyed, since it would slow down C extensions which have no 
refcount bug. Maybe it could be added only if Py_DEBUG macro is defined. But I 
don't think that Py_DECREF() bugs on these singletons are common enough to 
justify these. I don't want to make Python debug build slower.

IMO detecting refcount bugs on the most common singletons is enough: None, 
True, False, (), "". I implemented these checks because it was simple and had 
no major on performance, even on the debug build.

I now consider that the issue is fully fixed ;-)

--

___
Python tracker 

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



[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 86f28372b17c8c56539e9543bea9f125ab11b8aa by Victor Stinner in 
branch 'main':
bpo-45061: Detect refcount bug on empty string singleton (GH-28504)
https://github.com/python/cpython/commit/86f28372b17c8c56539e9543bea9f125ab11b8aa


--

___
Python tracker 

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



[issue45215] Add docs for Mock name and parent args and deprecation warning when wrong args are passed

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:

Have you encountered misuse of Mock's `name` and `parent` in the wild? As 
you're saying, since `str()` and `repr()` will error out anyway, it's unlikely 
users were doing this in the first place.

I'm a little hesitant to accept the deprecation since there are very many 
places in the stdlib where we accept an equivalent of, say, `name=`  during 
some object's `__init__()` and just assign it to a field. If that happens not 
to be printable and crash `repr()` then too bad... but we won't be adding 
checks for each such case, right?

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API)

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

See bpo-43760 and PR 28498 for a discussion about the PyThreadState.use_tracing 
member.

--

___
Python tracker 

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



[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 06e1773c8d8fe375423bb7fcf5922b49bc737b75 by Nikita Sobolev in 
branch 'main':
bpo-45216: Remove extraneous method docs from `difflib` (GH-28445)
https://github.com/python/cpython/commit/06e1773c8d8fe375423bb7fcf5922b49bc737b75


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26901
pull_request: https://github.com/python/cpython/pull/28506

___
Python tracker 

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



[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue15373] copy.copy() does not properly copy os.environment

2021-09-21 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I guess the easy way to test it would be to modify the copy and check 
os.environ, but still there would be some uncertainty if it's consistent across 
platforms and python versions, if it's expected to still work in future python 
versions, etc. asdict() docstring is much more explicit.

--

___
Python tracker 

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



[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +26899
pull_request: https://github.com/python/cpython/pull/28504

___
Python tracker 

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



[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 79a31480992c3fa5890fc7a6c5d9af6d337d5844 by Victor Stinner in 
branch 'main':
bpo-45061: Detect refcount bug on empty tuple singleton (GH-28503)
https://github.com/python/cpython/commit/79a31480992c3fa5890fc7a6c5d9af6d337d5844


--

___
Python tracker 

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



[issue15373] copy.copy() does not properly copy os.environment

2021-09-21 Thread Anton Barkovsky


Change by Anton Barkovsky :


--
nosy:  -anton.barkovsky

___
Python tracker 

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



[issue15373] copy.copy() does not properly copy os.environment

2021-09-21 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I think the advantage of asdict() method is it's more discoverable and it 
doesn't leave any uncertainty of whether returned value will update environment 
or not. If a user sees `dict(os.environ)` in code, they may wonder if it does 
or does not; and there's no obvious way to confirm.

If they see os.environ.asdict(), it will be safe to assume that the method is 
provided exactly for this purpose, and the way to confirm is obvious - checking 
the docstring.

--

___
Python tracker 

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



[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-21 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
status: open -> pending

___
Python tracker 

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



[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-21 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> Could it instead throw a FileNotFoundError if the db simply doesn't exist at 
> the specified path?

We pass the database path pretty much straight to sqlite3_open_v2(), via the 
os.PathLike interface, so any errors we get come straight from SQLite (apart 
from os.PathLike errors). We translate SQLite error codes to the corresponding 
DP-API exception, as defined per PEP 249.

Raising FileNotFoundError would mean adding support for validating the path 
prior to calling sqlite3_open_v2() _and_ maintaining backwards compatibility 
(in-memory database, creating new database file if the path points to a valid 
directory, etc.). This will complicate the code unnecessary, IMO. I suggest to 
keep the current behaviour.

See also the slightly related bpo-24139.

--

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Also, I personally thing there is absolutely no guarantee that Cython code 
generated for 3.9 should work for 3.10 and the thread state is a private 
structure that has undocumented fields and is not part of the stable API nor 
the limited API so, tstate->tracing disappearing is totally withing the 
guarantees between Python versions.

--

___
Python tracker 

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



[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +26898
pull_request: https://github.com/python/cpython/pull/28503

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Also, just to clarify, I also opened PR 28498 to discuss the possibility of 
going ahead, I still don't want to move on without consensus.

--

___
Python tracker 

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



[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2021-09-21 Thread Yurii Karabas

Yurii Karabas <1998uri...@gmail.com> added the comment:

Łukasz this issue is my original finding.

I have found this case when I was working on another issue that was related to 
`typing.Protocol`.

I agree that we can leave it as it is for now because I didn't find any 
information from python community about this case.

--

___
Python tracker 

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



[issue45246] the sorted() documentation should refer to operator

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 0d41bf15702832540afc1b1c078bc4fde5baebd6 by Łukasz Langa in 
branch '3.10':
[3.10] bpo-45246: Document that sorted() only uses "<" comparisons (GH-28494) 
(GH-28502)
https://github.com/python/cpython/commit/0d41bf15702832540afc1b1c078bc4fde5baebd6


--

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

>From PR 28498:

@vstinner @ambv The ABI is not broken, the only thing that this PR change is 
the size of the struct. All the offsets to the members are the same and 
therefore will be valid in any compiled code.

Any compiled wheels will still work. Look at the ABI report:

  [C]'function void PyEval_AcquireThread(PyThreadState*)' at ceval.c:447:1 has 
some indirect sub-type changes:
parameter 1 of type 'PyThreadState*' has sub-type changes:
  in pointed to type 'typedef PyThreadState' at pystate.h:20:1:
underlying type 'struct _ts' at pystate.h:62:1 changed:
  type size changed from 2240 to 2304 (in bits)
  1 data member insertion:
'int _ts::use_tracing', at offset 2240 (in bits) at pystate.h:151:1
  1 data member changes (2 filtered):
   type of 'PyInterpreterState* _ts::interp' changed:
 in pointed to type 'typedef PyInterpreterState' at pystate.h:22:1:
   underlying type 'struct _is' at pycore_interp.h:220:1 changed:
 type size hasn't changed
 1 data member changes (3 filtered):
  type of '_PyFrameEvalFunction _is::eval_frame' changed:
underlying type 'PyObject* (PyThreadState*, PyFrameObject*, 
int)*' changed:
  in pointed to type 'function type PyObject* 
(PyThreadState*, PyFrameObject*, int)':
parameter 1 of type 'PyThreadState*' has sub-type 
changes:
  in pointed to type 'typedef PyThreadState' at 
pystate.h:20:1:
underlying type 'struct _ts' at pystate.h:62:1 
changed:
  type size changed from 2240 to 2304 (in bits)
  1 data member insertion:
'int _ts::use_tracing', at offset 2240 (in 
bits) at pystate.h:151:1
  1 data member changes (2 filtered):
   type of '_ts* _ts::next' changed:
 in pointed to type 'struct _ts' at 
pystate.h:62:1:
   type size changed from 2240 to 2304 (in bits)
   1 data member insertion:
 'int _ts::use_tracing', at offset 2240 (in 
bits) at pystate.h:151:1
   no data member changes (2 filtered);




  [C]'function PyThreadState* PyGILState_GetThisThreadState()' at 
pystate.c:1455:1 has some indirect sub-type changes:
return type changed:
  in pointed to type 'typedef PyThreadState' at pystate.h:20:1:
underlying type 'struct _ts' at pystate.h:62:1 changed:
  type size changed from 2240 to 2304 (in bits)
  1 data member insertion:
'int _ts::use_tracing', at offset 2240 (in bits) at pystate.h:151:1
  no data member changes (4 filtered);

  [C]'function int _PyErr_CheckSignalsTstate(PyThreadState*)' at 
signalmodule.c:1767:1 has some indirect sub-type changes:
parameter 1 of type 'PyThreadState*' has sub-type changes:
  in pointed to type 'typedef PyThreadState' at pystate.h:20:1:
underlying type 'struct _ts' at pystate.h:62:1 changed:
  type size changed from 2240 to 2304 (in bits)
  1 data member insertion:
'int _ts::use_tracing', at offset 2240 (in bits) at pystate.h:151:1
  no data member changes (3 filtered);

  [C]'function void _PyErr_Clear(PyThreadState*)' at errors.c:453:1 has some 
indirect sub-type changes:
parameter 1 of type 'PyThreadState*' has sub-type changes:
  in pointed to type 'typedef PyThreadState' at pystate.h:20:1:
underlying type 'struct _ts' at pystate.h:62:1 changed:
  type size changed from 2240 to 2304 (in bits)
  1 data member insertion:
'int _ts::use_tracing', at offset 2240 (in bits) at pystate.h:151:1
  no data member changes (3 filtered);
As you can see, the leaves of the change is only type size changed from 2240 to 
2304. As the member is added

--

___
Python tracker 

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



[issue40503] PEP 615: Add zoneinfo module

2021-09-21 Thread Steve Dower


Steve Dower  added the comment:

We'd need to implement some form of data store for values on Windows, which 
currently are not compiled in anywhere, and it would need a substitution syntax 
to be updated at runtime.

We're talking a big feature now, and you'd end up having just as much code on 
your side to make it work.

The only justification that'd make sense on our side is if we were going to 
bundle the tzdata file with the Windows installer, which doesn't affect you at 
all, apart from us then having an existing path listed that you'd want to 
override still. And even then, we'd probably preinstall the tzdata package 
which already overrides the path, and so there'd be no changes necessary to 
sysconfig and so we wouldn't touch it anyway.

--

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-09-21 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm still torn about the need for a __file__ attribute. Assuming it's more 
likely that people write code that *reads* stdlib source for some reason (maybe 
printing more context for error messages) than *writing* it (which would be 
truly strange), the amount of 3rd party code that might break due to the lack 
of __file__ can be expected to be larger than the amount of code (or number of 
users) that would be confused to having a __file__ pointing to a file that 
isn't actually read by the interpreter.

Okay, so I'm no longer torn. We should set __file__ for frozen modules based on 
the pre-computed location of the stdlib.

--

___
Python tracker 

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



[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2021-09-21 Thread Łukasz Langa

Łukasz Langa  added the comment:

Yurri, is the issue you reported your original finding? If you haven't found 
this issue in the wild, we might want to let this be as-is until we specify 
exactly whether `__init__()` should be considered part of a protocol.

--

___
Python tracker 

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



[issue42641] Deprecate os.popen() function

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like they are legit use cases for os.popen(), so I abandon my idea of 
deprecating it.

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



[issue44203] test__xxsubinterpreters: heap-buffer-overflow in interp_is_running() on AMD64 Arch Linux Asan 3.x

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

On the latest build 564, there is no more error:

0:17:51 load avg: 2.50 [169/421] test__xxsubinterpreters passed

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue40453] [subinterpreters] Add PyConfig._isolated_interpreter: isolated subinterpreters

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


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



[issue45246] the sorted() documentation should refer to operator

2021-09-21 Thread Łukasz Langa

Change by Łukasz Langa :


--
nosy: +lukasz.langa
nosy_count: 5.0 -> 6.0
pull_requests: +26897
pull_request: https://github.com/python/cpython/pull/28502

___
Python tracker 

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



[issue44531] Add _PyType_AllocNoTrack() function: allocate without tracking in the GC

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


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



[issue45259] No _heappush_max()

2021-09-21 Thread Thomas


Change by Thomas :


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



[issue40503] PEP 615: Add zoneinfo module

2021-09-21 Thread Isuru Fernando


Isuru Fernando  added the comment:

Do you have a suggestion for how to make it configurable at compile time?
In POSIX platforms, we can set `--with-tzpath` to make it configurable at 
compile time.

--

___
Python tracker 

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



[issue45259] No _heappush_max()

2021-09-21 Thread Thomas


Change by Thomas :


--
nosy: +rhettinger, stutzbach -ThomasLee94

___
Python tracker 

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



[issue45259] No _heappush_max()

2021-09-21 Thread Thomas


New submission from Thomas :

There is no heappush function for a max heap when the other supporting helper 
functions are already implemented (_siftdown_max())

--
components: Library (Lib)
messages: 402351
nosy: ThomasLee94
priority: normal
severity: normal
status: open
title: No _heappush_max()
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



[issue45026] More compact range iterator

2021-09-21 Thread Guido van Rossum


Guido van Rossum  added the comment:

May the best PR win. :-)

--

___
Python tracker 

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



[issue40503] PEP 615: Add zoneinfo module

2021-09-21 Thread Steve Dower


Steve Dower  added the comment:

I meant I don't think we want that path upstream, and you should keep it as 
your own patch.

We don't have a "share" directory as part of CPython, but this would codify it. 
That would then conflict with your use of it in conda-forge.

It also makes sysconfig non-deterministic, which is going to be problematic 
against some other efforts around being able to treat it as static data to make 
native module compilation easier, as well as more generally something that 
often leads to security vulnerabilities and is best avoided.

So on balance, I think we will reject that patch.

--

___
Python tracker 

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



[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2021-09-21 Thread Guido van Rossum


Guido van Rossum  added the comment:

I wonder if part of the problem here isn't that protocols are primarily focused 
on instances, where the __init__ method is explicitly *not* considered part of 
the type.

IIRC supporting protocols for classes was an afterthought.

That said you have made a good case for seeing it as part of the protocol  when 
the Type[] operator is applied to the protocol.

So yes, I think we should be careful ruling that out too soon. Do we have any 
evidence that users are confused and define __init__ methods on protocols that 
are being ignored by their type checkers? The OP didn't say.

When in doubt, let the status quo win.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue45026] More compact range iterator

2021-09-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

length_hint(), not len(). Its cost is included in microbenchmark for list(), 
where it is followed by iterating 2000 items.

Calling operator.length_hint() in Python:

$ ./python -m pyperf timeit -s 'it = iter(range(1000)); from operator import 
length_hint' 'length_hint(it)'
baseline: Mean +- std dev: 109 ns +- 6 ns
PR 27986: Mean +- std dev: 109 ns +- 5 ns
PR 28176: Mean +- std dev: 115 ns +- 5 ns

$ ./python -m pyperf timeit -s 'it = iter(range(0, 10**20, 3**35)); from 
operator import length_hint' 'length_hint(it)'
baseline: Mean +- std dev: 114 ns +- 6 ns
PR 27986: Mean +- std dev: 95.6 ns +- 4.3 ns
PR 28176: Mean +- std dev: 285 ns +- 13 ns

Indirect call from C (it includes overhead for calling list() and iter() in 
Python):

$ ./python -m pyperf timeit -s 'r = range(10**20, 10**20+1, 3**35)' 
'list(iter(r))'
baseline: Mean +- std dev: 331 ns +- 16 ns
PR 27986: Mean +- std dev: 300 ns +- 16 ns
PR 28176: Mean +- std dev: 391 ns +- 18 ns

With few experiments I have found that PR 28176 is faster than PR 27986 for 
list(iter(range(...))) if a range is larger than 40-100 items.

--

___
Python tracker 

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



[issue44358] AMD64 RHEL8 LTO + PGO 3.x build failed with: /usr/bin/ld: Dwarf Error: Offset (2487097600) greater than or equal to .debug_str size (571933).

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

> I reported the compiler bug to RHEL: 
> https://bugzilla.redhat.com/show_bug.cgi?id=1969775

I close the issue. It's now tracked at 
https://bugzilla.redhat.com/show_bug.cgi?id=1969775

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

___
Python tracker 

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



[issue44416] test_threading: test_print_exception() hangs and killed after 3h15 on AMD64 Windows8.1 Refleaks 3.9

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see this failure recently. I close the issue as out of date.

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

___
Python tracker 

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



[issue44480] test_compile killed by signal 9 on AMD64 FreeBSD Non-Debug 3.x

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see this failure recently.

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

___
Python tracker 

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



[issue45209] multiprocessing tests log: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Nikita Sobolev for the fix.

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



[issue45209] multiprocessing tests log: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 65268ab849173e9849b7fc94c3d73900b5410444 by Miss Islington (bot) 
in branch '3.9':
bpo-45209: fix `UserWarning: resource_tracker` in test_multiprocessing 
(GH-28377) (GH-28500)
https://github.com/python/cpython/commit/65268ab849173e9849b7fc94c3d73900b5410444


--

___
Python tracker 

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



[issue45209] multiprocessing tests log: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown

2021-09-21 Thread miss-islington


miss-islington  added the comment:


New changeset 09e5016f8bb07beb7d780df221febac2d2867ad0 by Miss Islington (bot) 
in branch '3.10':
bpo-45209: fix `UserWarning: resource_tracker` in test_multiprocessing 
(GH-28377)
https://github.com/python/cpython/commit/09e5016f8bb07beb7d780df221febac2d2867ad0


--

___
Python tracker 

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



[issue45257] Compiling 3.8 branch on Windows attempts to use incompatible libffi version

2021-09-21 Thread William Proffitt


William Proffitt  added the comment:

Ah yes, thank you Steve. I see the commit you're referencing is the cherry pick 
from upstream onto the 3.8 branch, but it's newer than the tag 3.8.12 I was 
using. Looks like I won't have to do anything if I wait until 3.8.13 before 
doing this again. This is good.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue43976] Allow Python distributors to add custom site install schemes

2021-09-21 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

> In the short term, and possible for the long term, Debian can continue to 
> patch the install routine...

The problem with this approach is Setuptools is attempting to adopt distutils 
by exposing its own vendored copy of distutils as `distutils` (top-level name). 
By doing this, it bypasses the Debian's patching of distutils as found in 
CPython. Because this bypass behavior breaks distutils for Debian users, the 
functionality has been disabled (opt-in).

Setuptools would like to be able to present a version of distutils that, 
unpatched, runs on all the major platforms, and thus make it default.

That won't be possible until Debian can stop relying on its patching of 
distutils.

--

___
Python tracker 

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



[issue45258] sysroot_paths in setup.py does not consider -isysroot for macOS

2021-09-21 Thread Isuru Fernando


Change by Isuru Fernando :


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

___
Python tracker 

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



[issue45258] sysroot_paths in setup.py does not consider -isysroot for macOS

2021-09-21 Thread Isuru Fernando


New submission from Isuru Fernando :

It only looks at --sysroot which is Linux specific

--
components: Build
messages: 402338
nosy: FFY00, isuruf
priority: normal
severity: normal
status: open
title: sysroot_paths in setup.py does not consider -isysroot for macOS
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



[issue45209] multiprocessing tests log: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown

2021-09-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26895
pull_request: https://github.com/python/cpython/pull/28500

___
Python tracker 

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



[issue45209] multiprocessing tests log: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown

2021-09-21 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



  1   2   >