[issue42037] Documentation confusion in CookieJar functions

2020-10-21 Thread Markus Israelsson


Markus Israelsson  added the comment:

Sure.

But I will need to get an ok from my company to spend some time on this because 
I really am not very used to git yet (recently switched).

Also, is it possible to make the request/changes through the company github 
account or must that in that case be tied directly to this bug report account?

--

___
Python tracker 

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



[issue42037] Documentation confusion in CookieJar functions

2020-10-21 Thread Markus Israelsson


Markus Israelsson  added the comment:

I guess due to something having to be signed I would have to create a personal 
github account :/

--

___
Python tracker 

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



[issue41316] tarfile: Do not write full path in FNAME field

2020-10-21 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.5, 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



[issue42037] Documentation confusion in CookieJar functions

2020-10-21 Thread Markus Israelsson


Markus Israelsson  added the comment:

I got ok from the higherups.
Will plan this into next sprint so it will take a week or 2 before I get to it.

--

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-10-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21798
pull_request: https://github.com/python/cpython/pull/22854

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-10-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21797
pull_request: https://github.com/python/cpython/pull/22853

___
Python tracker 

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



[issue41819] Fix some compiler warnings

2020-10-21 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset c756c2b507b088919ac0c1aa8b0d8c8bdbdd75ee by Miss Skeleton (bot) 
in branch '3.8':
bpo-41819: Fix compiler warning in init_dump_ascii_wstr() (GH-22332)
https://github.com/python/cpython/commit/c756c2b507b088919ac0c1aa8b0d8c8bdbdd75ee


--
nosy: +methane

___
Python tracker 

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



[issue41819] Fix some compiler warnings

2020-10-21 Thread Inada Naoki


Change by Inada Naoki :


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

___
Python tracker 

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



[issue42105] allow_abbrev not working as intended in "argparse.ArgumentParser" in Python 3.9.0

2020-10-21 Thread Ganesh Kumar


New submission from Ganesh Kumar :

the "allow_abbrev" in "argparse.ArgumentParser" behavior does not work as 
intended in python 3.9.0

$ python3 --version
Python 3.5.3
$ python3 mcve.py -S
$ python3 mcve.py -SS
usage: mcve.py [-h] [-S]
mcve.py: error: unrecognized arguments: -SS

$ python3.9 --version
Python 3.9.0
$ python3.9 mcve.py -S
$ python3.9 mcve.py -SS # no erros raised here
$

Have attached a sample file to check this

--
components: Library (Lib)
files: mcve.py
messages: 379202
nosy: Rin
priority: normal
severity: normal
status: open
title: allow_abbrev not working as intended in "argparse.ArgumentParser" in 
Python 3.9.0
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file49533/mcve.py

___
Python tracker 

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



[issue42106] docs.python.org prioritises search horribly

2020-10-21 Thread Xavier Morel


New submission from Xavier Morel :

I expect it simply uses sphinx and I don't know if sphinx's search is easily 
customisable but the experience is really terrible when looking for the doc of 
a specific thing, *especially* when that thing is or is related to a builtin, 
which I'd expect to be extremely common. Though I expect part of the issue 
might also be that builtin or ABC methods are not documented *as such*, they're 
just written as code in tables.

For instance if you search "append": 
https://docs.python.org/3/search.html?q=append

On my end, neither list nor MutableSequence appear anywhere on this page, even 
scrolling down.

Searching for "list": https://docs.python.org/3/search.html?q=list

The documentation for the builtin "list" object also doesn't appear on the 
page. "Data Structures"[0] and "built-in types"[1] appear below the fold and 
the former is genuinely useful but also very easy to miss (I had not actually 
noticed it before going back in order to get the various links and try to 
extensively describe the issue). Neither actually links to the `list` builtin 
type though.

Above the fold we find various "list" methods and classes from the stdlib as 
well as the PDB `list` comment, none of which seems like the best match for the 
query.

And even Google doesn't help much there, most of the hits are for third-party 
documentation, and the one docs.python.org link is to the Data Structures page 
*of Python 2.7*.

[0] https://docs.python.org/3/tutorial/datastructures.html?highlight=list
[1] https://docs.python.org/3/library/stdtypes.html?highlight=list

--
assignee: docs@python
components: Documentation
messages: 379203
nosy: docs@python, xmorel
priority: normal
severity: normal
status: open
title: docs.python.org prioritises search horribly
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue42107] Monotonic time on macOS 10.12+ should use mach_continuous_time()

2020-10-21 Thread Seth Junot


New submission from Seth Junot :

This blog post describes an issue with Apple's "CLOCK_UPTIME_RAW" where the 
clock is reset after a system that hibernates:

https://rachelbythebay.com/w/2020/10/20/ticktock/

According to Apple's documentation, CLOCK_UPTIME_RAW corresponds to 
mach_absolute_time():

https://developer.apple.com/documentation/kernel/1462446-mach_absolute_time

CPython is using mach_absolute_time() for its time.monotonic() implementation:

https://github.com/python/cpython/blob/f660567/Python/pytime.c#L7

time.monotonic() ought to be backed by the more appropriate 
mach_continuous_time() ("CLOCK_MONOTONIC_RAW"). Note it was introduced in macOS 
10.12+:

https://developer.apple.com/documentation/kernel/1646199-mach_continuous_time

--
components: macOS
messages: 379204
nosy: ned.deily, ronaldoussoren, sjunot
priority: normal
severity: normal
status: open
title: Monotonic time on macOS 10.12+ should use mach_continuous_time()
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue39116] StreamReader.readexactly() raises GeneratorExit on ProactorEventLoop

2020-10-21 Thread twisteroid ambassador


twisteroid ambassador  added the comment:

