[issue13179] IDLE uses common tkinter variables across all editor windows

2020-06-08 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +Python 3.10 -Python 3.6, Python 3.7

___
Python tracker 

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



[issue40890] Dict views should be introspectable

2020-06-08 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Here's a workaround that's possible with PR 20749 applied:

>>> d = {"a":1, "b":2} # fill up the dict...
>>> DICT = object()
>>> d[DICT] = d
>>> items = d.items()
>>> del d
>>>
>>> d = items.mapping[DICT].pop(DICT)
>>> d
{'a': 1, 'b': 2}

--

___
Python tracker 

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



[issue40916] Proposed tweak to allow for per-task async generator semantics

2020-06-08 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

FWIW, this seems like a pretty straightforward improvement to me.

--

___
Python tracker 

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



[issue40917] pickle exceptions with mandatory keyword args will traceback

2020-06-08 Thread Toshio Kuratomi


Change by Toshio Kuratomi :


--
title: pickling exceptions with mandatory keyword args will traceback -> pickle 
exceptions with mandatory keyword args will traceback

___
Python tracker 

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



[issue40890] Dict views should be introspectable

2020-06-08 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

PR 20749 gives each dict view access to a mappingproxy for the original dict, 
although I don't know if that defeats the original purpose.

It might be hard to sensibly make MappingProxy(d).items() return something 
other than d.items(), since this is already the behavior for user-defined 
classes:

>>> class A:
def __getitem__(self, key):
return "value"
def items(self):
return 17

>>> from types import MappingProxyType
>>> MappingProxyType(A()).items()
17

--

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Stefan Krah  added the comment:

The 3.9 change (see #40874) works successfully on all buildbots, except for the 
32-bit xlc bot which should use c99_r.

Additionally, it has been tested with the latest gcc/clang/icc/cl.exe, static 
analyzers and clang-tidy.

It survives brute force allocation failure tests under Valgrind and all 
sanitizers (ASAN + integrated LSAN, UBSAN, TSAN).


Except for one (standalone LSAN), and that is an LSAN issue:

https://github.com/google/sanitizers/issues/1257


It looks very similar to the xlc issue and was found by using a debugger, which 
is apparently not possible with the xlc toolchain. :-)

--

___
Python tracker 

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



[issue40890] Dict views should be introspectable

2020-06-08 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
keywords: +patch
pull_requests: +19954
pull_request: https://github.com/python/cpython/pull/20749

___
Python tracker 

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



[issue40923] Thread safety : disable intel’s compiler autopar where it’s being relevant.

2020-06-08 Thread Laël Cellier

Laël Cellier  added the comment:

It also turns out the problematic binary can’t be posted here because of a ʜᴛᴛᴘ 
413 Entity too large error despite the attachment being only 4MB

https://filebin.net/4lp4nb61dav9qamo

--

___
Python tracker 

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



[issue40923] Thread safety : disable intel’s compiler autopar where it’s being relevant.

2020-06-08 Thread Laël Cellier

Laël Cellier  added the comment:

(about the bug tracker I was meaning server‑side error message)

--

___
Python tracker 

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



[issue40923] Thread safety : disable intel’s compiler autopar where it’s being relevant.

2020-06-08 Thread Laël Cellier

New submission from Laël Cellier :

As the bug tracker constantly crash over a continuation byte error while using 
latest Edgeʜᴛᴍʟ’s Edge browser the description is posted here : 
https://pastebin.com/5AU9HuQk

--
components: Build, C API, Interpreter Core
messages: 371066
nosy: Laël Cellier
priority: normal
severity: normal
status: open
title: Thread safety : disable intel’s compiler autopar where it’s being 
relevant.
type: crash

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 0f5a28f834bdac2da8a04597dc0fc5b71e50da9d by Stefan Krah in branch 
'3.8':
[3.8] Revert bpo-39576: Prevent memory error for overly optimistic precisions 
(GH-20747)
https://github.com/python/cpython/commit/0f5a28f834bdac2da8a04597dc0fc5b71e50da9d


--

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 22faf6ad3bcc0ae478a9a3e2d8e35888d88d6ce8 by Stefan Krah in branch 
'3.7':
[3.7] Revert bpo-39576: Prevent memory error for overly optimistic precisions 
(GH-20748)
https://github.com/python/cpython/commit/22faf6ad3bcc0ae478a9a3e2d8e35888d88d6ce8


--

___
Python tracker 

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



[issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't

2020-06-08 Thread Guido van Rossum


Guido van Rossum  added the comment:

To be clear, I consider it a bug.

--

___
Python tracker 

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



[issue40917] pickling exceptions with mandatory keyword args will traceback

2020-06-08 Thread Toshio Kuratomi


New submission from Toshio Kuratomi :

I was trying to use multiprocessing (via a 
concurrent.futures.ProcessPoolExecutor) and encountered an error when pickling 
a custom Exception.  On closer examination I was able to create a simple test 
case that only involves pickle:


import pickle
class StrRegexError(Exception):
def __init__(self, *, pattern):
self.pattern = pattern

data = pickle.dumps(StrRegexError(pattern='test'))
instance = pickle.loads(data)


[pts/11@peru /srv/ansible]$ python3.8 ~/p.py
Traceback (most recent call last):
  File "/home/badger/p.py", line 7, in 
instance = pickle.loads(data)
TypeError: __init__() missing 1 required keyword-only argument: 'pattern'

pickle can handle mandatory keyword args in other classes derived from object; 
it's only classes derived from Exception that have issues.

--
components: Library (Lib)
messages: 371057
nosy: a.badger
priority: normal
severity: normal
status: open
title: pickling exceptions with mandatory keyword args will traceback
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't

2020-06-08 Thread Adam Williamson


Adam Williamson  added the comment:

I'm not the best person to ask what I'd "consider" to be a bug or not, to be 
honest. I'm just a Fedora packaging guy trying to make our packages build with 
Python 3.9 :) If this is still an important question, I'd suggest asking the 
folks from the Black issue and PR I linked to, that's the "real world" case if 
any.

