[issue40640] Tutorial for Continue missing ... line

2020-10-20 Thread Irit Katriel


Irit Katriel  added the comment:

Chas - there is a conflict in the PR. Would you mind refreshing it? I'll try to 
make sure it gets merged this time.

--

___
Python tracker 

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



[issue41192] Some audit events are undocumented

2020-10-20 Thread A.M. Kuchling


A.M. Kuchling  added the comment:


New changeset 3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7 by Saiyang Gou in branch 
'master':
bpo-41192: Add documentation of undocumented audit events (GH-21308)
https://github.com/python/cpython/commit/3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7


--

___
Python tracker 

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



[issue41192] Some audit events are undocumented

2020-10-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21787
pull_request: https://github.com/python/cpython/pull/22832

___
Python tracker 

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



[issue41192] Some audit events are undocumented

2020-10-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21786
pull_request: https://github.com/python/cpython/pull/22831

___
Python tracker 

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



[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-20 Thread Paul Moore


Paul Moore  added the comment:


New changeset 5ab27cc518f614a0b954ff3eb125290f264242d5 by Paul Moore in branch 
'master':
bpo-42041: Clarify how subprocess searches for the executable (GH-22715)
https://github.com/python/cpython/commit/5ab27cc518f614a0b954ff3eb125290f264242d5


--

___
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-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21780
pull_request: https://github.com/python/cpython/pull/22823

___
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-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21783
pull_request: https://github.com/python/cpython/pull/22826

___
Python tracker 

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



[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +21779
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/22822

___
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-20 Thread miss-islington


miss-islington  added the comment:


New changeset d12afba507990b6d75f701b398d4f342576be5d7 by Miss Skeleton (bot) 
in branch '3.9':
bpo-38439: Update the Windows Store package's icons for IDLE. Artwork by Andrew 
Clover (GH-22817)
https://github.com/python/cpython/commit/d12afba507990b6d75f701b398d4f342576be5d7


--

___
Python tracker 

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



[issue38456] Reduce the time test_subprocess takes to complete.

2020-10-20 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

fyi - handy command to get that

python -m test.regrtest -v test_subprocess | ts '.%s'

then process that using whatever you want to compute deltas and sort.  i fed 
the output of that into:

```
#!/usr/bin/python3
"""Parse `python -m test.regrtest -v | ts '.%s'` output, report slowest."""

import sys
from typing import Sequence, Tuple


infile = sys.stdin

deltas: Sequence[Tuple[float, str]] = []

prev_secs: float = 0.
prev_test: str = ''
for line in infile:
  stripped_line = line.strip()
  if ' ' not in stripped_line:
continue
  num, test = stripped_line.split(None, 1)
  secs = float(num)
  delta = secs - prev_secs if prev_secs else 0.
  if '... ok' or '... skipped' in test:  # Not extraneous output.
# Assign the accumulated time to the previous test.
deltas.append((delta, prev_test))
prev_secs = secs
prev_test = test

for secs, test in reversed(sorted(deltas, key=lambda x:x[0])[-23:]):
  print(f'{secs:.3} {test}')
```

--

___
Python tracker 

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



[issue42099] Fix reference to ob_type in unionobject.c and ceval

2020-10-20 Thread Neil Schemenauer


New submission from Neil Schemenauer :

It is great that access to ob_type has been cleaned up to use an access macro.  
There are two spots that still need fixing.

I think we should do something to help avoid this kind of thing slipping into 
the code in the future.  E.g. a special build flag that renames the ob_type 
member would work.  I'll make a separate bug for that.

--
assignee: vstinner
components: Interpreter Core
messages: 379155
nosy: nascheme, vstinner
priority: normal
severity: normal
stage: patch review
status: open
title: Fix reference to ob_type in unionobject.c and ceval
type: enhancement

___
Python tracker 

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



[issue42098] Test suite should verify auditing events get triggered

2020-10-20 Thread A.M. Kuchling


New submission from A.M. Kuchling :

During the 3.10 development process, a call to `sys.audit()` got accidentally 
removed from the glob module. No tests caught it.

This is clearly bad. sys.audit() is intended for security-related purposes and 
can result in operations being cancelled, so someone may be relying on a 
particular event being triggered to catch a risky situation. If we then 
accidentally remove the audit event, that's a security hole.

The test suite should be verifying that audit events get triggered when we 
expect.  Presumably we'll need some kind of context manager or assertion that 
will do something like: 

  with self.assertAuditEventTriggered('glob.glob', 'path'):
glob.glob('path')

--
components: Tests
messages: 379154
nosy: akuchling
priority: normal
severity: normal
status: open
title: Test suite should verify auditing events get triggered
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



[issue42097] Python 3.7.9 logging/threading/fork hang

2020-10-20 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue42085] Add dedicated slot for sending values

2020-10-20 Thread Vladimir Matveev


Change by Vladimir Matveev :


--
type:  -> performance

___
Python tracker 

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



[issue13348] test_unicode_file fails: shutil.copy2 says "same file"

2020-10-20 Thread Irit Katriel


Irit Katriel  added the comment:

May we assume that a unit test failure from 9 years ago is no longer relevant?

--
nosy: +iritkatriel
status: pending -> open

___
Python tracker 

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



[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-20 Thread Mark Keller


Mark Keller  added the comment:

+1 to what Steve said

--

___
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-20 Thread Andrew de Quincey


Andrew de Quincey  added the comment:

Before anyone suggests it might be the logstash code we're calling in the 
comment, it ain't. 

The bug is easily replicated using entirely python built in code. See test.py 
attached.

If you're having trouble triggering it (seems to vary per machine), find:
pl.map(do_work, range(1))

And add a few zeros into the range()

--

___
Python tracker 

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



[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2020-10-20 Thread Danny Lin


Danny Lin  added the comment:

> Really? It's not obvious that finding a file would involve directory 
> operations?

Not in some senses, and that's possibly why Windows does not raise 
NotADirectoryError in such case.

I agree that it's a platform-specific implementation detail. However, there are 
lots of platform-specific implementation details written in documentation 
elsewhere already, especially OS related modules such as os and os.path. I 
don't think mentioning platform-specific implementation details for subclasses 
of OSError would be any less reasonable than that.

Adding such notice for NotADirectoryError helps people who want a EAFP style 
code for nonexistent file by preventing them getting trapped writing a 
cross-platform code.

--

___
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-20 Thread miss-islington


miss-islington  added the comment:


New changeset 333782a3f40baf8bb916da4b5fc04b3d2a749e0c by Miss Skeleton (bot) 
in branch '3.8':
bpo-38439: Update the Windows Store package's icons for IDLE. Artwork by Andrew 
Clover (GH-22817)
https://github.com/python/cpython/commit/333782a3f40baf8bb916da4b5fc04b3d2a749e0c


--

___
Python tracker 

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



[issue42087] Remove pre-AIX 6.1 dead code paths

2020-10-20 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10, vstinner

___
Python tracker 

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



[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I think kj's patch is ready to merge.  Guido, do you want to take a look?

--

___
Python tracker 

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



[issue41192] Some audit events are undocumented

2020-10-20 Thread A.M. Kuchling


A.M. Kuchling  added the comment:


New changeset b948d13ec076e757b7f6904aa67df2f36e4671b7 by Andrew Kuchling in 
branch '3.9':
[3.9] bpo-41192: Clarify the sys module's description of the auditing feature 
(GH-22821)
https://github.com/python/cpython/commit/b948d13ec076e757b7f6904aa67df2f36e4671b7


--

___
Python tracker 

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



[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2020-10-20 Thread Eryk Sun


Eryk Sun  added the comment:

Regarding documentation, builtin open() and the io and os modules generally do 
not provide information about platform-specific errors. But documenting the 
behavior for the NotADirectoryError exception itself may be useful considering 
it applies to many POSIX functions that access filepaths, such as stat, open, 
mkdir, rmdir, unlink, and rename.

Regarding behavior, I don't see anything reasonable that can or should be done 
for POSIX. In Windows, it should be possible to know whether FileNotFoundError 
is due to a bad path prefix (ERROR_PATH_NOT_FOUND, 3) or a missing file 
(ERROR_FILE_NOT_FOUND, 2), but io.FileIO currently only uses standard C errno, 
which maps both of these cases to ENOENT. So one behavior that *can* be fixed 
in this situation is to get the actual Windows error code from MSVC _doserrno, 
such that the raised FileNotFoundError would have the relevant Windows error 
code in its winerror attribute.

--

___
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-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Have you found this in 3.8+?  Since last June, 3.7 only gets security fixes, 
and this might have been fixed in later versions.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue41736] test_site: test_s_option() failed on AMD64 Windows8.1 Refleaks 3.7

2020-10-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

On Windows 10 and master, I ran 12 copies of test_site in parallel 10 times.  
Then I ran -R 3:100 3 times.  All pass.  

Unless refleaks are considered security holes, perhaps this should be closed 
until it re-occurs in a normally maintained branch.

--
nosy: +terry.reedy

___
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-20 Thread Inada Naoki


Inada Naoki  added the comment:

+1

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



[issue41646] shutil.copy documentation should clarify support for path-like objects

2020-10-20 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 6443a8ccc886749f5e83a8ca073006742b605d90 by Miss Skeleton (bot) 
in branch '3.8':
bpo-41646: Mention path-like objects support in the docs for shutil.copy() 
(GH-22208)
https://github.com/python/cpython/commit/6443a8ccc886749f5e83a8ca073006742b605d90


--
nosy: +methane

___
Python tracker 

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



[issue41744] NuGet python.props only works in python nuget, not other variants

2020-10-20 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset d0bfce992c4ce0e6e71f13a993c91903a97a62f3 by Miss Skeleton (bot) 
in branch '3.9':
bpo-41744: Package python.props with correct name in NuGet package (GH-22154)
https://github.com/python/cpython/commit/d0bfce992c4ce0e6e71f13a993c91903a97a62f3


--
nosy: +methane

___
Python tracker 

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



[issue41902] Micro optimization for range.index if step is 1

2020-10-20 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue42104] xml.etree should support contains() function

2020-10-20 Thread karl


New submission from karl :

In XPath 1.0 
The function contains() is available 

> Function: boolean contains(string, string)
> The contains function returns true if the first argument string contains the 
> second argument string, and otherwise returns false.

In https://www.w3.org/TR/1999/REC-xpath-19991116/#function-contains


```

   One attribute: doc
   Two Attributes: doc test
   One Attribute: test

```

Currently, we can do this

```
>>> from lxml import etree
>>> root = etree.fromstring("""
...One attribute
...Two Attributes: doc test
...Two Attributes: doc2 test
... 
... """)
>>> elts = root.xpath("//p[@class='doc']")
>>> elts, etree.tostring(elts[0])
([], b'One attribute\n   ')
```


One way of extracting the list of 2 elements which contains the attribute doc 
with XPath is:


```
>>> root.xpath("//p[contains(@class, 'doc')]")
[, ]
>>> [etree.tostring(elt) for elt in root.xpath("//p[contains(@class, 'doc')]")]
[b'One attribute: doc\n   ', b'Two 
Attributes: doc test\n   ']
```


There is no easy way to extract all elements containing a "doc" value in a 
multi-values attribute in python 3.10 with xml.etree, which is quite common in 
html. 


```
>>> import xml.etree.ElementTree as ET
>>> root = ET.fromstring("""
...One attribute: doc
...Two Attributes: doc test
...One Attribute: test
... """
... )
>>> root.xpath("//p[contains(@class, 'doc')]")
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'xpath'
```

--
components: Library (Lib)
messages: 379185
nosy: karlcow
priority: normal
severity: normal
status: open
title: xml.etree should support contains() function
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



[issue30680] textwrap should treat Unicode em-dash like ASCII em-dash

2020-10-20 Thread Inada Naoki


Change by Inada Naoki :


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



[issue41646] shutil.copy documentation should clarify support for path-like objects

2020-10-20 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 19019eccdeeb8dea027bd7766ca9fe2892972da4 by Miss Skeleton (bot) 
in branch '3.9':
bpo-41646: Mention path-like objects support in the docs for shutil.copy() 
(GH-22208)
https://github.com/python/cpython/commit/19019eccdeeb8dea027bd7766ca9fe2892972da4


--

___
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-20 Thread miss-islington


miss-islington  added the comment:


New changeset e866f33a48ee24e447fafd181f0da5f9584e0340 by Miss Skeleton (bot) 
in branch '3.8':
bpo-41316: Make tarfile follow specs for FNAME (GH-21511)
https://github.com/python/cpython/commit/e866f33a48ee24e447fafd181f0da5f9584e0340


--

___
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-20 Thread miss-islington


miss-islington  added the comment:


New changeset 7917170c5b4793ca9443f753aaecb8fbb3ad54ef by Miss Skeleton (bot) 
in branch '3.9':
bpo-41316: Make tarfile follow specs for FNAME (GH-21511)
https://github.com/python/cpython/commit/7917170c5b4793ca9443f753aaecb8fbb3ad54ef


--

___
Python tracker 

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



[issue19699] Update zipimport for PEP 451

2020-10-20 Thread Daniel Sheppard


Daniel Sheppard  added the comment:

With issue 25711 closed, was this ever resolved under that issue or is this 
still a pending task?

--
nosy: +dansheps

___
Python tracker 

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



[issue42100] Add _PyType_GetModuleByDef

2020-10-20 Thread Petr Viktorin


Change by Petr Viktorin :


--
components: +C API
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



[issue37105] Add deprecated-remove information on stream doc

2020-10-20 Thread Guido van Rossum


Guido van Rossum  added the comment:

Whoops, never mind me. Irit can you friend me on Discourse?

--

___
Python tracker 

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



[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 7cdf30fff39ea97f403b5472096349998d190e30 by kj in branch 'master':
bpo-42010: [docs] Clarify subscription of types (GH-22822)
https://github.com/python/cpython/commit/7cdf30fff39ea97f403b5472096349998d190e30


--

___
Python tracker 

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



[issue41902] Micro optimization for range.index if step is 1

2020-10-20 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 25492a5b59c5b74328278f195540e318ab87674f by Dong-hee Na in branch 
'master':
bpo-41902: Micro optimization for compute_item of range (GH-22492)
https://github.com/python/cpython/commit/25492a5b59c5b74328278f195540e318ab87674f


--
nosy: +methane

___
Python tracker 

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



[issue23706] pathlib.Path.write_text should include a newline argument

2020-10-20 Thread miss-islington

miss-islington  added the comment:


New changeset 5f227413400c4dfdba210cc0f8c9305421638bc1 by Максим in branch 
'master':
bpo-23706: Add newline parameter to pathlib.Path.write_text (GH-22420) 
(GH-22420)
https://github.com/python/cpython/commit/5f227413400c4dfdba210cc0f8c9305421638bc1


--
nosy: +miss-islington

___
Python tracker 

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



[issue42100] Add _PyType_GetModuleByDef

2020-10-20 Thread Petr Viktorin


New submission from Petr Viktorin :

I would like to add an internal _PyType_GetModuleByDef function to unblock 
further work on isolating extension modules, as discussed here: 
https://mail.python.org/archives/list/capi-...@python.org/thread/T3P2QNLNLBRFHWSKYSTPMVEIL2EEKFJU/

--
messages: 379163
nosy: petr.viktorin
priority: normal
severity: normal
status: open
title: Add _PyType_GetModuleByDef

___
Python tracker 

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



[issue22210] pdb-run-restarting-a-pdb-session

2020-10-20 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue42101] Allow inheritance of Venvs

2020-10-20 Thread Matthias Bussonnier


New submission from Matthias Bussonnier :

Followup from Python Idea: 

https://mail.python.org/archives/list/python-id...@python.org/thread/KTIYUEYF6XBHOGOLV744RQXMTETVSTOF/

Goal would be to allow layering on virtualenv to speedup creation and use less 
disk space in the case of many large venv having the same base. 

This would be based on an private internal patch that would be upstreamed.

--
messages: 379164
nosy: mbussonn
priority: normal
severity: normal
status: open
title: Allow inheritance of Venvs
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



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

2020-10-20 Thread Robert Wessen


New submission from Robert Wessen :

In versions of Python from 3.4-3.10, the Python core plistlib library supports 
Apple's binary plist format. When given malformed input, the implementation can 
be forced to create an argument to struct.unpack() which consumes all available 
CPU and memory until a MemError is thrown as it builds the 'format' argument to 
unpack().

This can be seen with the following malformed example binary plist input:

```
$ xxd binary_plist_dos.bplist
: 6270 6c69 7374 3030 d101 0255 614c 6973  bplist00...UaLis
0010: 74a5 0304 0506  00df 4251 4351 44a3  t.BQCQD.
0020: 0809 0a10 0110 0210 0308 0b11 1719 1b1d  
0030:  0101    000b    
0040:      0029...)

```
The error is reached in the following lines of plistlib.py:
(https://github.com/python/cpython/blob/e9959c71185d0850c84e3aba0301fbc238f194a9/Lib/plistlib.py#L485)

```
def _read_ints(self, n, size):
data = self._fp.read(size * n)
if size in _BINARY_FORMAT:
return struct.unpack('>' + _BINARY_FORMAT[size] * n, data)
```
When the malicious example above is opened by plistlib, it results in 'n' being 
controlled by the input and it can be forced to be very large. Plistlib 
attempts to build a string which is as long as 'n', consuming excessive 
resources.

Apple's built in utilities for handling plist files detects this same file as 
malformed and will not process it.

--
components: Interpreter Core
messages: 379175
nosy: wessen
priority: normal
severity: normal
status: open
title: DoS (MemError via CPU and RAM exhaustion) when processing malformed 
Apple Property List files in binary format
type: resource usage
versions: Python 3.10, 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



[issue41586] Allow to set pipe size on subprocess.Popen.

2020-10-20 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 786addd9d07b6c712b8ea9ee06e1f9f41c1b67a1 by Gregory P. Smith in 
branch 'master':
bpo-41586: Attempt to make the pipesize tests more robust. (GH-22839)
https://github.com/python/cpython/commit/786addd9d07b6c712b8ea9ee06e1f9f41c1b67a1


--

___
Python tracker 

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



[issue35753] Importing call from unittest.mock directly causes ValueError

2020-10-20 Thread David Antonini


David Antonini  added the comment:

Somehow I missed the follow up here until now. I don't remember the original 
code, but I'm fairly confident that mocked_print is the patched print function 
eg 
with patch('dionysus_app.class_functions.print') as mocked_print:

Probably solved in this commit dated the same day as the bug report:
https://github.com/toonarmycaptain/dionysus/commit/4f0eb7ca32b891d99106441b92a6c1accd0bb96d

--

___
Python tracker 

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



[issue41859] Uncaught ValueError

2020-10-20 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue41902] Micro optimization for range.index if step is 1

2020-10-20 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset c0f22fb8b3006936757cebb959cee94e285bc503 by Dong-hee Na in branch 
'master':
bpo-41902: Micro optimization for range.index if step is 1 (GH-22479)
https://github.com/python/cpython/commit/c0f22fb8b3006936757cebb959cee94e285bc503


--

___
Python tracker 

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



[issue37105] Add deprecated-remove information on stream doc

2020-10-20 Thread Irit Katriel


Irit Katriel  added the comment:

I checked earlier that it's not in 3.8 and 3.9, but now I double-checked and 
saw that it's not in master either. It was reverted here: 
https://github.com/python/cpython/pull/13251

--

___
Python tracker 

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



[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread miss-islington


miss-islington  added the comment:


New changeset d05514ace652769457e6228f0186d4f830b676b9 by Miss Skeleton (bot) 
in branch '3.9':
[3.9] bpo-42010: [docs] Clarify subscription of types (GH-22822) (GH-22840)
https://github.com/python/cpython/commit/d05514ace652769457e6228f0186d4f830b676b9


--

___
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-20 Thread Ned Deily


Change by Ned Deily :


--
components: +Library (Lib) -Interpreter Core
keywords: +security_issue
nosy: +ned.deily, ronaldoussoren, serhiy.storchaka
title: DoS (MemError via CPU and RAM exhaustion) when processing malformed 
Apple Property List files in binary format -> [security] DoS (MemError via CPU 
and RAM exhaustion) when processing malformed Apple Property List files in 
binary format

___
Python tracker 

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



[issue35753] Importing call from unittest.mock directly causes ValueError

2020-10-20 Thread Alfred Perlstein


Change by Alfred Perlstein :


--
keywords: +patch
nosy: +splbio
nosy_count: 4.0 -> 5.0
pull_requests: +21788
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/22834

___
Python tracker 

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



[issue37105] Add deprecated-remove information on stream doc

2020-10-20 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'd say close it, the deprecation can be a separate issue (usually is) and I 
don't think we need to backport such a minor docs issue to 3.8. The PR is old 
enough that it made 3.9+3.10 I think (did you check?).

--
nosy: +gvanrossum

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-10-20 Thread Petr Viktorin


Change by Petr Viktorin :


--
nosy: +petr.viktorin
nosy_count: 18.0 -> 19.0
pull_requests: +21792
pull_request: https://github.com/python/cpython/pull/22838

___
Python tracker 

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



[issue37105] Add deprecated-remove information on stream doc

2020-10-20 Thread Irit Katriel


Irit Katriel  added the comment:

Or more directly here: 
https://github.com/python/cpython/commit/6758e6e12a71ef5530146161881f88df1fa43382#diff-f82013fb4ae87c622d4c38a232b5a52e72ce06cd0f956b3d4684341f18890baa

--

___
Python tracker 

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



[issue40891] Use PEP 573 in functools

2020-10-20 Thread Petr Viktorin


Petr Viktorin  added the comment:

Here is a PR for _PyType_GetModuleByDef: 
https://github.com/python/cpython/pull/22835

--

___
Python tracker 

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



[issue41586] Allow to set pipe size on subprocess.Popen.

2020-10-20 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +21793
stage: commit review -> patch review
pull_request: https://github.com/python/cpython/pull/22839

___
Python tracker 

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



[issue36876] [subinterpreters] Global C variables are a problem

2020-10-20 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +21795
pull_request: https://github.com/python/cpython/pull/22841

___
Python tracker 

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



[issue41859] Uncaught ValueError

2020-10-20 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy:  -patanjalisutra666

___
Python tracker 

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



[issue41859] Uncaught ValueError

2020-10-20 Thread Terry J. Reedy


Change by Terry J. Reedy :


Removed file: https://bugs.python.org/file49480/debian-desktop.png

___
Python tracker 

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



[issue42102] Make builtins.callable "generic"

2020-10-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +gvanrossum, levkivskyi

___
Python tracker 

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



[issue42102] Make builtins.callable "generic"

2020-10-20 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm not against this, though I'm not sure it really buys us much (Any still has 
to be imported from typing). Maybe you can submit a PR? Running the tests might 
be informative.

--

___
Python tracker 

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



[issue41192] Some audit events are undocumented

2020-10-20 Thread A.M. Kuchling


A.M. Kuchling  added the comment:

After this flurry of commits, I think everything associated with the issue is 
now fixed.  

Along the way, I also noticed that the sys.audit() call had disappeared from 
the glob module (it's now restored) and filed issue #42098 to improve the test 
suite's checking of audit events.

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



[issue42100] Add _PyType_GetModuleByDef

2020-10-20 Thread Petr Viktorin


Change by Petr Viktorin :


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

___
Python tracker 

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



[issue29981] Update Index for set, dict, and generator 'comprehensions'

2020-10-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21791
pull_request: https://github.com/python/cpython/pull/22837

___
Python tracker 

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



[issue29981] Update Index for set, dict, and generator 'comprehensions'

2020-10-20 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +21790
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/22836

___
Python tracker 

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



[issue29981] Update Index for set, dict, and generator 'comprehensions'

2020-10-20 Thread A.M. Kuchling


A.M. Kuchling  added the comment:


New changeset 2d55aa9e37c9c84f4f6a8135d0326da0bcd8f38b by Florian Dahlitz in 
branch 'master':
bpo-29981: Add examples and update index for set, dict, and generator 
comprehensions'(GH-20272)
https://github.com/python/cpython/commit/2d55aa9e37c9c84f4f6a8135d0326da0bcd8f38b


--
nosy: +akuchling

___
Python tracker 

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



[issue37105] Add deprecated-remove information on stream doc

2020-10-20 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



[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread Guido van Rossum


Change by Guido van Rossum :


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



[issue42102] Make builtins.callable "generic"

2020-10-20 Thread Ken Jin


Ken Jin  added the comment:

+1 to this. I'm more surprised that callable wasn't already able to do that 
(also surprised at the ``isinstance(x, callable)`` code crashing). 

I think the implementation would be slightly different than what you proposed. 
I'd like to give it a shot if you aren't already doing this, and if there's 
more support for this too.

--
nosy: +kj

___
Python tracker 

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



[issue42102] Make builtins.callable "generic"

2020-10-20 Thread Shantanu


New submission from Shantanu :

In the post PEP 585 world, it seems like a bit of a stumbling block for 
builtins.callable to not able to be parametrised (in a runtime context). Post 
PEP 604, I'd expect typing.Callable to be the most used typing import after 
typing.Any, so much of PEP 585's rationale should apply to this case too.

Concretely, one way to implement this would be to turn callable into a type 
whose __new__ returns a bool and which implements __class_getitem__. We could 
throw in an __instancecheck__ so that `isinstance(x, callable) == callable(x)`.


PS: Despite being code that crashes instantly, I was still able to find some 
instances of `isinstance(x, callable)` on popular Github projects: 
https://grep.app/search?q=isinstance%5C%28.%2A%2C%20callable%5C%29=true=true

--
messages: 379169
nosy: hauntsaninja
priority: normal
severity: normal
status: open
title: Make builtins.callable "generic"
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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2020-10-20 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Connection.__init__() fixed by iterating though tp_bases in order to find the 
correct base class to load the state from. There should be a better way to do 
this than to dig through type member internals.

--

___
Python tracker 

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



[issue23706] pathlib.Path.write_text should include a newline argument

2020-10-20 Thread Inada Naoki


Inada Naoki  added the comment:

Thank you

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



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

2020-10-20 Thread Ammar Askar


Ammar Askar  added the comment:

Hey Victor, should we try to land this in Python 3.10? 

Given that no one has brought up any big concerns aside from LD_PRELOAD based 
hacks and how clang has already had this as the default I think it's relatively 
safe to make a default for with-optimizations.

--

___
Python tracker 

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



[issue42085] Add dedicated slot for sending values

2020-10-20 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +asvetlov, yselivanov

___
Python tracker 

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



[issue30680] textwrap should treat Unicode em-dash like ASCII em-dash

2020-10-20 Thread Inada Naoki


Inada Naoki  added the comment:

> Agreed. It makes great sense that textwrap started as highly ASCII-centric. 
> But in the Python 3, Unicode-friendly era, ASCII-biased isn't where we should 
> leave things.

It needs Unicode experts. If we support Unicode, we should implemente UAX #14.
http://www.unicode.org/reports/tr14/tr14-45.html

But I am not sure some core developer love textwrap and Unicode enough to 
implement it.
It can be implemented in 3rd party package before adding it in stdlib.

Then, is U+2014 really important to implement even though we can not implement 
UAX#14 in foreseeable future?
It doesn't make sense to me.

--
nosy: +methane

___
Python tracker 

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



<    1   2