Well this is unexpected, the same code running on Linux is throwing 
GeneratorExit-related mysterious exceptions as well. I'm not sure whether this 
is the same problem, but this one has a clearer traceback. I will attach the 
full error log, but the most pertinent part seems to be this:


During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.8/contextlib.py", line 662, in __aexit__
cb_suppress = await cb(*exc_details)
  File "/usr/lib/python3.8/contextlib.py", line 189, in __aexit__
await self.gen.athrow(typ, value, traceback)
  File "/opt/prettysocks/prettysocks.py", line 332, in closing_writer
await writer.wait_closed()
  File "/usr/lib/python3.8/asyncio/streams.py", line 376, in wait_closed
await self._protocol._get_close_waiter(self)
RuntimeError: cannot reuse already awaited coroutine


closing_writer() is an async context manager that calls close() and await 
wait_closed() on the given StreamWriter. So it looks like wait_closed() can 
occasionally reuse a coroutine?

--
Added file: https://bugs.python.org/file49534/error_log_on_linux_python38.txt

___
Python tracker 

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



[issue41100] Build failure on macOS 11 (beta)

2020-10-21 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
pull_requests: +21799
pull_request: https://github.com/python/cpython/pull/22855

___
Python tracker 

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



[issue42105] allow_abbrev not working as intended in "argparse.ArgumentParser" in Python 3.9.0

2020-10-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +paul.j3, rhettinger

___
Python tracker 

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



[issue42106] docs.python.org prioritises search horribly

2020-10-21 Thread Inada Naoki


Inada Naoki  added the comment:

Can we add search box using DuckDuckGo?
https://duckduckgo.com/?q=site%3Adocs.python.org%2F3%2F+list+append

--
nosy: +methane

___
Python tracker 

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



[issue42106] docs.python.org prioritises search horribly

2020-10-21 Thread Xavier Morel


Xavier Morel  added the comment:

Apparently it's at least a possibility on DDG's side 
(https://duckduckgo.com/search_box), don't know how easy it'd be to integrate 
in sphinx, or whether a hard dependency on an external search engine is 
acceptable / desirable.

--

___
Python tracker 

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



[issue41747] dataclasses: generated method's using the wrong qualname

2020-10-21 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset c7437e2c0216e05fbf17bf96294cb20954e36e48 by Batuhan Taskaya in 
branch 'master':
bpo-41747: Ensure all dataclass methods uses their parents' qualname (GH-22155)
https://github.com/python/cpython/commit/c7437e2c0216e05fbf17bf96294cb20954e36e48


--

___
Python tracker 

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



[issue41747] dataclasses: generated method's using the wrong qualname

2020-10-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks for the PR!

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



[issue15125] argparse: positional arguments containing - in name not handled well

2020-10-21 Thread Socob


Change by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2020-10-21 Thread Socob


Change by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue42108] HTTPSConnection hangs forever when the percentage completed of the upload drops from 100 to 0

2020-10-21 Thread Mickaël Schoentgen

New submission from Mickaël Schoentgen :

I will try to summarize my findings. I do not think having real data is 
revelant here, it seems to be a behavior issue.

I was originally using the `requests` module to `POST` some small data. The 
server will then do its stuff and it would take about 5 minutes to really 
complete. But for some reason, that call never ends.

I tried to isolate the "bad" code and tried more specific code: I reproduced 
the issue with `urllib3`, and then with `http.client.HTTPSConnection()`. I did 
not manage to go lower than that, but I may be able to try some C code with 
some help.

After having traced the script using `http.client.HTTPSConnection()`, the code 
is blocked at the `count = SSL_read(self->ssl, mem, len);` call [1].

This is it for the Python side.


Then, I translated the HTTP request to a cURL command (using the same machine, 
with the same headers and `POST` data). Surprisingly, atfer ~5 minutes, the 
call ended successfully.