--

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Change by Stefan Krah :


--
pull_requests: +19953
pull_request: https://github.com/python/cpython/pull/20748

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Change by Stefan Krah :


--
pull_requests: +19952
pull_request: https://github.com/python/cpython/pull/20747

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 9bd891920a5186b7d02281ea9966225efa0ceba1 by Stefan Krah in branch 
'3.7':
[3.7] Revert bpo-39576: docs: set context for decimal arbitrary precision 
arithmetic (GH-20746)
https://github.com/python/cpython/commit/9bd891920a5186b7d02281ea9966225efa0ceba1


--

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 32c1fb07e6f2ded90e5dd24d4b46b7aa7a795d2e by Stefan Krah in branch 
'3.8':
[3.8] Revert bpo-39576: docs: set context for decimal arbitrary precision 
arithmetic (GH-20745)
https://github.com/python/cpython/commit/32c1fb07e6f2ded90e5dd24d4b46b7aa7a795d2e


--

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Change by Stefan Krah :


--
pull_requests: +19951
pull_request: https://github.com/python/cpython/pull/20746

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Change by Stefan Krah :


--
pull_requests: +19950
pull_request: https://github.com/python/cpython/pull/20745

___
Python tracker 

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



[issue40916] Proposed tweak to allow for per-task async generator semantics

2020-06-08 Thread Joshua Oreman


New submission from Joshua Oreman :

The current async generator finalization hooks are per-thread, but sometimes 
you want different async generator semantics in different async tasks in the 
same thread. This is currently challenging to implement using the thread-level 
hooks. I'm proposing a small backwards-compatible change to the existing async 
generator hook semantics in order to better support this use case. I'm seeking 
feedback on the proposal and also on how "major" it would be considered. Does 
it need a PEP? If not, does it need to wait for 3.10 or could it maybe still 
make 3.9 at this point?

TL;DR: if the firstiter hook returns a callable, use that as the finalizer hook 
for this async generator instead of using the thread-level finalizer hook.

== Why would you want this? ==

The use case that brought me here is trio-asyncio, a library that allows 
asyncio and Trio tasks to coexist in the same thread. Trio is working on adding 
async generator finalization support at the moment, which presents problems for 
trio-asyncio: it wouldn't work to finalize asyncio-flavored async generators as 
if they were Trio-flavored, or vice versa. It's easy to tell an async 
generator's flavor from the firstiter hook (just look at which flavor of task 
is running right now), but hard to ensure that the corresponding correct 
finalizer hook is called (more on this below).

There are other possible uses as well. For example, one could imagine writing 
an async context manager that ensures all async generators firstiter'd within 
the context are aclose'd before exiting the context. This would be less verbose 
than guarding each individual use of an async generator, but still provide more 
deterministic cleanup behavior than leaving it up to GC.

== Why is this challenging to implement currently? ==

Both of the above use cases want to provide a certain async generator 
firstiter/finalizer behavior, but only within a particular task or tasks. A 
task-local firstiter hook is easy: just install a thread-local hook that checks 
if you're in a task of interest, calls your custom logic if so or calls the 
previous hook if not. But a task-local finalizer hook is challenging, because 
finalization doesn't necessarily occur in the same context where the generator 
was being used. The firstiter hook would need to remember which finalizer hook 
to use for this async generator, but where could it store that information? 
Using the async generator iterator object as a key in a regular dictionary will 
prevent it from being finalized, and as a key in a WeakKeyDictionary will 
remove the information before the finalizer hook can look it up (because 
weakrefs are broken before finalizers are called). About the only solution I've 
found is to store it in the generator's f_locals dict, but that's not very ap
 pealing.

== What's the proposed change? ==

My proposal is to allow the firstiter hook to return the finalizer hook that 
this async generator should use. If it does so, then when this async generator 
is finalized, it will call the returned finalizer hook instead of the 
thread-level one. If the firstiter hook returns None, then this async generator 
will use whatever the thread-level finalizer was just before firstiter was 
called, same as the current behavior.

== How disruptive would this be? ==

Async generator objects already have an ag_finalizer field, so this would not 
change the object size. It's just providing a more flexible way to determine 
the value of ag_finalizer, which is currently not accessible from Python.

There is a theoretical backwards compatibility concern if any existing 
firstiter hook returns a non-None value. There wouldn't be any reason to do so, 
though, and the number of different users of set_asyncgen_hooks() currently is 
likely extremely small. I searched all of Github and found only asyncio, curio, 
uvloop, async_generator, and my work-in-progress PR for Trio. All of these 
install either no firstiter hook or a firstiter hook that returns None.