Here is the verbose output of cURL:

  100   1040 0  100   104  0217 --:--:-- --:--:-- --:--:--   216
  100   1040 0  100   104  0 70  0:00:01  0:00:01 --:--:--70
  100   1040 0  100   104  0 41  0:00:02  0:00:02 --:--:--41
  100   1040 0  100   104  0 29  0:00:03  0:00:03 --:--:--29
  100   1040 0  100   104  0 23  0:00:04  0:00:04 --:--:--23
  100   1040 0  100   104  0 18  0:00:05  0:00:05 --:--:-- 0
  100   1040 0  100   104  0 15  0:00:06  0:00:06 --:--:-- 0
  100   1040 0  100   104  0 13  0:00:08  0:00:07  0:00:01 0
  100   1040 0  100   104  0 12  0:00:08  0:00:08 --:--:-- 0
  100   1040 0  100   104  0 10  0:00:10  0:00:09  0:00:01 0
  100   1040 0  100   104  0  9  0:00:11  0:00:10  0:00:01 0
  100   1040 0  100   104  0  9  0:00:11  0:00:11 --:--:-- 0
  100   1040 0  100   104  0  8  0:00:13  0:00:12  0:00:01 0
  100   1040 0  100   104  0  7  0:00:14  0:00:13  0:00:01 0
  100   1040 0  100   104  0  7  0:00:14  0:00:14 --:--:-- 0
  100   1040 0  100   104  0  6  0:00:17  0:00:15  0:00:02 0
  100   1040 0  100   104  0  6  0:00:17  0:00:16  0:00:01 0
  100   1040 0  100   104  0  5  0:00:20  0:00:17  0:00:03 0
  100   1040 0  100   104  0  5  0:00:20  0:00:18  0:00:02 0
  100   1040 0  100   104  0  5  0:00:20  0:00:19  0:00:01 0
  100   1040 0  100   104  0  5  0:00:20  0:00:20 --:--:-- 0
  100   1040 0  100   104  0  4  0:00:26  0:00:21  0:00:05 0
  100   1040 0  100   104  0  4  0:00:26  0:00:22  0:00:04 0
  100   1040 0  100   104  0  4  0:00:26  0:00:23  0:00:03 0
  100   1040 0  100   104  0  4  0:00:26  0:00:24  0:00:02 0
  100   1040 0  100   104  0  4  0:00:26  0:00:25  0:00:01 0
  100   1040 0  100   104  0  3  0:00:34  0:00:26  0:00:08 0
  100   1040 0  100   104  0  3  0:00:34  0:00:27  0:00:07 0
  100   1040 0  100   104  0  3  0:00:34  0:00:28  0:00:06 0
  100   1040 0  100   104  0  3  0:00:34  0:00:29  0:00:05 0
  100   1040 0  100   104  0  3  0:00:34  0:00:30  0:00:04 0
  100   1040 0  100   104  0  3  0:00:34  0:00:31  0:00:03 0
  100   1040 0  100   104  0  3  0:00:34  0:00:32  0:00:02 0
  100   1040 0  100   104  0  3  0:00:34  0:00:33  0:00:01 0
  100   1040 0  100   104  0  3  0:00:34  0:00:34 --:--:-- 0
  100   1040 0  100   104  0  2  0:00:52  0:00:35  0:00:17 0
  100   1040 0  100   104  0  2  0:00:52  0:00:36  0:00:16 0
  100   1040 0  100   104  0  2  0:00:52  0:00:37  0:00:15 0
  100   1040 0  100   104  0  2  0:00:52  0:00:38  0:00:14 0
  100   1040 0  100   104  0  2  0:00:52  0:00:39  0:00:13 0
  100   1040 0  100   104  0  2  0:00:52  0:00:40  0:00:12 0
  100   1040 0  100   104  0  2  0:00:52  0:00:41  0:00:11 0
  100   1040 0  100   104  0  2  0:00:52  0:00:42  0:00:10 0
  100   1040 0  100   104  0  2  0:00:52  0:00:43  0:00:09 0
  100   1040 0  100   104  0  2  0:00:52  0:00:44  0:00:08 0
  100   1040 0  100   104  0  2  0:00:52  0:00:45  0:00:07 0
  100   1040 0  100   104  0  2  0:00:52  0:00:46  0:00:06 0
  100   1040 0  100   104  0  2  0:00:52  0:00:47  0:00:05 0
  100   1040 0  100   104  0  2  0:00:52  0:00:48  0:00:04 0
  100   

[issue41906] logging.config.dictConfig does not work with callable filters

2020-10-21 Thread lorb


lorb  added the comment:

I looked into implementing this and it's not entirely clear how it could work. 
The main issue I encountered is how to distinguish between a callable that is a 
factory that takes one argument and a callable that is a filter.

One possible approach I see is to rely on the absence of any other keys in the 
configuration sub-directory. Not entirely happy with that (and have to think 
how to treat factory with optional parameter vs filter with optional parameter).
So this would be assumed to be a filter, if inspection reveals that fltr takes 
an argument:
'myfilter': {
'()': fltr,
}
while this would be assumed to be a factory:
'myfilter': {
'()': fctry,
'bar': 'baz',
}

A different approach that I think would be not optimal is to just call the 
callable with a dummy LogRecord passed ind and see if it returns a boolean or 
callable (or throws).

--
nosy: +lorb

___
Python tracker 

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



[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2020-10-21 Thread Blaze Spinnaker


Blaze Spinnaker  added the comment:

I know this issue is closed, but can you folks review:

https://github.com/ipython/ipykernel/issues/548#issuecomment-713637954

The nest_asyncio patch is becoming a defacto contract to fixing this amongst a 
lot of people.  But the patch doesn't really event work (IMHO).

It would be ideal to address this in a more central manner, either with change 
of code, better errors, more clear APIs, better documentation, etc.   Lots of 
options, but hopefully it will be addressed.

--
nosy: +blazespinnaker

___
Python tracker 

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



[issue31922] Can't receive replies from multicast UDP with asyncio

2020-10-21 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue37840] bytearray_getitem() handles negative index incorrectly

2020-10-21 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue33394] the build of the shared modules is quiet/non-visible when GNU make gets passed macros

2020-10-21 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue29745] asyncio: Make pause/resume_reading idepotent and no-op for closed transports

2020-10-21 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
superseder:  -> asyncio: Make transport.pause_reading()/resume_reading() 
idempotent; add transport.is_reading()

___
Python tracker 

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



[issue42105] allow_abbrev not working as intended in "argparse.ArgumentParser" in Python 3.9.0

2020-10-21 Thread paul j3


paul j3  added the comment:

argparse : allow_abbrev behavior between 3.7 and 3.8
https://bugs.python.org/issue41534

covers this issue well enough.  That latest change to `allow_abbrev` was 
prompted by:

argparse: allow_abbrev=False stops -vv from working
https://bugs.python.org/issue26967

You also raised this issue on StackOverFlow.  That may be a better place to 
discuss this.

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



[issue39524] Escape sequences in doc string of ast._pad_whitespace

2020-10-21 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +21800
pull_request: https://github.com/python/cpython/pull/22857

___
Python tracker 

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



[issue41052] Opt out serialization/deserialization for heap type

2020-10-21 Thread Dong-hee Na


Dong-hee Na  added the comment:

> It would be better to fix copyreg._reduce_ex() instead of disabling pickling 
> for these types one by one

I agree :)

--

___
Python tracker 

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



[issue38439] Python needs higher resolution app/menu icons

2020-10-21 Thread miss-islington


miss-islington  added the comment:


New changeset 871c6ccf4a883fbc05410284b21e6d668b832f2c by Miss Skeleton (bot) 
in branch '3.9':
bpo-38439: Add 256px IDLE icon to the .ico, drop gifs from it (GH-19648)
https://github.com/python/cpython/commit/871c6ccf4a883fbc05410284b21e6d668b832f2c