The implementation would likely only be a handful of lines change to 
genobject.c.

--
components: asyncio
messages: 371053
nosy: Joshua Oreman, asvetlov, njs, yselivanov
priority: normal
severity: normal
status: open
title: Proposed tweak to allow for per-task async generator semantics
type: enhancement
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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset c0b79450bc9e93105799528151c48d25af8240a3 by Stefan Krah in branch 
'3.7':
[3.7] Revert bpo-39576: Clarify the word size for the 32-bit build. (GH-20744)
https://github.com/python/cpython/commit/c0b79450bc9e93105799528151c48d25af8240a3


--

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 706de4e5a4b21880c67f6b90e3a2147a258d6fc5 by Stefan Krah in branch 
'3.8':
[3.8] Revert bpo-39576: Clarify the word size for the 32-bit build. (GH-20743)
https://github.com/python/cpython/commit/706de4e5a4b21880c67f6b90e3a2147a258d6fc5


--

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Change by Stefan Krah :


--
pull_requests: +19949
pull_request: https://github.com/python/cpython/pull/20744

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Change by Stefan Krah :


--
pull_requests: +19948
pull_request: https://github.com/python/cpython/pull/20743

___
Python tracker 

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



[issue40915] muultiple problems with mmap.resize() in Windows

2020-06-08 Thread Eryk Sun


New submission from Eryk Sun :

In Windows, mmap.resize() unmaps the view of the section [1], closes the 
section handle, resizes the file (without error checking), creates a new 
section (without checking for ERROR_ALREADY_EXISTS), and maps a new view. This 
code has several problems.

Case 1

If it tries to shrink a file that has existing section references, SetEndOfFile 
fails with ERROR_USER_MAPPED_FILE. Since the error isn't checked, the code 
proceeds to silently map a smaller view without changing the file size, which 
contradicts the documented behavior. For example:

>>> f = open('C:/Temp/spam.txt', 'wb+')
>>> f.truncate(8192)
8192
>>> m1 = mmap.mmap(f.fileno(), 0)
>>> m2 = mmap.mmap(f.fileno(), 0)
>>> m1.resize(4096)
>>> os.fstat(f.fileno()).st_size
8192

In this case, it should set dwErrCode = ERROR_USER_MAPPED_FILE; set new_size = 
self->size; remap the file; and fail the resize() call. The mmap object should 
remain open.

Case 2

Growing the file may succeed, but if it's a named section (i.e. self->tagname 
is set) with multiple handle references, then CreateFileMapping just reopens 
the existing section by name. Or there could be a race condition with another 
section that gets created with the same name in the window between closing the 
current section, resizing the file, and creating a new section. Generally 
mapping a new view will fail in this case. In particular, if the section isn't 
large enough, then the NtMapViewOfSection system call fails with 
STATUS_INVALID_VIEW_SIZE, which WinAPI MapViewOfFile translates to 
ERROR_ACCESS_DENIED. For example:

>>> f = open('C:/Temp/spam.txt', 'wb+')
>>> f.truncate(8192)
8192
>>> m1 = mmap.mmap(f.fileno(), 0, 'spam')
>>> m2 = mmap.mmap(-1, 8192, 'spam')
>>> m1.resize(16384)
Traceback (most recent call last):
  File "", line 1, in 
PermissionError: [WinError 5] Access is denied
>>> m1[0]
Traceback (most recent call last):
  File "", line 1, in 
ValueError: mmap closed or invalid
   >>> os.fstat(f.fileno()).st_size
16384

If CreateFileMapping succeeds with the last error set to ERROR_ALREADY_EXISTS, 
then it either opened the previous section or there was a race condition in 
which another section was created with the same name. This case should be 
handled by closing the section and failing the call. It should not proceed to 
MapViewOfFile, which may 'succeed' unreliably.

Additionally, there could be a LBYL check at the outset to avoid having to 
close the section in the case of a named section that's opened multiple times. 
If self->tagname is set, get the handle count of the section via NtQueryObject: 
ObjectBasicInformation [2]. If the handle count is not exactly 1, fail the 
resize() call, but don't close the mmap object. 

Case 3

resize() is broken for sections that are backed by the system paging file. For 
example:

>>> m = mmap.mmap(-1, 4096)
>>> m.resize(8192)
Traceback (most recent call last):
  File "", line 1, in 
OSError: [WinError 87] The parameter is incorrect
>>> m[0]
Traceback (most recent call last):
  File "", line 1, in 
ValueError: mmap closed or invalid

Since the handle value is INVALID_HANDLE_VALUE in this case, the calls to 
resize the 'file' via SetFilePointer and SetEndOfFile fail with 
ERROR_INVALID_HANDLE (due to an object type mismatch because handle value -1 is 
the current process). There's no error checking, so it proceeds to call 
CreateFileMapping with dwMaximumSizeHigh and dwMaximumSizeLow as 0, which fails 
immediately as an invalid parameter. Creating a section that's backed by the 
system paging file requires a non-zero size.