--

___
Python tracker 

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



[issue38439] Python needs higher resolution app/menu icons

2020-10-21 Thread Steve Dower


Steve Dower  added the comment:

This seems complete to me, but feel free to reopen if it is not.

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

___
Python tracker 

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



[issue39524] Escape sequences in doc string of ast._pad_whitespace

2020-10-21 Thread miss-islington


miss-islington  added the comment:


New changeset f3982d666c1df290373a4810edd501b2176b45c7 by Irit Katriel in 
branch '3.8':
[3.8] bpo-39524: Fixed doc-string in ast._pad_whitespace (GH-18340) (GH-22857)
https://github.com/python/cpython/commit/f3982d666c1df290373a4810edd501b2176b45c7


--
nosy: +miss-islington

___
Python tracker 

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



[issue39524] Escape sequences in doc string of ast._pad_whitespace

2020-10-21 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue40747] sysconfig.get_config_var("py_version_nodot") should return 3_10

2020-10-21 Thread Steve Dower


Change by Steve Dower :


--
nosy: +steve.dower
nosy_count: 4.0 -> 5.0
pull_requests: +21801
pull_request: https://github.com/python/cpython/pull/22858

___
Python tracker 

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



[issue40592] `Shutil.which` incosistent with windows's `where`

2020-10-21 Thread Christopher Marchfelder


Christopher Marchfelder  added the comment:

@steve.dower Added the changes in the PR - could you please re-check? Thank you!

--

___
Python tracker 

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



[issue31432] Documention for CERT_OPTIONAL is misleading

2020-10-21 Thread Christian Heimes


Change by Christian Heimes :


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



[issue26835] Add file-sealing ops to fcntl

2020-10-21 Thread Christian Heimes


Change by Christian Heimes :


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



[issue32549] Travis: Test with OpenSSL 1.1.0

2020-10-21 Thread Christian Heimes


Change by Christian Heimes :


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



[issue28022] SSL releated deprecation for 3.6

2020-10-21 Thread Christian Heimes


Change by Christian Heimes :


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



[issue34915] LWPCookieJar.save() creates *.lwp file in 644 mode

2020-10-21 Thread Christian Heimes


Change by Christian Heimes :


--
assignee: christian.heimes -> 
nosy:  -christian.heimes
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5

___
Python tracker 

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



[issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes

2020-10-21 Thread Christian Heimes


Change by Christian Heimes :


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



[issue35324] ssl: FileNotFoundError when do handshake

2020-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

I'm not able to reproduce the issue. Please re-open this issue if you are still 
having issue with more recent version of Python and OpenSSL.

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



[issue35749] Rewrite asyncio signal handler

2020-10-21 Thread Alan Jenkins


Alan Jenkins  added the comment:

Here's a simple test case that fails on the main branch.

https://github.com/sourcejedi/cpython/commit/50184ea3b354fd775866d036ccee058ec6734927

> the patch assumes that python signal handler will be called *before* reading 
> from self-pipe. 
> Otherwise, a signal callback will be postponed up to next writing to the 
> pipe, which looks like a hidden bug.

I think it will be?  I can imagine it being a concern for future changes 
though.  I thought it could break if anyone takes seriously the comment "XXX 
Signals should be recorded per thread, now we have thread state." :-).

But if we're not confident, surely all we have to do is make sure to call 
_write_to_self() at the end of the python signal handler 
(_UnixSelectorEventLoop._sig_handler()).

It seems a pity not to have example code we can point to, that handles signals 
correctly.  Even if it's too tedious to explain the correct way in the official 
docs.

--
nosy: +sourcejedi

___
Python tracker 

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



[issue37553] SendfileUsingSendTest tests timeout too short for Windows ARM32

2020-10-21 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

2020-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

This seems to be an asyncio problem.

--
assignee: christian.heimes -> 

___
Python tracker 

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



[issue37048] ssl module: QUIC support for HTTP/3

2020-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

OpenSSL 3.0.0 is not going support QUIC, 
https://www.openssl.org/blog/blog/2020/02/17/QUIC-and-OpenSSL/

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



[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2020-10-21 Thread Christian Heimes


Change by Christian Heimes :


--
assignee: christian.heimes -> 
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



[issue41061] Incorrect expressions / assert with side effect in hashtable

2020-10-21 Thread Christian Heimes


Change by Christian Heimes :


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



[issue41052] Opt out serialization/deserialization for heap type

2020-10-21 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

At some point, pickle protocols 0 and 1 should be deprecated and slated for 
removal.  Protocol 2 is 17 years ago already, and protocol 3 has become the 
default in Python 3.

That would probably be a better use of contributor time than trying to make 
heap types compatible with those obsolete protocols.

--
nosy: +pitrou

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-10-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21802
pull_request: https://github.com/python/cpython/pull/22860

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-10-21 Thread miss-islington


miss-islington  added the comment:


New changeset c60394c7fc9cc09b16e9675a3eeb5844b6d8523f by kpinc in branch 
'master':
bpo-39416: Document some restrictions on the default string representations of 
numeric classes (GH-18111)
https://github.com/python/cpython/commit/c60394c7fc9cc09b16e9675a3eeb5844b6d8523f


--
nosy: +miss-islington

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-10-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21803
pull_request: https://github.com/python/cpython/pull/22861

___
Python tracker 

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



[issue42097] Python 3.7.9 logging/threading/fork hang

2020-10-21 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Victor is on vacation for some weeks, so I am creating a PR to push this 
forward.

--

___
Python tracker 

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



[issue42109] Use hypothesis for testing the standard library, falling back to stubs

2020-10-21 Thread Paul Ganssle


New submission from Paul Ganssle :

Following up on this year's language summit, I would like to propose that we 
start integrating property tests into the standard library. Zac Hatfield-Dodds 
(along with myself and Carl Friedrich Bolz-Tereick) have put together this 
repository of tests that we run against the standard library as is: 
https://github.com/Zac-HD/stdlib-property-tests

Here is the blog post covering the proposal from the language summit: 
https://pyfound.blogspot.com/2020/05/property-based-testing-for-python.html

The biggest challenges here are logistical:

1. Pulling in third party dependencies is difficult to do reliably on CI, but 
checking in hypothesis's entire dependency tree is probably not feasible.
2. We don't necessarily want to require developers running their tests locally 
to have to set up a hypothesis environment just to run the tests.
3. Hypothesis tests are not (by default) deterministic, which some are 
concerned may lead to flakiness by themselves.


To allay these concerns, I propose that we implement a compatibility interface 
for hypothesis that uses the third party module when it's installed, but 
otherwise falls back to stubs. The way I see the stubs working is that `@given` 
*without* `@example`s would simply skip the test. If you specify `@given` and 
one or more `@example`s, the test falls back to a simple parameterized test 
when hypothesis is not available.

At least at first, we won't attempt to add a mandatory PR job that runs with 
hypothesis installed. Instead, I'd like to run either an optional job on PR or 
have one or more buildbots that runs the hypothesis tests.

I would also like to suggest a policy of including at least one example in each 
property test, so that on PR at least some of the inputs are tested.

--
assignee: p-ganssle
components: Tests
messages: 379226
nosy: Zac Hatfield-Dodds, p-ganssle, terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: Use hypothesis for testing the standard library, falling back to stubs
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue42109] Use hypothesis for testing the standard library, falling back to stubs

2020-10-21 Thread Paul Ganssle


Change by Paul Ganssle :


--
keywords: +patch
pull_requests: +21805
pull_request: https://github.com/python/cpython/pull/22863

___
Python tracker 

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



[issue42107] Monotonic time on macOS 10.12+ should use mach_continuous_time()

2020-10-21 Thread Ned Deily


Change by Ned Deily :


--
nosy: +vstinner

___
Python tracker 

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



[issue35181] Doc: Namespace Packages: Inconsistent documentation of __loader__ being None

2020-10-21 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

Apologies for the long delay in reviewing this bug.  I'm looking at it now, 
however since Python 3.7 is in security-only mode, this will only apply to 
3.10, 3.9, and 3.8.

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

___
Python tracker 

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



[issue19438] Where is NoneType in Python 3?

2020-10-21 Thread Andrés Delfino

Andrés Delfino  added the comment:

As per https://github.com/python/cpython/pull/22336 I believe this issue can be 
closed now.

My PR is not relevant to the problem stated by OP, so I'm "unlinking" it.

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



[issue42110] race condition in ThreadChildWatcher (default) and MultiLoopChildWatcher

2020-10-21 Thread Alan Jenkins


New submission from Alan Jenkins :

## Test program ##

import asyncio
import time
import os
import signal
import sys

# This bug happens with the default, ThreadedChildWatcher
# It also happens with MultiLoopChildWatcher,
# but not the other three watcher types.
#asyncio.set_child_watcher(asyncio.MultiLoopChildWatcher())

# Patch os.kill to call sleep(1) first,
# opening up the window for a race condition
os_kill = os.kill
def kill(p, n):
time.sleep(1)
os_kill(p, n)

os.kill = kill

async def main():
p = await asyncio.create_subprocess_exec(sys.executable, '-c', 'import sys; 
sys.exit(0)')
p.send_signal(signal.SIGTERM)
# cleanup
await p.wait()

asyncio.run(main())


## Test output ##

Traceback (most recent call last):
  File "", line 1, in 
  File "/home/alan-sysop/src/cpython/Lib/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
  File "/home/alan-sysop/src/cpython/Lib/asyncio/base_events.py", line 642, in 
run_until_complete
return future.result()
  File "", line 3, in main
  File "/home/alan-sysop/src/cpython/Lib/asyncio/subprocess.py", line 138, in 
send_signal
self._transport.send_signal(signal)
  File "/home/alan-sysop/src/cpython/Lib/asyncio/base_subprocess.py", line 146, 
in send_signal
self._proc.send_signal(signal)
  File "/home/alan-sysop/src/cpython/Lib/subprocess.py", line 2081, in 
send_signal
os.kill(self.pid, sig)
  File "", line 3, in kill
ProcessLookupError: [Errno 3] No such process


## Tested versions ##

* v3.10.0a1-121-gc60394c7fc
* python39-3.9.0-1.fc32.x86_64
* python3-3.8.6-1.fc32.x86_64


## Race condition ##

main thread vs  ThreadedChildWatcher._do_waitpid() thread

p=create_subprocess_exec(...)
waitpid(...)  # wait for process exit


p.send_signal(9)


## Result ##

A signal is sent to p.pid, after p.pid has been reaped by waitpid().  It might 
raise an error because p.pid no longer exists.

In the worst case the signal will be sent successfully - because an unrelated 
process has started with the same PID.


## How easy is it to reproduce? ##

It turns out the window for this race condition has been kept short, due to 
mitigations in the subprocess module.  IIUC, the mitigation protects against 
incorrect parallel use of a subprocess object by multiple threads.

def send_signal(self, sig):
# bpo-38630: Polling reduces the risk of sending a signal to the
# wrong process if the process completed, the Popen.returncode
# attribute is still None, and the pid has been reassigned
# (recycled) to a new different process. This race condition can
# happens in two cases [...]
self.poll()
if self.returncode is not None:
# Skip signalling a process that we know has already died.
return
os.kill(self.pid, sig)




## Possible workarounds ##

* SafeChildWatcher and FastChildWatcher should not have this defect.  However 
we use ThreadedChildWatcher and MultiLoopChildWatcher to support running event 
loops in different threads.

* PidfdChildWatcher should not have this defect.  It is only available on 
Linux, kernel version 5.3 or above.

It would be possible to avoid the ThreadedChildWatcher race by using native 
code and pthread_cancel(), so that the corresponding waitpid() call is canceled 
before sending a signal.  Except the current implementation of pthread_cancel() 
is also unsound, because of race conditions.

* https://lwn.net/Articles/683118/ "This is why we can't have safe cancellation 
points"
* https://sourceware.org/bugzilla/show_bug.cgi?id=12683 "Race conditions in 
pthread cancellation"

--
components: asyncio
messages: 379229
nosy: asvetlov, sourcejedi, yselivanov
priority: normal
severity: normal
status: open
title: race condition in ThreadChildWatcher (default) and MultiLoopChildWatcher
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



[issue41100] Build failure on macOS 11 (beta)

2020-10-21 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

https://github.com/python/cpython/pull/22855 is currently the most complete PR, 
and should be almost ready for merging (although there hasn't been any code 
review at this point).

--

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-10-21 Thread miss-islington


miss-islington  added the comment:


New changeset 89fac4c3748aa7eb23d09922331e90a62ce782fd by Miss Skeleton (bot) 
in branch '3.8':
[3.8] bpo-39416: Document some restrictions on the default string 
representations of numeric classes (GH-18111) (GH-22861)
https://github.com/python/cpython/commit/89fac4c3748aa7eb23d09922331e90a62ce782fd


--

___
Python tracker 

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



[issue42107] Monotonic time on macOS 10.12+ should use mach_continuous_time()

2020-10-21 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

See also #41303, which discusses using mach_continuous_time in another context.

If using a different clock is necessary I'd prefer to use 
clock_gettime(CLOCK_MONOTONIC_RAW) instead of mach_continuous_time(), as the 
former is a more cross-platform API.

BTW. Please hold off from merging a patch for this until the macOS 11 support 
code in #41100 is in, this is bound to cause a merge conflict otherwise.

--

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-10-21 Thread miss-islington


miss-islington  added the comment:


New changeset ec62b47ebc8f29007942c8e9f3f260af91ca58cb by Miss Skeleton (bot) 
in branch '3.9':
[3.9] bpo-39416: Document some restrictions on the default string 
representations of numeric classes (GH-18111) (GH-22860)
https://github.com/python/cpython/commit/ec62b47ebc8f29007942c8e9f3f260af91ca58cb


--

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the patch!

--
nosy: +eric.araujo
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue42025] zoneinfo: wrong time difference across transition when tzinfo is equal

2020-10-21 Thread Paul Ganssle

Paul Ganssle  added the comment:

Yeah, people are very confused by this, which is why I wrote that article.

Maybe there is a place for big warnings somewhere? I have been mulling over the 
possibility of proposing a backwards-incompatible (though minimally so, 
hopefully) change to arithmetic semantics that would work well with how people 
think this should work, but I think any such backwards-incompatible change 
would be a Big Deal™, and unfortunately quite hard to warn about with a proper 
deprecation period.

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

___
Python tracker 

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



[issue37048] ssl module: QUIC support for HTTP/3

2020-10-21 Thread Jeremy Lainé

Jeremy Lainé  added the comment:

The OpenSSL authors make a fair point, QUIC seems to be taking a long time to 
stabilize with little consideration for backwards compatibility at this stage.

As stated previously though it's perfectly feasible to implement a QUIC stack 
by linking to an unpatched OpenSSL if you're willing to implement a 
stripped-down TLS 1.3 engine yourself.

--

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-10-21 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +21806
pull_request: https://github.com/python/cpython/pull/22864

___
Python tracker 

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



[issue41959] Doc/library/asyncio-policy.rst grammar error

2020-10-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21808
pull_request: https://github.com/python/cpython/pull/22866

___
Python tracker 

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



[issue41959] Doc/library/asyncio-policy.rst grammar error

2020-10-21 Thread miss-islington

miss-islington  added the comment:


New changeset caff2934f46510920a6169e192707d59e9c55f6b by Raúl Cumplido in 
branch 'master':
bpo-41959: Fix grammar around class asyncio.MultiLoopChildWatcher text 
(GH-22580)
https://github.com/python/cpython/commit/caff2934f46510920a6169e192707d59e9c55f6b


--
nosy: +miss-islington

___
Python tracker 

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



[issue41959] Doc/library/asyncio-policy.rst grammar error

2020-10-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21807
pull_request: https://github.com/python/cpython/pull/22865

___
Python tracker 

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



[issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format

2020-10-21 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Thanks for the report. I can reproduce the issue.

--

___
Python tracker 

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



[issue30155] Add ability to get tzinfo from a datetime instance in C API

2020-10-21 Thread Paul Ganssle


Change by Paul Ganssle :


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



[issue41746] Add optional type information to asdl_seq objects

2020-10-21 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:


New changeset 2e5ca9e3f68b33abb7d2c66d22ffc18dec40641a by Lysandros Nikolaou in 
branch 'master':
bpo-41746: Cast to typed seqs in CHECK macros to avoid type erasure (GH-22864)
https://github.com/python/cpython/commit/2e5ca9e3f68b33abb7d2c66d22ffc18dec40641a


--

___
Python tracker 

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



[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-10-21 Thread Paul Ganssle


Change by Paul Ganssle :


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



[issue41746] Add optional type information to asdl_seq objects

2020-10-21 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Last bit of work is now done.

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



[issue42111] Make the xxlimited module an example of best extension module practices

2020-10-21 Thread Petr Viktorin


New submission from Petr Viktorin :

The "xxlimited" module (Modules/xxlimited.c) was added as part of PEP 
384 (Defining a Stable ABI), and is undocumented. As far as I can tell, 
it was added partly to test the stable ABI, and partly as an example of 
how to write a module (like "xx" from xxmodule.c).
In the last few years the module has not seen much maintenance, and I 
believe it's no longer a good example to follow: it works, but there are 
now better ways to do things.

I would like to take over maintenance of the module and make it into an 
example of how to write a low-level C extension with isolated module 
state, as described in PEP 630 (Isolating Extension Modules) -- an 
informational PEP that I plan to convert to a HOWTO doc when everything 
is ready.

The old module will be kept around to test the 3.5 stable ABI.

Past discussion: 
https://mail.python.org/archives/list/python-...@python.org/thread/FO3YPG3YLG2XF5FKHICJHNINSPY4OHEL/#YITRQXGUOIEHK22QP5K4C5E45QA356U3

--
components: C API
messages: 379241
nosy: petr.viktorin
priority: normal
severity: normal
status: open
title: Make the xxlimited module an example of best extension module practices
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



[issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format

2020-10-21 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

One Apple implementation of binary plist parsing is here: 
https://opensource.apple.com/source/CF/CF-550/CFBinaryPList.c.

That seems to work from a buffer (or mmap) of the entire file, making 
consistency checks somewhat easier, and I don't think they have a hardcoded 
limit on the number of items in the plist (but: it's getting late and might 
have missed that).

An easy fix for this issue is to limit the amount of values read by _read_ints, 
but that immediately begs the question what that limit should be. It is clear 
that 1B items in the array is too much (in this case 1B object refs for 
dictionary keys). 

I don't know what a sane limit would be. The largest plist file on my system is 
10MB. Limiting *n* to 20M would be easily enough to parse that file, and 
doesn't consume too much memory (about 160MB for the read buffer at most). 

Another thing the current code doesn't do is check that the "ref" argument to 
_read_object is in range. That's less problematic because the code will raise 
an exception regardless (IndexErrox, instead of the nicer InvalidFileException).

--

___
Python tracker 

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



[issue33754] f-strings should be part of the Grammar

2020-10-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Just some notes to consider before work starts on this in earnest:

We need to decide what sort of changes we'll accept, if any. For at least the 
first round of this, I'm okay with "absolutely no change will be acceptable".

For example, here's a good change (IMO): allowing f'{"\n" if cond else ""}'. 
I'd like to be able to use backslashes inside strings that are in an expression.

A questionable change: f'{'foo'}'. Nesting the same type of quotes.

I think we should be explicit about what we will accept, because editors, etc. 
will need to adapt. In msg318550 I mention that some external tools use the 
same lexer they use for strings to lex f-strings. Are we okay with break that?

And the f-string '=' feature maybe be hard to support. Although if we are able 
to support it, then I think the same solution will be applicable to string 
annotations without unparsing them.

--
nosy: +emilyemorehouse, pablogsal

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-10-21 Thread Karl O. Pinc


Change by Karl O. Pinc :


--
pull_requests: +21809
pull_request: https://github.com/python/cpython/pull/22867

___
Python tracker 

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



[issue42112] ZipFIle.write remove slash at the beginning of member's path

2020-10-21 Thread Matan Perelman


Change by Matan Perelman :


--
components: Library (Lib)
nosy: matan1008
priority: normal
severity: normal
status: open
title: ZipFIle.write remove slash at the beginning of member's path
type: behavior
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



[issue41626] port shebang of tools from python2 to python3

2020-10-21 Thread Éric Araujo

Éric Araujo  added the comment:

This is a minor thing, and not a particularly visible bug, but it could create 
confusion about how to run scripts so could be fixed.

1) For stdlib modules, I think the intended usage is `python3 -m 
encodings.rot_13`; I don’t expect anyone to run `python3 
/usr/lib/python3.10/encodings/rot_13.py` to do a decoding in the terminal!
So for these easter eggs / hidden gems in the stdlib, I would delete the 
shebang and remove the executable bit.  There are 18 such modules, ignoring 
test, lib2to3, turtledemo and a few others named below.

1.1) There may be some exceptions: for Lib/idlelib/pyshell.py for example, 
maybe the IDLE entry point is just a symlink to that file, and removing the 
executable bit would break it.  So this can’t be a mass update but each case 
should be reviewed.

2) Some of the files in the PR are used during development of CPython: 
Tools/clinic/clinic.py Python/makeopcodetargets.py Parser/asdl_c.py 
Objects/typeslots.py Modules/_sha3/cleanup.py 
Lib/ctypes/macholib/fetch_macholib Mac/BuildScript/build-installer.py
I think some of these work with any Python, but some need the locally built 
interpreter to give correct results.
It could avoid confusion and mistakes to remove the shebangs and executable 
bits from the scripts that need a local Python, and make dure their 
documentation mentions `./python path/to/tool`.

2.1) One recent example, Tools/peg_generator/pegen/__main__.py is documented to 
work with Python 3.8+, and confusingly is both a __main__ module (to support 
python3 -m pegen and an executable script with shebang!)

2.2) In Tools/ssl, we have `/usr/bin/env python3` in make_ssl_data.py and 
`./python` in multissltests.py.  Are these working?!

3) The files in Tools/scripts are documented as «useful for building Python» or 
«generally useful scripts».  They nearly all executable and nearly all use 
`#!/usr/bin/env python3`, so fixing the few `python` references there seems ok. 
 Likewise for Tools/pynche/pynche.

3.1) For Tools/gdb/libpython.py I don’t know how it’s meant to be used; if it’s 
not distributed but only for debugging a locally built CPython, then removing 
the shebang seems correct.

(Oh and by the way, Tools/scripts/fixps.py is a tool to replace 
`/usr/local/bin/python` shebangs with `/usr/bin/env python`…  You can judge if 
that is useful and/or correct.)


So if things are changed (let’s get a couple opinions here), maybe this needs 
separate PRs for 1/2/3, and make sure to get reviews to ensure we don’t break 
IDLE / Mac installers / pegen / etc.

--
components: +Demos and Tools, Library (Lib)
nosy: +corona10, eric.araujo, ned.deily, petr.viktorin

___
Python tracker 

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



[issue42096] zipfile.is_zipfile incorrectly identifying a gzipped file as a zip archive

2020-10-21 Thread Irit Katriel