The view of a section can shrink, but the section itself cannot grow. Generally 
resize() in this case would have to create a copy as follows: close the 
section; create another section with the new size; map the new view; copy the 
contents of the old view to the new view; and unmap the old view. Note that 
creating a new named section may open the previous section, or open an 
unrelated section if there's a race condition, so ERROR_ALREADY_EXISTS has to 
be handled.

[1]: "section" is the native system name of a "file mapping".
[2]: 
https://docs.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntqueryobject

--
components: IO, Library (Lib), Windows
messages: 371050
nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: muultiple problems with mmap.resize()  in Windows
type: behavior
versions: Python 3.10, 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



[issue40915] multiple problems with mmap.resize() in Windows

2020-06-08 Thread Eryk Sun


Change by Eryk Sun :


--
title: muultiple problems with mmap.resize()  in Windows -> multiple problems 
with mmap.resize()  in Windows

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-06-08 Thread Stefan Krah


Stefan Krah  added the comment:

I think I'm going to revert this for 3.7 and 3.8 -- not because of xlc (it is 
almost certainly a compiler or missing flag error), but because coordination 
with the Linux distributions is a mess, see #40874.

I really want the system libmpdec to be the same as the one in Python.

So, there has been one 3.7 and 3.8 release in the meantime. However, I highly 
doubt that anyone will have relied on this in the meantime.

In the worst case, people can compile 3.7/3.8 with the upcoming libmpdec-2.5.0.

--

___
Python tracker 

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



[issue40889] Symmetric difference on dict_views is inefficient

2020-06-08 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

A demo:

>>> class Int(int):
... hash_calls = 0
... def __hash__(self):
... Int.hash_calls += 1
... return super().__hash__()
...
>>> left = {Int(1): -1, Int(2): -2, Int(3): -3, Int(4): -4, Int(5): -5, Int(6): 
>>> -6, Int(7): -7}
>>> right = {Int(1): -1, Int(2): -2, Int(3): -3, Int(4): -4, Int(5): -5, 
>>> Int(8): -8, Int(9): -9}
>>> Int.hash_calls = 0
>>> left.items() ^ right.items()
{(9, -9), (7, -7), (8, -8), (6, -6)}
>>> Int.hash_calls



It looks like the same trick (searching by key and comparing values before 
maybe constructing a 2-tuple) might give similar performance improvements for 
dict_items.__or__, dict_items.__and__, and dict_items.__sub__. Is it worth 
discussing these other operators in this issue?

--

___
Python tracker 

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



[issue35823] Use vfork() in subprocess on Linux

2020-06-08 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue35823] Use vfork() in subprocess on Linux

2020-06-08 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue40914] tarfile creates output that appears to omit files

2020-06-08 Thread Zachary Ware


Zachary Ware  added the comment:

Note that `TarFile.getmembers()` is documented to return `TarInfo` objects, 
which are documented as explicitly *not* including file data.  Try replacing 
`out.addfile(file)` with `out.addfile(file, tar.extractfile(file))`.

--
nosy: +zach.ware

___
Python tracker 

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



[issue27657] urlparse fails if the path is numeric

2020-06-08 Thread Chris Dent


Chris Dent  added the comment:

I don't want to belabour the point. If there's general agreement that the new 
behaviour is the best result that's fine, especially if it is well announced. I 
agree that it has been inconsistent and weird for a long time. I think my 
objection simply comes down to "we all got used to it being weird over the 
years, and now you want to change it!?"

Followed by table flips and all the rest. But it really isn't that much of a 
big deal, so I won't persist. Long term having it be its most correct is 
probably the best thing.

--

___
Python tracker 

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



[issue40914] tarfile creates output that appears to omit files

2020-06-08 Thread Michael Richardson


Change by Michael Richardson :


--
versions: +Python 3.7

___
Python tracker 

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



[issue40914] tarfile creates output that appears to omit files

2020-06-08 Thread Michael Richardson


New submission from Michael Richardson :

The simplest tarcopy program seems to result in output that GNU tar, bsdtar, 
and even Emacs tar-mode is unable to correctly process.
It appears that the resulting tar file is missing files, but examination of the 
raw output shows they might be there, but just corrupt.
GNU tar actually complains while reading the file.
   https://github.com/mcr/python3-tar-copy-failure

has a test case.  Here is the stupid code to reproduce it:

import tarfile
out = tarfile.open(name="./t2.tar", mode="w", format=tarfile.PAX_FORMAT)
with tarfile.open("./t1.tar") as tar:
for file in tar.getmembers():
print (file.name)
out.addfile(file)
out.close()

This has been confirmed on python 3.6.9 (Ubuntu 18.04 LTS), and python 3.7.3 
(Devuan Beowulf).  It seems to omit different files on 32-bit and 64-bit 
systems.

--
components: Library (Lib)
messages: 371045
nosy: mcr314
priority: normal
severity: normal
status: open
title: tarfile creates output that appears to omit files
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue27657] urlparse fails if the path is numeric

2020-06-08 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

Chris, my understanding of the primary objection in your previous post was with 
a violation of backward compatibility. It was resolved by reverting.

The 3.9+ changes are useful ones, particularly when well-defined behaviors are 
listed for URLs with the scheme. 

---

Let's please assume that the behavior will be consistent for 

a) Scheme URLs for all supported versions of Python for numeric paths.