Irit Katriel  added the comment:

Are you able to attach a file with which you see this problem?
Have you tried with newer Python versions?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue41626] port shebang of tools from python2 to python3

2020-10-21 Thread Ned Deily


Ned Deily  added the comment:

To address some of the concerns:

- The shebang line in Mac/BuildScript/build-installer.py can be safely removed.

- "Lib/idlelib/pyshell.py for example, maybe the IDLE entry point is just a 
symlink to that file"
It's not, at least for unix-y builds. In [install-prefix], an "idle*" script is 
installed of the form:

#![install-prefix]/bin/python3.10

from idlelib.pyshell import main
if __name__ == '__main__':
main()

So there is an abolute link to the correct interpreter and shebang is not used.

--

___
Python tracker 

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



[issue41626] port shebang of tools from python2 to python3

2020-10-21 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg379245

___
Python tracker 

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



[issue41626] port shebang of tools from python2 to python3

2020-10-21 Thread Ned Deily


Ned Deily  added the comment:

To address some of the concerns:

- The shebang line in Mac/BuildScript/build-installer.py can be safely removed.

- "Lib/idlelib/pyshell.py for example, maybe the IDLE entry point is just a 
symlink to that file"
It's not, at least for unix-y builds. In [install-prefix], an "idle*" script is 
installed of the form:

#![install-prefix]/bin/python3.[n]

from idlelib.pyshell import main
if __name__ == '__main__':
main()

So there is an absolute link to the correct interpreter and the shebang in 
pyshell.py is not used.

--

___
Python tracker 

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



[issue41959] Doc/library/asyncio-policy.rst grammar error

2020-10-21 Thread miss-islington


miss-islington  added the comment:


New changeset ba666747af83aa465ffa8b55efbbb7f992647e12 by Miss Skeleton (bot) 
in branch '3.8':
[3.8] bpo-41959: Fix grammar around class asyncio.MultiLoopChildWatcher text 
(GH-22580) (GH-22866)
https://github.com/python/cpython/commit/ba666747af83aa465ffa8b55efbbb7f992647e12


--

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-10-21 Thread miss-islington


miss-islington  added the comment:


New changeset f8b1ccd63c94bcde1c15d56d24add89861b6ceee by kpinc in branch 
'master':
Fix bpo-39416: Change "Numeric" to lower case; an english word, not a class 
name (GH-22867)
https://github.com/python/cpython/commit/f8b1ccd63c94bcde1c15d56d24add89861b6ceee


--

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-10-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21811
pull_request: https://github.com/python/cpython/pull/22869

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-10-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21810
pull_request: https://github.com/python/cpython/pull/22868

___
Python tracker 

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



[issue41959] Doc/library/asyncio-policy.rst grammar error

2020-10-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset c3442fd8a7f6e34ba888efea085c3701b75c0b71 by Miss Skeleton (bot) 
in branch '3.9':
bpo-41959: Fix grammar around class asyncio.MultiLoopChildWatcher text 
(GH-22580) (#22865)
https://github.com/python/cpython/commit/c3442fd8a7f6e34ba888efea085c3701b75c0b71


--
nosy: +asvetlov

___
Python tracker 

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



[issue41959] Doc/library/asyncio-policy.rst grammar error

2020-10-21 Thread Andrew Svetlov


Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue41052] Opt out serialization/deserialization for heap type

2020-10-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +21812
pull_request: https://github.com/python/cpython/pull/22870

___
Python tracker 

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



[issue41052] Opt out serialization/deserialization for heap type

2020-10-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I came to the same conclusion after trying to fix it. But we cannot just do it 
now. We have to fix bugs in Python 3.9 and support protocols 0 and 1 for some 
deprecation period.

Also protocols 0 and 1 are used in some third-party implementations for other 
programming languages, so they can be used for interoperability with other 
languages.

The proposed patch adds additional check. It uses the fact that the __new__ 
attribute for classes implemented in C is a bultin function with __self__ 
pointing to this class (it is created in tp_new_wrapper()).

--

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-10-21 Thread miss-islington


miss-islington  added the comment:


New changeset 224ed378b9aadad9dbbd890064677433188aecd9 by Miss Skeleton (bot) 
in branch '3.9':
Fix bpo-39416: Change "Numeric" to lower case; an english word, not a class 
name (GH-22867)
https://github.com/python/cpython/commit/224ed378b9aadad9dbbd890064677433188aecd9


--

___
Python tracker 

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



[issue42112] ZipFIle.write remove slash at the beginning of member's path

2020-10-21 Thread Matan Perelman


Change by Matan Perelman :


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

___
Python tracker 

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



[issue35181] Doc: Namespace Packages: Inconsistent documentation of __loader__ being None

2020-10-21 Thread miss-islington

miss-islington  added the comment:


New changeset 27f1bd8787d24ac53cc3dc6ea5eb00b8a3499839 by Géry Ogam in branch 
'master':
bpo-35181: Correct importlib documentation for some module attributes (GH-15190)
https://github.com/python/cpython/commit/27f1bd8787d24ac53cc3dc6ea5eb00b8a3499839


--
nosy: +miss-islington

___
Python tracker 

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



[issue35181] Doc: Namespace Packages: Inconsistent documentation of __loader__ being None

2020-10-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21815
pull_request: https://github.com/python/cpython/pull/22873

___
Python tracker 

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



  1   2   >