b) Consistent with other widely observed behavior (or supported by RFC) in 3.9+ 
onwards for this particular case.

If there is any violation of b), please point out, I am certainly open to treat 
this as a bug (again) and revisit the 3+ issues across which this discussion 
has spanned.

--

___
Python tracker 

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



[issue40907] cpython/lib/queue.py: put() does not acquire not_empty before notifying on it

2020-06-08 Thread r n


Change by r n :


--
nosy: +rhettinger -r n2
title: cpython/queue.py: put() does not acquire not_empty before notifying on 
it -> cpython/lib/queue.py: put() does not acquire not_empty before notifying 
on it

___
Python tracker 

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



[issue27657] urlparse fails if the path is numeric

2020-06-08 Thread Chris Dent


Chris Dent  added the comment:

I just wanted to reiterate what I said at 
https://bugs.python.org/issue27657#msg360196

The supposed fix provides terribly UX and violates what I think for many people 
is the path of least surprise.

--

___
Python tracker 

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



[issue27657] urlparse fails if the path is numeric

2020-06-08 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Michał, for this particular issue, to rely on the expected and consistent 
parsing behavior, it might easier to add "scheme" to URLs in the client code. 

That will be less confusing IMO. Not sure if __future__ is a good idea. 
Personally, I am -1 at this point.

--

___
Python tracker 

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



[issue40912] _PyOS_SigintEvent is never closed on Windows

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

PyOS_FiniInterrupts() is a good place to close _PyOS_SigintEvent. Hopefully, 
it's a internal C API and it's not exported, since it's fine to change its 
behavior. Maybe it should be renamed to _PyOS_FiniInterrupts().

--

___
Python tracker 

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



[issue27657] urlparse fails if the path is numeric

2020-06-08 Thread Michał Górny

Michał Górny  added the comment:

I wonder if it would be feasible to support new behavior in earlier versions of 
Python via __future__.  I suppose that could help software avoid having Python 
version-dependent behavior in the long run.

--

___
Python tracker 

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



[issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ

2020-06-08 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset b155381314c632e7dd452fbade3903e58657cfc7 by Miss Islington (bot) 
in branch '3.9':
bpo-24914: mention Python supports multiple paradigms in the FAQ (GH-20658) 
(GH-20737)
https://github.com/python/cpython/commit/b155381314c632e7dd452fbade3903e58657cfc7


--

___
Python tracker 

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



[issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ

2020-06-08 Thread Brett Cannon


Change by Brett Cannon :


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



[issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ

2020-06-08 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 14073c509058f8efeb5ea7f7693bf84f410d24b7 by Miss Islington (bot) 
in branch '3.8':
bpo-24914: mention Python supports multiple paradigms in the FAQ (GH-20658) 
(GH-20738)
https://github.com/python/cpython/commit/14073c509058f8efeb5ea7f7693bf84f410d24b7


--

___
Python tracker 

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



[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-06-08 Thread Filipe Laíns

Change by Filipe Laíns :


--
pull_requests: +19947
pull_request: https://github.com/python/cpython/pull/20740

___
Python tracker 

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



[issue40913] time.sleep ignores errors on Windows

2020-06-08 Thread Steve Dower


New submission from Steve Dower :

In time.sleep on Windows, if the WaitForSingleObject call fails, the call 
returns success. It essentially looks like the timeout was 0.

Errors should be highly unlikely, as the event object is leaked (see 
issue40912), but if they _do_ occur, we should raise them.

--
components: Windows
messages: 371037
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: time.sleep ignores errors on Windows
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



[issue40912] _PyOS_SigintEvent is never closed on Windows

2020-06-08 Thread Steve Dower


New submission from Steve Dower :

Currently, it's just stored as global state in signalmodule.c and forgotten 
about. It probably needs to become module state, and the signal module needs 
better initialization/shutdown.

--
components: Windows
messages: 371036
nosy: eric.snow, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: _PyOS_SigintEvent is never closed on Windows
type: enhancement
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



[issue29782] Use __builtin_clzl for bits_in_digit if available

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue since PR 20739 was created.

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

___
Python tracker 

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



[issue40861] On Windows, liblzma is always built without optimization

2020-06-08 Thread Steve Dower


Change by Steve Dower :


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



[issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ

2020-06-08 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ

2020-06-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19945
pull_request: https://github.com/python/cpython/pull/20738

___
Python tracker 

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



[issue29782] Use __builtin_clzl for bits_in_digit if available

2020-06-08 Thread Niklas Fiekas


Change by Niklas Fiekas :


--
pull_requests: +19946
pull_request: https://github.com/python/cpython/pull/20739

___
Python tracker 

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



[issue24914] Python: Not just OO style but this is not mentioned on python.org or in FAQ

2020-06-08 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 3ab3475c42c8ee5580f4ea1aeda73ebc8e5d5478 by Brett Cannon in 
branch 'master':
bpo-24914: mention Python supports multiple paradigms in the FAQ (#20658)
https://github.com/python/cpython/commit/3ab3475c42c8ee5580f4ea1aeda73ebc8e5d5478


--

___
Python tracker 

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



[issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5edb83241f2ff899917e895092aca0216faf42d3 by Victor Stinner in 
branch 'master':
bpo-40854: PYTHONPLATLIBDIR env var added to 3.9 (GH-20735)
https://github.com/python/cpython/commit/5edb83241f2ff899917e895092aca0216faf42d3


--

___
Python tracker 

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



[issue40684] make install doesn't respect configure --with-platlibdir=lib64

2020-06-08 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var

2020-06-08 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19942
pull_request: https://github.com/python/cpython/pull/20735

___
Python tracker 

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



[issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 817506432dd1908cd154500ef18dc276b8dd7071 by Victor Stinner in 
branch '3.9':
bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var 
(GH-20605) (GH-20725)
https://github.com/python/cpython/commit/817506432dd1908cd154500ef18dc276b8dd7071


--

___
Python tracker 

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



[issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable

2020-06-08 Thread STINNER Victor


Change by STINNER Victor :


--
title: Python should expose command when invoked with -c -> Add sys.orig_argv: 
original command line arguments passed to the Python executable

___
Python tracker 

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



[issue23427] Python should expose command when invoked with -c

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

My implementation (PR 20729) is based on bpo-40910 change which added a private 
PyConfig._orig_argv member to fix Py_GetArgcArgv().

--

___
Python tracker 

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



[issue40910] Py_GetArgcArgv() is no longer exported by the C API

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, I fixed Python 3.9: Py_GetArgcArgv() function is exported again.

Let's continue the discussion in bpo-23427.

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



[issue23427] Python should expose command when invoked with -c

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

Example of sys.orig_argv usage to re-execute the Python process with different 
options:
---
import sys
import os
if not sys.flags.utf8_mode:
# Force UTF-8 mode
argv = sys.orig_argv.copy()
argv[1:1] = ["-X", "utf8"]
print(f"Re-execute to force UTF-8 mode! argv={argv}")
os.execv(argv[0], argv)

print(f"Everybody loves UTF-8! utf8_mode={sys.flags.utf8_mode}")
---

Example coming from discussions on the PEP 597 :-)

Output:
---
$ ./python force_utf8_mode.py 
Re-execute to force UTF-8 mode! argv=['./python', '-X', 'utf8', 
'force_utf8_mode.py']
Everybody loves UTF-8! utf8_mode=1
---

--

___
Python tracker 

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



[issue15577] Real argc and argv in embedded interpreter

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40910: "Py_GetArgcArgv() is no longer exported by the C API".

--

___
Python tracker 

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



[issue23427] Python should expose command when invoked with -c

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-15577 "Real argc and argv in embedded interpreter" as duplicate of 
this issue: my PR 20729 allows embedders to set PyConfig.orig_argv which 
becomes sys.orig_argv.

--

___
Python tracker 

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



[issue15577] Real argc and argv in embedded interpreter

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

I mark this issue as a duplicate of bpo-23427.

--
resolution: out of date -> duplicate
superseder:  -> Python should expose command when invoked with -c

___
Python tracker 

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



[issue23427] Python should expose command when invoked with -c

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

Many names have been proposed:

* sys.__argv__: https://bugs.python.org/issue14208#msg155002
* sys.argv_original: https://bugs.python.org/issue14208#msg155053
* sys.full_argv or sys.executable_argv: 
https://bugs.python.org/issue14208#msg155102
* sys.executable_argv: https://bugs.python.org/issue29857 (issue title)
* sys._executable_argv: https://bugs.python.org/issue29857#msg289938
* sys._configuration.raw_argv: https://bugs.python.org/issue14208#msg179845
* sys.raw_argv: https://bugs.python.org/issue14208#msg179852
* sys.raw_args: https://bugs.python.org/issue29857#msg289933
* sys._raw_argv: https://bugs.python.org/issue29857#msg289873
* sys.orig_arv: https://bugs.python.org/issue29857#msg289936

I chose "sys.orig_argv" attribute name with the documentation:

   The list of the original command line arguments passed
   to the Python executable.

--

___
Python tracker 

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



[issue40897] Inheriting from class that defines __new__ causes inspect.signature to always return (*args, **kwargs) for constructor

2020-06-08 Thread Guido van Rossum


Guido van Rossum  added the comment:

Changing the topic to not point fingers at Generic.

--
nosy:  -levkivskyi
title: Inheriting from Generic causes inspect.signature to always return 
(*args, **kwargs) for constructor (and all subclasses) -> Inheriting from class 
that defines __new__ causes inspect.signature to always return (*args, 
**kwargs) for constructor

___
Python tracker 

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



[issue27657] urlparse fails if the path is numeric

2020-06-08 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Hi All,

On the previous message.

> I plan to address that point raised in this issue and close this ticket.

My intention was to close the bug.

1) The Issue was originally a regression in 3.8, and 3.7, And this been be 
resolved.


The change introduced did alter the behavior, but it was actually the correct 
one as I wrote

"For 3.9. - I am ready to defend the patch even at the cost of the breaking of 
the parsing of undefined behavior.  We should keep it. The patch simplifies a 
lot of corner cases and fixes the reported bugs. We don't guarantee backward 
compatibility between major versions, so I assume users will be careful when 
relying upon this undefined behavior and will take corrective action on their 
side before upgrading to 3.9.

We want patch releases to be backward compatible. That was the
user-complaint."

I agree with Ned Deily, that there are plenty of corner cases with urlparse 
APIs (Ref: https://bugs.python.org/issue36338#msg355322) 

That making any change is difficult (especially if not caught by regression 
suite).

*And if we simplify the code, it will be welcome, and will help us continue 
with next changes* - This was the original motivation of this code acceptance 
(Here 
https://github.com/python/cpython/commit/5a88d50ff013a64fbdb25b877c87644a9034c969
 and https://bugs.python.org/issue27657#msg289557)

I was not very explicit on stance proposal previously, and assumed if anything 
else can be done. But No. I think, this behavior we want in Python3.9 (as 
discussed in the initial messages of this ticket).

I apologize, Michał that I missed responding to your question quickly.
I hope this clarifies the stance.

--
keywords:  -3.8regression, patch
priority: critical -> normal
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions:  -Python 3.10

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-06-08 Thread hai shi


Change by hai shi :


--
pull_requests: +19941
pull_request: https://github.com/python/cpython/pull/20732

___
Python tracker 

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



[issue23427] Python should expose command when invoked with -c

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-14208 "No way to recover original argv with python -m". For the 
specific case of `python -m`, the original argument has been available as 
`__main__.__spec__.name` since Python 3.4.

--

___
Python tracker 

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



[issue23427] Python should expose command when invoked with -c

2020-06-08 Thread Jakub Wilk


Change by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue40897] Inheriting from Generic causes inspect.signature to always return (*args, **kwargs) for constructor (and all subclasses)

2020-06-08 Thread Filipe Laíns

Change by Filipe Laíns :


--
nosy: +FFY00

___
Python tracker 

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



[issue40861] On Windows, liblzma is always built without optimization

2020-06-08 Thread miss-islington


miss-islington  added the comment:


New changeset 298c8c895f0d4fdd23a16f959efac83039fa1d19 by Miss Islington (bot) 
in branch '3.9':
bpo-40861: Enable optimizations when building liblzma (GH-20724)
https://github.com/python/cpython/commit/298c8c895f0d4fdd23a16f959efac83039fa1d19


--

___
Python tracker 

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



[issue23427] Python should expose command when invoked with -c

2020-06-08 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40908] datetime strftime with %Y and 2 digit years

2020-06-08 Thread Paul Ganssle


Paul Ganssle  added the comment:

This is a duplicate of bpo-13305 and is due to platform-specific 
implementations of %Y. On Linux, `strftime()` does not zero-pad to 4, and if 
you need to represent years <1000, you should use "%4Y" to zero-pad the output.

I think the ideal resolution would be a cross-platform implementation of 
strftime and strptime that does not rely on the system symbols, but that is a 
pretty large and overwhelming project.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> datetime.strftime("%Y") not consistent for years < 1000

___
Python tracker 

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



[issue40861] On Windows, liblzma is always built without optimization

2020-06-08 Thread miss-islington


miss-islington  added the comment:


New changeset 30513b62b936e3df8e4b6dd4d6b280a6b765 by Miss Islington (bot) 
in branch '3.8':
bpo-40861: Enable optimizations when building liblzma (GH-20724)
https://github.com/python/cpython/commit/30513b62b936e3df8e4b6dd4d6b280a6b765


--

___
Python tracker 

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



[issue40861] On Windows, liblzma is always built without optimization

2020-06-08 Thread miss-islington


miss-islington  added the comment:


New changeset 62e7f9ab55a6426708d5316da6f07d3fe220b53a by Miss Islington (bot) 
in branch '3.7':
bpo-40861: Enable optimizations when building liblzma (GH-20724)
https://github.com/python/cpython/commit/62e7f9ab55a6426708d5316da6f07d3fe220b53a


--

___
Python tracker 

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



[issue27657] urlparse fails if the path is numeric

2020-06-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

Michał, this change has been reverted in 3.7 and 3.8. Senthil says this needs 
further work in 3.9. Senthil, please prioritize this. We're already releasing 
3.9.0b2.

--

___
Python tracker 

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



[issue29857] Provide `sys.executable_argv` for host application's command line arguments

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

I mark this issue as a duplicate of bpo-23427 which has patch and is older.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Python should expose command when invoked with -c

___
Python tracker 

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



[issue23427] Python should expose command when invoked with -c

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-29857 as a duplicate of  this issue.

--

___
Python tracker 

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



[issue36457] functools.singledispatchmethod interacts poorly with subclasses

2020-06-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

The proposed fix requires using a required base class which I'd like to avoid.

--

___
Python tracker 

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



[issue40861] On Windows, liblzma is always built without optimization

2020-06-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19938
pull_request: https://github.com/python/cpython/pull/20727

___
Python tracker 

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



[issue40861] On Windows, liblzma is always built without optimization

2020-06-08 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue40861] On Windows, liblzma is always built without optimization

2020-06-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19939
pull_request: https://github.com/python/cpython/pull/20728

___
Python tracker 

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



[issue40861] On Windows, liblzma is always built without optimization

2020-06-08 Thread Steve Dower


Steve Dower  added the comment:


New changeset 3a3a30c5a4622e18be9f7e4a239dc9e0d7c8054c by Steve Dower in branch 
'master':
bpo-40861: Enable optimizations when building liblzma (GH-20724)
https://github.com/python/cpython/commit/3a3a30c5a4622e18be9f7e4a239dc9e0d7c8054c


--

___
Python tracker 

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



[issue35228] Index search in CHM help crashes viewer

2020-06-08 Thread Steve Dower


Steve Dower  added the comment:

We either need someone to contribute a fix to 
sphinxcontrib\htmlhelp\templates\project.hhp (bearing in mind that this *must* 
be optional, as it breaks search), or write code to patch the generated file 
between generation and use (which is probably hard).

And I'm not yet comfortable breaking search for it (as shown in the 
screenshot). I'd rather switch to distributing regular HTML files if there 
isn't a way to have both.

--

___
Python tracker 

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



[issue40910] Py_GetArgcArgv() is no longer exported by the C API

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset dedaac040fe5b0b88acdec072623bb39ec53687f by Victor Stinner in 
branch '3.9':
bpo-40910: Export Py_GetArgcArgv() function (GH-20721) (GH-20723)
https://github.com/python/cpython/commit/dedaac040fe5b0b88acdec072623bb39ec53687f


--

___
Python tracker 

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



[issue35885] configparser: indentation

2020-06-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for your contribution Ido Michael but I'm also -1 on the feature. .ini 
is an underspecified format and it's supposed to be interoperable between 
applications. Indenting keys sounds like a compatibility challenge.

--
resolution:  -> wont fix
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



[issue40910] Py_GetArgcArgv() is no longer exported by the C API

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

Py_GetArgcArgv() is not new at all. It exists since:

commit ac56b03f9a931423714ab3a0e8cfae78f81f9b85
Author: Guido van Rossum 
Date:   Sun Jul 21 02:33:38 1996 +

New style names for getprogramname and getargcargv


Previously, the function was known as getargcargv() and it existed since:

commit 7b1e974b4bd7c17cd90a6d03bab0aaa079d78d29
Author: Guido van Rossum 
Date:   Mon Aug 29 10:46:42 1994 +

Makefile.pre.in: add $(OPT) to link command
audioop.c: fix for MPW
config.c.in: save original argc/argv for Lance
rotormodule.c: new coding conventions
timemodule.c: add casts for Lance

+void
+getargcargv(argc,argv)
+   int *argc;
+   char ***argv;
+{
+   *argc = orig_argc;
+   *argv = orig_argv;
+}
+

--

___
Python tracker 

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



[issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

Oh, it seems like one of the changes merged in this issue broke the following 
use case if platlibdir is different than "lib":

export PYTHONHOME=
export PYTHONPATH=/lib/python3.9
python3.9

See bpo-40854 "Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var".

--

___
Python tracker 

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



[issue40854] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var

2020-06-08 Thread STINNER Victor


Change by STINNER Victor :


--
title: [Patch] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var -> 
Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var

___
Python tracker 

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



[issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE

2020-06-08 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19936
pull_request: https://github.com/python/cpython/pull/20725

___
Python tracker 

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



[issue40854] [Patch] Allow overriding sys.platlibdir

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-1294959 added sys.platlibdir and configure --with-platlibdir to use 
/usr/lib64 on Fedora and SuSE to Python 3.9.

The problem is that msg370655 use case seems to be a regression compared to 
Python 3.9. I now consider to backport the commit 
8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae to 3.9 since it looks like a fix part 
of bpo-1294959 rather than a bug fix.

I created PR 20725 to backport PyConfig.platlibdir and PYTHONPLATLIBDIR env var 
to Python 3.9.

--

___
Python tracker 

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



[issue40854] [Patch] Allow overriding sys.platlibdir: add PYTHONPLATLIBDIR env var

2020-06-08 Thread STINNER Victor


Change by STINNER Victor :


--
title: [Patch] Allow overriding sys.platlibdir -> [Patch] Allow overriding 
sys.platlibdir: add PYTHONPLATLIBDIR env var

___
Python tracker 

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



[issue40854] [Patch] Allow overriding sys.platlibdir

2020-06-08 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19935
pull_request: https://github.com/python/cpython/pull/20725

___
Python tracker 

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



[issue40861] On Windows, liblzma is always built without optimization

2020-06-08 Thread Steve Dower


Change by Steve Dower :


--
assignee:  -> steve.dower

___
Python tracker 

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



[issue40861] On Windows, liblzma is always built without optimization

2020-06-08 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue40910] Py_GetArgcArgv() is no longer exported by the C API

2020-06-08 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19933
pull_request: https://github.com/python/cpython/pull/20723

___
Python tracker 

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



[issue40910] Py_GetArgcArgv() is no longer exported by the C API

2020-06-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e81f6e687d0f04a45f2389d0b43fafd6d8491624 by Victor Stinner in 
branch 'master':
bpo-40910: Export Py_GetArgcArgv() function (GH-20721)
https://github.com/python/cpython/commit/e81f6e687d0f04a45f2389d0b43fafd6d8491624


--

___
Python tracker 

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



[issue40065] py39: remove deprecation note for xml.etree.cElementTree

2020-06-08 Thread Tal Einat


Tal Einat  added the comment:

Ah, thanks for the update Christian, I must have misunderstood your intentions.

So should the deprecation note be removed in the "master" branch for 3.10?

--

___
Python tracker 

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



  1   2   >