[issue40272] ModuleNotFoundEror thrown by system python while accessing it specifically via venv python

2020-04-27 Thread Ned Deily


Ned Deily  added the comment:

One additional thought: there was a longstanding issue specific to using venv 
on macOS that has recently been fixed (Issue22490); that fix will be released 
first in Python 3.8.3 which should be available in a few weeks (or, if you are 
comfortable doing so, you could build it yourself from the current 3.8 branch 
on Github). If the problem isn't solved otherwise, you could try to see if that 
fix in 3.8.3 helps.

--

___
Python tracker 

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



[issue40261] Build of Python where make is called from subprocess, within a virtualenv, breaks on macOS

2020-04-27 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the easy-to-reproduce test case! It looks like you are running into 
the problem described in Issue22490 where venv with macOS framework builds 
could run into problems. A fix for this issue has recently been merged and will 
be released in upcoming 3.8.3 (a 3.8.3 release candidate should be available in 
the very near future) and 3.7.8.  I've verified that your test case now works 
with the current HEAD of 3.8 and fails with 3.8.2.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs 
fragile

___
Python tracker 

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



[issue40398] get_args(Callable) fails

2020-04-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6292be7adf247589bbf03524f8883cb4cb61f3e9 by Serhiy Storchaka in 
branch 'master':
bpo-40398: Fix typing.get_args() for special generic aliases. (GH-19720)
https://github.com/python/cpython/commit/6292be7adf247589bbf03524f8883cb4cb61f3e9


--

___
Python tracker 

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



[issue32444] python -m venv symlink dependency on how python binary is called is not documented

2020-04-27 Thread Ned Deily


Ned Deily  added the comment:

The behavior of venv has been changed in Python 3.9 to always create a 
"pythonM.N" link in the venv bin directory, in addition to "pythonM", 
regardless of how venv was invoked.

--
nosy: +ned.deily
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> shebanged scripts can escape from `venv` depending on how it 
was created
versions: +Python 3.9 -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



[issue31363] __PYVENV_LAUNCHER__ breaks calling another venv's interpreter

2020-04-27 Thread Ned Deily


Ned Deily  added the comment:

This issue has been fixed in the code for Issue22490 which will be released in 
Python 3.8.3 and 3.7.8.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs 
fragile
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6

___
Python tracker 

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



[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-04-27 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue40402] multiprocessing/connection.py broken handle

2020-04-27 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Maxi, Python 3.5 now only accept security fixes. Can you reproduce this 
issue with recent releases and post an example here?

--
nosy: +remi.lapeyre
type: crash -> behavior

___
Python tracker 

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



[issue40338] [Security] urllib and anti-slash (\) in the hostname

2020-04-27 Thread Riccardo Schirone


Riccardo Schirone  added the comment:

I agree I don't see a clear vulnerability here.

--
nosy: +rschiron

___
Python tracker 

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



[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Bar Harel


Change by Bar Harel :


--
title: ast -> asyncio.as_completed documentation misleading

___
Python tracker 

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



[issue40405] ast

2020-04-27 Thread Bar Harel


New submission from Bar Harel :

Continuing with bpo-27589, looks like as_completed documentation is still 
misleading. According to the docs, it "Return(s) an iterator of Future objects. 
Each Future object returned represents the earliest result from the set of the 
remaining awaitables."

There's only one problem: The only thing it definitely doesn't do, is return an 
iterator of future objects. To be honest with you, I'm not entirely sure how to 
phrase it.

For reference, I fell for this:

mapping = {fut: index for fut, index in enumerate(futures)}
for fut in as_completed(mapping):
  mapping[fut]  # KeyError

--
assignee: docs@python
components: Documentation, asyncio
messages: 367410
nosy: aronacher, asvetlov, bar.harel, docs@python, gvanrossum, hynek, vstinner, 
xtreak, yselivanov
priority: normal
severity: normal
status: open
title: ast
versions: 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



[issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

Yep, I didn't see any test_weakref hang anymore since this commit.

--

___
Python tracker 

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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0169d3003be3d072751dd14a5c84748ab63a249f by Pablo Galindo in 
branch 'master':
bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec 
types (GH-19414)
https://github.com/python/cpython/commit/0169d3003be3d072751dd14a5c84748ab63a249f


--

___
Python tracker 

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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

> Serhiy: would it be possible to fix this issue in alpha6? Can we merge PR 
> 19414? In the lack of reply, I think that the best to merge PR 19414.

I asked Lukasz (Python 3.9 release manager) in private and he is ok to merge 
this PR. He plans to wait until Refleak buildbots turn green again before 
tagging Python 3.9.0alpha6.


Serhiy:
> I do not think it is right. Please wait, I'll submit an alternate solution.

Serhiy: I merged Pablo's PR to unblock Refleak buildbots, but I'm still curious 
to see what you have to propose. We can still change the code before 3.9.0beta1.

Don't hesitate to propose your PR! (your PR will have to revert commit 
0169d3003be3d072751dd14a5c84748ab63a249f).

--

Pablo: would you mind to write a NEWS entry (in the C API category) for your 
change? IMHO the commit title is good enough to be reused as the NEWS entry. I 
added "skip news" label just to unblock buildbots.

--

___
Python tracker 

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



[issue40335] [PEP 617 new parser] Regression in multiline SyntaxError offsets

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

Until a fix is shipped, you can use -X oldparser command line option or 
PYTHONOLDPARSER=1 environment variable:
https://docs.python.org/dev/whatsnew/3.9.html#pep-617-new-parser

--
nosy: +vstinner
title: Regression in multiline SyntaxError offsets -> [PEP 617 new parser] 
Regression in multiline SyntaxError offsets

___
Python tracker 

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



[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

> I created bpo-40217: "The garbage collector doesn't take in account that 
> objects of heap allocated types hold a strong reference to their type".

This issue is now fixed. I tested manually: I confirm that it does fix the 
test_threading leak, so I close the issue.

$ ./python -m test -R 3:3 test_threading
(...)
== Tests result: SUCCESS ==

1 test OK.

Total duration: 1 min 14 sec
Tests result: SUCCESS

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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +19054
pull_request: https://github.com/python/cpython/pull/19733

___
Python tracker 

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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

FYI I closed bpo-40149: the commit 0169d3003be3d072751dd14a5c84748ab63a249f 
fixed test_threading leak.

--

For master, it would be nice to have a NEWS entry, and maybe also a What's New 
in Python 3.9 entry, maybe in the "Changes in the C API" section.

--

Now, what about Python 3.8? The commit 364f0b0f19cc3f0d5e63f571ec9163cf41c62958 
is part of Python 3.8.0. Is it ok to backport the commit 
0169d3003be3d072751dd14a5c84748ab63a249f into Python 3.8.3?

--

___
Python tracker 

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



[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue40338] [Security] urllib and anti-slash (\) in the hostname

2020-04-27 Thread STINNER Victor

STINNER Victor  added the comment:

We consider that the stdlib is not vulnerable, so I close the issue.

Feel free to report vulnerabilities to third party projects which are 
vulnerable.

Thanks for the report anyway David Schütz!

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

___
Python tracker 

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



[issue40402] multiprocessing/connection.py broken handle

2020-04-27 Thread Maxi

Maxi  added the comment:

Hi Rémi. This is a production environment and can't reproduce it in the dev 
server (probably because of the lack of volume).

I did checked that the code is the same up to Python 3.8, but can't confirm an 
actual case until we upgrade in prod.

‐‐‐ Original Message ‐‐‐
On Monday, 27 de April de 2020 6:01, Rémi Lapeyre  
wrote:

> Rémi Lapeyre remi.lape...@henki.fr added the comment:
>
> Hi Maxi, Python 3.5 now only accept security fixes. Can you reproduce this 
> issue with recent releases and post an example here?
>
> --
>
> nosy: +remi.lapeyre
> type: crash -> behavior
>
> Python tracker rep...@bugs.python.org
> https://bugs.python.org/issue40402

--

___
Python tracker 

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



[issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())

2020-04-27 Thread Thomas Grainger


Thomas Grainger  added the comment:

Perhaps there could be a MagicAsyncMock that supports .__await__ and 
.__aenter__ etc?

--

___
Python tracker 

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



[issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())

2020-04-27 Thread Thomas Grainger


New submission from Thomas Grainger :

aentering a MagicMock() results in an AsyncMock which behaves differently than 
I expected:

```
python3.9 -m asyncio
asyncio REPL 3.9.0a5 (default, Apr 18 2020, 00:00:31) 
[GCC 9.3.0] on linux
Use "await" directly instead of "asyncio.run()".
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncio
>>> from unittest import mock
>>> with mock.MagicMock() as m:
... with m.foo() as u:
... u.hello()
... 

>>> async with mock.MagicMock() as m:
... async with m.foo() as u:
... u.hello()
... 
:2: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was 
never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Traceback (most recent call last):
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 439, in result
return self.__get_result()
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 388, in 
__get_result
raise self._exception
  File "", line 2, in 
AttributeError: __aenter__
```

This is annoying for mocking database interfaces like

```
async def update_users(db, user):
async with db.connection() as conn:
async with conn.transaction() as tx:
...
```

--
components: Tests, asyncio
messages: 367419
nosy: asvetlov, graingert, yselivanov
priority: normal
severity: normal
status: open
title: MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())
versions: 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



[issue40333] Request for multi-phase initialization API to run code after importlib init

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

> 5) Remove PathFinder if filesystem imports are disabled

Extract of importlib._bootstrap_external._install():

def _install(_bootstrap_module):
...
sys.meta_path.append(PathFinder)

PathFinder is always registered. So you are not only asking for an API to 
customize sys.path, but also to customize sys.meta_path, right?


> A super minor paper cut is the lack of a PyConfig_SetBytesString() variant 
> for PyWideStringList_Append(). It was slightly annoying having to convert a 
> POSIX char* path to a wchar_t* since paths on POSIX are bytes.

Would you mind to open a separated issue for this feature request?


> It would be useful if there were some kind of PyErr API that returned a 
> PyString (or PyStatus) and was guaranteed to work before main is initialized.

Are you asking to format the current exception as a string? Something like 
traceback.format_exc() but as a C function?


> Overall, the new code in PyOxidizer is much, much cleaner! Thanks again for 
> the new API!

You're welcome. PyOxidizer is a good use case for PEP 587 (PyConfig). Sadly, 
you have to drop support for Python 3.8 and older, or maintain two code paths. 
I saw many projects which maintains two code paths: one for Python 3 (use 
Unicode and a few other changes), one for Python 2 (use bytes).

--

___
Python tracker 

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



[issue40092] Crash in _PyThreadState_DeleteExcept() at fork in the process child

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

> Do we have any pep or discuss record about this plan?

"since we are going to delete the threading.Thread object with its _tstate_lock 
object anyway" sentence is a description of the current 
_PyThreadState_DeleteExcept() implementation.

--

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-04-27 Thread Avram


Avram  added the comment:

Checking for presence and then falling through to the <=3.8 behavior as in the 
patch, seems reasonable. The default magic method behavior presumably comes out 
of research, trial, and error. If the docs need to be clearer, I think that's 
different that scrapping the whole approach.

--

___
Python tracker 

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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread Łukasz Langa

Łukasz Langa  added the comment:

Please backport to 3.8, then it will become part of 3.8.3rc1 which I'll be 
releasing tomorrow.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())

2020-04-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +lisroach, xtreak
type:  -> behavior

___
Python tracker 

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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 91a5ae18351027867e99c96db5ea235d9c42e47a by Pablo Galindo in 
branch 'master':
bpo-40217: Clean code in PyType_FromSpec_Alloc and add NEWS entry (GH-19733)
https://github.com/python/cpython/commit/91a5ae18351027867e99c96db5ea235d9c42e47a


--

___
Python tracker 

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



[issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc)

2020-04-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +19056
pull_request: https://github.com/python/cpython/pull/19734

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-04-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +19055
pull_request: https://github.com/python/cpython/pull/19734

___
Python tracker 

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



[issue40375] Add the UNSELECT command to imaplib

2020-04-27 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset c5c42815ecb560bbf34db99b0e15fe9b604be889 by Dong-hee Na in branch 
'master':
bpo-40375: Implement imaplib.IMAP4.unselect (GH-19712)
https://github.com/python/cpython/commit/c5c42815ecb560bbf34db99b0e15fe9b604be889


--

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-04-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I opened a PR to revert the change. issue25597 was open for sometime and the 
implications as reported here seem to be greater than the original report to 
just call the magicmethod. So we can revert the change to ensure there are no 
regressions in Python 3.9 for first beta and discuss the behavior for a later 
release.

--

___
Python tracker 

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



[issue40375] Add the UNSELECT command to imaplib

2020-04-27 Thread Dong-hee Na


Dong-hee Na  added the comment:

I am now closing this issue.

Thank you Eric and Victor for the review!

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



[issue40407] Zipfile couldn`t recognized character set rightly.

2020-04-27 Thread 김지훈

New submission from 김지훈 :

Hi,

I am not a developer.
However, when I inquired about an abnormality of an open source program before,
it was said that there was a problem with the Zipfile module of Python.
So I would like to ask it here.

I`m a Korean, and a Windows user.
And there are useful Windows compression programs in Korea.
However, when using those compression programs, Debian's unzip utility finds 
character sets well, but fails to find in the case of python.

If you look at the attached file,
(File size is too large, so attach it elsewhere - https://kutt.it/2F2Xec)
there are other compressed files in the compressed file.
The names in the compressed file are the names of the compressed programs.

And, as I have seen, the result of the basic compression is:
7zip : UTF-8
Alzip : UTF-8
BandiZip : EUC-KR
BreadZip : EUC-KR
PKZip : UTF-8
StarZip : EUC-KR
WinRAR : UTF-8
WinZIP : EUC-KR
Zipware : EUC-KR

BandiZip and Alzip are the two programs that compete in Korea.
I use BandiZip with few ads and this supports multi-core for compression.
StarZip is also a Korean program, but its share is not high.
BreadZip is also a Korean program, which has been used a lot, but has been 
discontinued and used only for some people.

Anyway, it can be considered that compression softwares in Korea use both 
EUC-KR and UTF-8 formats. However, the Zipfile module does not recognize this 
properly.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 367429
nosy: 김지훈
priority: normal
severity: normal
status: open
title: Zipfile couldn`t recognized character set rightly.
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



[issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds

2020-04-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

I declare this not a bug.

The docs do not promise that the Futures being returned are the *same* Futures 
that were passed in. They are not. They are (or at least may be) new Futures 
that represent the same event. Since Futures, when used as dict keys, use 
identity as equality, those new Futures will not be present as keys in the 
mapping of Futures passed in by the OP.

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

___
Python tracker 

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



[issue18999] Support different contexts in multiprocessing

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like this issue has been fixed, so I set its status to closed.

--
nosy: +vstinner
status: open -> closed

___
Python tracker 

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



[issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-23267 is marked as a duplicate of this issue.

--

___
Python tracker 

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



[issue40408] GenericAlias does not support nested type variables

2020-04-27 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

While trying to replace typing._GenericAlias with GenericAlias I have found 
that the latter does not support nested type variables.

>>> from typing import *
>>> T = TypeVar('T')
>>> X = List[List[T]]
>>> X.__parameters__
(~T,)
>>> X[int]
typing.List[typing.List[int]]
>>> Y = list[list[T]]
>>> Y.__parameters__
()
>>> Y[int]
Traceback (most recent call last):
  File "", line 1, in 
TypeError: There are no type variables left in list[list[~T]]

--
components: Interpreter Core
messages: 367433
nosy: gvanrossum, levkivskyi, serhiy.storchaka
priority: normal
severity: normal
status: open
title: GenericAlias does not support nested type variables
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



[issue30966] Add multiprocessing.queues.SimpleQueue.close()

2020-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
title: multiprocessing.queues.SimpleQueue leaks 2 fds -> Add 
multiprocessing.queues.SimpleQueue.close()

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-30966 "Add multiprocessing.SimpleQueue.close()".

--

___
Python tracker 

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



[issue30966] Add multiprocessing.queues.SimpleQueue.close()

2020-04-27 Thread miss-islington


miss-islington  added the comment:


New changeset 9adccc1384568f4d46e37f698cb3e3a4f6ca0252 by Victor Stinner in 
branch 'master':
bpo-30966: Add multiprocessing.SimpleQueue.close() (GH-19735)
https://github.com/python/cpython/commit/9adccc1384568f4d46e37f698cb3e3a4f6ca0252


--
nosy: +miss-islington

___
Python tracker 

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



[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Reopening so as to give the OP one more chance to state their case. They wrote:

"""
You've immediately closed the issue so I couldn't even reply to it,
Unfortunately, it doesn't return a Future object at all, so technically you're 
wrong, together with the docs of course, which was the bug I reported...
"""

If it's not a Future then what? You're not showing that in your report.

--
status: closed -> open

___
Python tracker 

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



[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Bar Harel


Bar Harel  added the comment:

It's a coroutine. Basically the same coroutine yielded over and over, returning 
the first future's result each time.
Like I said, I'm not entirely sure how to phrase it.
Maybe "Returns an iterator of awaitables"?

--

___
Python tracker 

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



[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-27 Thread Peter Ludemann


Change by Peter Ludemann :


--
nosy: +Peter Ludemann

___
Python tracker 

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



[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Oh, you're right. The docstring correctly says this. :-(

Do you have the power to submit a PR? I think it should just say that the 
return values are coroutines (which is what it does). @Yury what do you think?

--
resolution: not a bug -> 

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 2b74c835a7280840a853e3a9aaeb83758b13a458 by Pablo Galindo in 
branch 'master':
bpo-40334: Support CO_FUTURE_BARRY_AS_BDFL in the new parser (GH-19721)
https://github.com/python/cpython/commit/2b74c835a7280840a853e3a9aaeb83758b13a458


--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +19058
pull_request: https://github.com/python/cpython/pull/19736

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset b94dbd7ac34dc0c79512656eb17f6f07e09fca7a by Pablo Galindo in 
branch 'master':
bpo-40334: Support PyPARSE_DONT_IMPLY_DEDENT in the new parser (GH-19736)
https://github.com/python/cpython/commit/b94dbd7ac34dc0c79512656eb17f6f07e09fca7a


--

___
Python tracker 

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



[issue40402] Race condition in multiprocessing/connection.py: broken handle

2020-04-27 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

A call to self._check_closed() is already present in Python 3.5 
https://github.com/python/cpython/blob/3.5/Lib/multiprocessing/connection.py#L202-L206

It is possible for some issues to appear when mixing multiprocessing and 
multithreading thought:

In [17]: from time import sleep 
...: import multiprocessing, threading 
...:  
...: class Test: 
...: def __reduce__(self): 
...: sleep(1) 
...: return (Test, ()) 
...:  
...: parent, child = multiprocessing.Pipe() 
...: threading.Thread(target=lambda: parent.send(Test())).start() 
...: parent.close() 


Exception in thread Thread-7:
Traceback (most recent call last):
  File "/Users/remi/src/cpython/Lib/threading.py", line 950, in _bootstrap_inner
self.run()
  File "/Users/remi/src/cpython/Lib/threading.py", line 888, in run
self._target(*self._args, **self._kwargs)
  File "", line 10, in 
/Users/remi/src/cpython/venv/lib/python3.9/site-packages/prompt_toolkit/renderer.py:514:
 DeprecationWarning: The explicit passing of coroutine objects to 
asyncio.wait() is deprecated since Python 3.8, and scheduled for removal in 
Python 3.11.
  await wait(coroutines, return_when=FIRST_COMPLETED)
  File "/Users/remi/src/cpython/Lib/multiprocessing/connection.py", line 211, 
in send
self._send_bytes(_ForkingPickler.dumps(obj))
  File "/Users/remi/src/cpython/Lib/multiprocessing/connection.py", line 416, 
in _send_bytes
self._send(header + buf)
  File "/Users/remi/src/cpython/Lib/multiprocessing/connection.py", line 373, 
in _send
n = write(self._handle, buf)
TypeError: an integer is required (got type NoneType)



Maybe using a try-catch block could be more appropriate than the current check.

CC-ing Antoine Pitrou as he is the original author of this part in 
87cf220972c9cb400ddcd577962883dcc5dca51a. If you are OK with replacing calls to 
self._check_closed() by an exception block I would be happy to open a PR for 
this.

--
components: +Library (Lib)
nosy: +pitrou
title: multiprocessing/connection.py broken handle -> Race condition in 
multiprocessing/connection.py: broken handle
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.5

___
Python tracker 

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



[issue32117] Tuple unpacking in return and yield statements

2020-04-27 Thread Roundup Robot


Change by Roundup Robot :


--
nosy: +python-dev
nosy_count: 6.0 -> 7.0
pull_requests: +19059
pull_request: https://github.com/python/cpython/pull/19737

___
Python tracker 

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



[issue40402] Race condition in multiprocessing/connection.py: broken handle

2020-04-27 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I don't know if a try..except block is the best solution, but feel free to 
submit a PR and we can iterate on that :-)

--
stage:  -> needs patch

___
Python tracker 

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



[issue30966] Add multiprocessing.queues.SimpleQueue.close()

2020-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19060
pull_request: https://github.com/python/cpython/pull/19738

___
Python tracker 

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



[issue40395] Scripts folder is Empty in python 3.8.2 for Windows 7.

2020-04-27 Thread Steve Dower


Steve Dower  added the comment:

Thanks for including logs!

It looks like pip ran into an issue during install:

C:\Users\\AppData\Local\Temp\tmpppkvx8p2\pip-19.2.3-py2.py3-none-any.whl\pip\_vendor\ipaddress.py:1106:
 SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
C:\Users\\AppData\Local\Temp\tmpppkvx8p2\pip-19.2.3-py2.py3-none-any.whl\pip\_vendor\ipaddress.py:1106:
 SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
Traceback (most recent call last):
  File "C:\Python\Python38-32\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
  File "C:\Python\Python38-32\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
  File "C:\Python\Python38-32\lib\ensurepip\__main__.py", line 5, in 
sys.exit(ensurepip._main())
  File "C:\Python\Python38-32\lib\ensurepip\__init__.py", line 200, in _main
return _bootstrap(
  File "C:\Python\Python38-32\lib\ensurepip\__init__.py", line 119, in 
_bootstrap
return _run_pip(args + , additional_paths)
  File "C:\Python\Python38-32\lib\ensurepip\__init__.py", line 27, in _run_pip
import pip._internal
  File "", line 259, in load_module
  File 
"C:\Users\\AppData\Local\Temp\tmpppkvx8p2\pip-19.2.3-py2.py3-none-any.whl\pip\_internal\__init__.py",
 line 40, in 
  File "", line 259, in load_module
  File 
"C:\Users\\AppData\Local\Temp\tmpppkvx8p2\pip-19.2.3-py2.py3-none-any.whl\pip\_internal\cli\autocompletion.py",
 line 8, in 
  File "", line 259, in load_module
  File 
"C:\Users\\AppData\Local\Temp\tmpppkvx8p2\pip-19.2.3-py2.py3-none-any.whl\pip\_internal\cli\main_parser.py",
 line 7, in 
  File "", line 259, in load_module
  File 
"C:\Users\\AppData\Local\Temp\tmpppkvx8p2\pip-19.2.3-py2.py3-none-any.whl\pip\_internal\cli\cmdoptions.py",
 line 24, in 
  File "", line 259, in load_module
  File 
"C:\Users\\AppData\Local\Temp\tmpppkvx8p2\pip-19.2.3-py2.py3-none-any.whl\pip\_internal\models\search_scope.py",
 line 11, in 
  File "", line 259, in load_module
  File 
"C:\Users\\AppData\Local\Temp\tmpppkvx8p2\pip-19.2.3-py2.py3-none-any.whl\pip\_internal\utils\misc.py",
 line 21, in 
  File "", line 259, in load_module
  File 
"C:\Users\\AppData\Local\Temp\tmpppkvx8p2\pip-19.2.3-py2.py3-none-any.whl\pip\_vendor\pkg_resources\__init__.py",
 line 35, in 
  File "C:\Python\Python38-32\lib\plistlib.py", line 65, in 
from xml.parsers.expat import ParserCreate
  File "C:\Python\Python38-32\lib\xml\parsers\expat.py", line 4, in 
from pyexpat import *
ImportError: DLL load failed while importing pyexpat: The specified module 
could not be found.
Error 0x80070001: Command line returned an error.
Error 0x80070001: QuietExec Failed

However, as far as I can tell, all the dependencies it needs were installed. So 
the most likely cause is a virus scanner interfering. (Unless Python does not 
work for you at all, though that is still likely to be a scanner, since the 
setup logs seem fine.)

The easiest fix will be to disable your virus scanner and run a Repair install. 
That should make sure that everything is installed. If pip is the only thing 
missing, you could also run "python -m ensurepip" as admin.

--

___
Python tracker 

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



[issue40395] Scripts folder is Empty in python 3.8.2 for Windows 7.

2020-04-27 Thread Steve Dower


Steve Dower  added the comment:

As a secondary issue, why didn't the installer fail on the pip failure? Did we 
decide at some point not to fail the whole thing just because of pip? (It's 
probably the most unreliable part, as it's a custom action rather than simple 
installation.)

--

___
Python tracker 

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



[issue30966] Add multiprocessing.queues.SimpleQueue.close()

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1a275013d1ecc2e3778d64fda86174b2f13d6969 by Victor Stinner in 
branch 'master':
bpo-30966: concurrent.futures.Process.shutdown() closes queue (GH-19738)
https://github.com/python/cpython/commit/1a275013d1ecc2e3778d64fda86174b2f13d6969


--

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue17013] Allow waiting on a mock

2020-04-27 Thread Mario Corchero


Mario Corchero  added the comment:

For the record, I have no strong preference over either implementation. 
@voidspace preferred offline the new mock class, but sadly the rationale is 
lost in the physical word.

--

___
Python tracker 

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



[issue38728] Update PC/pyconfig.h to support disabling auto linking

2020-04-27 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 6.0 -> 7.0
pull_requests: +19062
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19740

___
Python tracker 

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



[issue40381] plistlib doesn't handle poorly-formatted plists

2020-04-27 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

IMHO this is a bug and plistlib should behave the same as Apple’s libraries 
here.

--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The parser generator imports modules token and tokenize. It is not correct, 
because they are relevant to the Python version used to run the parser 
generator, and not to the Python version for which the parser is generated. It 
works currently only because there is no differences between 3.8 and 3.9, but 
it will fail when you add a new token or change/remove an old one.

It should either parse the correct Grammar/Tokens file, or read the content of 
corresponding files Lib/token.py and Lib/tokenize.py and evaluate them with 
eval(). See for example Tools/scripts/generate_token.py.

--

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5d1f32d33ba24d0aa87235ae40207bb57778388b by Victor Stinner in 
branch 'master':
bpo-39995: Split test_concurrent_futures.test_crash() into sub-tests (GH-19739)
https://github.com/python/cpython/commit/5d1f32d33ba24d0aa87235ae40207bb57778388b


--

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

AMD64 Ubuntu Shared 3.x:
https://buildbot.python.org/all/#/builders/101/builds/809

==
ERROR: test_shutdown_no_wait 
(test.test_concurrent_futures.ProcessPoolForkserverProcessPoolShutdownTest)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_concurrent_futures.py",
 line 542, in test_shutdown_no_wait
executor.shutdown(wait=False)
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/concurrent/futures/process.py",
 line 724, in shutdown
self._executor_manager_thread_wakeup.wakeup()
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/concurrent/futures/process.py",
 line 80, in wakeup
self._writer.send_bytes(b"")
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/connection.py",
 line 188, in send_bytes
self._check_closed()
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/connection.py",
 line 141, in _check_closed
raise OSError("handle is closed")
OSError: handle is closed

(...)
0:32:37 load avg: 1.64 Re-running test_concurrent_futures in verbose mode
(...)

==
ERROR: test_shutdown_no_wait 
(test.test_concurrent_futures.ProcessPoolForkProcessPoolShutdownTest)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_concurrent_futures.py",
 line 542, in test_shutdown_no_wait
executor.shutdown(wait=False)
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/concurrent/futures/process.py",
 line 724, in shutdown
self._executor_manager_thread_wakeup.wakeup()
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/concurrent/futures/process.py",
 line 80, in wakeup
self._writer.send_bytes(b"")
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/connection.py",
 line 205, in send_bytes
self._send_bytes(m[offset:offset + size])
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/connection.py",
 line 416, in _send_bytes
self._send(header + buf)
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/connection.py",
 line 373, in _send
n = write(self._handle, buf)
OSError: [Errno 9] Bad file descriptor

--

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

> See also bpo-30966 "Add multiprocessing.SimpleQueue.close()".

I pushed a commit 1a275013d1ecc2e3778d64fda86174b2f13d6969: 
"Process.shutdown(wait=True) of concurrent.futures now closes
explicitly the result queue."

test_shutdown_deadlock_pickle() still rely on the queue to be closed 
implicitly. Queue created at:

  (...)
  File "/home/vstinner/python/master/Lib/test/test_concurrent_futures.py", 
lineno 1196
with self.executor_type(max_workers=2,
  File "/home/vstinner/python/master/Lib/concurrent/futures/process.py", lineno 
637
self._result_queue = mp_context.SimpleQueue()
  File "/home/vstinner/python/master/Lib/multiprocessing/context.py", lineno 113
return SimpleQueue(ctx=self.get_context())
  File "/home/vstinner/python/master/Lib/multiprocessing/queues.py", lineno 341
self._reader, self._writer = connection.Pipe(duplex=False)
  File "/home/vstinner/python/master/Lib/multiprocessing/connection.py", lineno 
539
c2 = Connection(fd2, readable=False)

--

___
Python tracker 

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



[issue40409] urllib.parse.urlsplit parses schemes that do not begin with letters

2020-04-27 Thread Samani Gikandi


New submission from Samani Gikandi :

RFC 3986 (STD66) says that a URL scheme should begin with an "letter", however 
urllib.parse.urlsplit (and urlparse) parse strings that don't adhere to this as 
valid schemes.

Example from Python3.8 using "+git+ssh://g...@github.com/user/project.git":

>>> from urllib.parse import urlsplit, urlparse
>>> urlparse("+git+ssh://g...@github.com/user/project.git")
ParseResult(scheme='+git+ssh', netloc='g...@github.com', 
path='/user/project.git', params='', query='', fragment='')
>>> urlsplit("+git+ssh://g...@github.com/user/project.git")
SplitResult(scheme='+git+ssh', netloc='g...@github.com', 
path='/user/project.git', query='', fragment='')

I double checked this behavior and number of other languages (Rust, Go, 
Javascript, Ruby) all complain if you try to use parse this URL

For reference, RFC3986 section 3.1 --

Scheme names consist of a sequence of characters beginning with a
   letter and followed by any combination of letters, digits, plus
   ("+"), period ("."), or hyphen ("-"). 

   [...]

   scheme  = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

--
components: Library (Lib)
messages: 367452
nosy: sgg
priority: normal
severity: normal
status: open
title: urllib.parse.urlsplit parses schemes that do not begin with letters
type: behavior
versions: Python 3.5, 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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

AMD64 Fedora Stable Clang Installed 3.x:
https://buildbot.python.org/all/#/builders/127/builds/679

0:04:21 load avg: 1.29 [423/423/1] test_concurrent_futures failed (2 min 39 sec)
Warning -- threading_cleanup() failed to cleanup -1 threads (count: 0, 
dangling: 3)
Warning -- Dangling thread: <_MainThread(MainThread, started 139673296918336)>
Warning -- Dangling thread: 
Warning -- Dangling thread: <_ExecutorManagerThread(Thread-145, stopped 
139673053914880)>
Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 
3)
Warning -- Dangling thread: <_MainThread(MainThread, started 139673296918336)>
Warning -- Dangling thread: 
Warning -- Dangling thread: <_ExecutorManagerThread(Thread-145, stopped 
139673053914880)>
/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/resource_tracker.py:216:
 UserWarning: resource_tracker: There appear to be 5 leaked semaphore objects 
to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '
Warning -- multiprocessing.process._dangling was modified by 
test_concurrent_futures
Warning -- threading._dangling was modified by test_concurrent_futures
test_cancel (test.test_concurrent_futures.FutureTests) ... ok
test_cancelled (test.test_concurrent_futures.FutureTests) ... ok
test_done (test.test_concurrent_futures.FutureTests) ... ok
(...)
test_first_exception_some_already_complete 
(test.test_concurrent_futures.ThreadPoolWaitTests) ... 1.60s ok
test_pending_calls_race (test.test_concurrent_futures.ThreadPoolWaitTests) ... 
0.11s ok
test_timeout (test.test_concurrent_futures.ThreadPoolWaitTests) ... 6.11s ok
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/util.py",
 line 300, in _run_finalizers
finalizer()
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/util.py",
 line 224, in __call__
res = self._callback(*self._args, **self._kwargs)
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/synchronize.py",
 line 87, in _cleanup
sem_unlink(name)
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/util.py",
 line 300, in _run_finalizers
finalizer()
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/util.py",
 line 224, in __call__
res = self._callback(*self._args, **self._kwargs)
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/synchronize.py",
 line 87, in _cleanup
sem_unlink(name)
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/util.py",
 line 300, in _run_finalizers
finalizer()
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/util.py",
 line 224, in __call__
res = self._callback(*self._args, **self._kwargs)
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/synchronize.py",
 line 87, in _cleanup
sem_unlink(name)
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/util.py",
 line 300, in _run_finalizers
finalizer()
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/util.py",
 line 224, in __call__
res = self._callback(*self._args, **self._kwargs)
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/synchronize.py",
 line 87, in _cleanup
sem_unlink(name)
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/util.py",
 line 300, in _run_finalizers
finalizer()
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/util.py",
 line 224, in __call__
res = self._callback(*self._args, **self._kwargs)
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/synchronize.py",
 line 87, in

[issue40408] GenericAlias does not support nested type variables

2020-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Good catch. Is there a reasonable fix?

--

___
Python tracker 

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



[issue40409] urllib.parse.urlsplit parses schemes that do not begin with letters

2020-04-27 Thread Samani Gikandi


Change by Samani Gikandi :


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

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

x86 Gentoo Installed with X 3.x:
https://buildbot.python.org/all/#/builders/128/builds/726

test_del_shutdown 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolShutdownTest) ...

Warning -- Unraisable exception
Exception ignored in: .weakref_cb at 0xb5067898>
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/concurrent/futures/process.py",
 line 281, in weakref_cb
thread_wakeup.wakeup()
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/concurrent/futures/process.py",
 line 80, in wakeup
self._writer.send_bytes(b"")
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/multiprocessing/connection.py",
 line 205, in send_bytes
self._send_bytes(m[offset:offset + size])
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/multiprocessing/connection.py",
 line 416, in _send_bytes
self._send(header + buf)
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/multiprocessing/connection.py",
 line 373, in _send
n = write(self._handle, buf)
OSError: [Errno 9] Bad file descriptor

0.04s ok

--

___
Python tracker 

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



[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-27 Thread Lewis Ball


Lewis Ball  added the comment:

Okay, that makes sense. I will raise a PR

--

___
Python tracker 

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



[issue40410] test_multiprocessing_forktest_terminate() timed out after 15 min on s390x Fedora LTO + PGO 3.x

2020-04-27 Thread STINNER Victor


New submission from STINNER Victor :

s390x Fedora LTO + PGO 3.x:
https://buildbot.python.org/all/#/builders/460/builds/364

0:15:21 load avg: 0.00 [423/423/1] test_multiprocessing_fork crashed (Exit code 
1)
Timeout (0:15:00)!
Thread 0x03ff83dff910 (most recent call first):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/multiprocessing/connection.py",
 line 384 in _recv
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/multiprocessing/connection.py",
 line 419 in _recv_bytes
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/multiprocessing/connection.py",
 line 255 in recv
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/multiprocessing/pool.py",
 line 600 in _handle_results
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/threading.py",
 line 888 in run
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/threading.py",
 line 950 in _bootstrap_inner
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/threading.py",
 line 908 in _bootstrap

Thread 0x03ff976f8b20 (most recent call first):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/multiprocessing/pool.py",
 line 673 in _help_stuff_finish
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/multiprocessing/pool.py",
 line 693 in _terminate_pool
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/multiprocessing/util.py",
 line 224 in __call__
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/multiprocessing/pool.py",
 line 655 in terminate
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.lto-pgo/build/Lib/test/_test_multiprocessing.py",
 line 2546 in test_terminate
  (...)

--
components: Tests
messages: 367457
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_multiprocessing_forktest_terminate() timed out after 15 min on 
s390x Fedora LTO + PGO 3.x
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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

ERROR: test_killed_child 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest)
  (...)
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/multiprocessing/connection.py",
 line 373, in _send
n = write(self._handle, buf)
OSError: [Errno 9] Bad file descriptor

It seems like Connection.close() was called while Connection._send() was 
called. I added debug logs:

* self._handle was equal to 4 at the function entry
* self._handle was equal to None when write() was called

--

___
Python tracker 

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



[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-27 Thread Lewis Ball


Lewis Ball  added the comment:

Adding a test for this and noticed I can add one more test case to get the 
method to full coverage. Can I add that to this PR or should I raise a separate 
one?

--

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

> It seems like Connection.close() was called while Connection._send() was 
> called. I added debug logs:

The connection was closed by terminate_broken() called by 
_ExecutorManagerThread.run() thread:

test_killed_child 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest) ... 
close handle 4
  File "/home/vstinner/python/master/Lib/threading.py", line 908, in _bootstrap
self._bootstrap_inner()
  File "/home/vstinner/python/master/Lib/threading.py", line 950, in 
_bootstrap_inner
self.run()
  File "/home/vstinner/python/master/Lib/concurrent/futures/process.py", line 
313, in run
self.terminate_broken(cause)
  File "/home/vstinner/python/master/Lib/concurrent/futures/process.py", line 
456, in terminate_broken
self.join_executor_internals()
  File "/home/vstinner/python/master/Lib/concurrent/futures/process.py", line 
503, in join_executor_internals
self.thread_wakeup.close()
  File "/home/vstinner/python/master/Lib/concurrent/futures/process.py", line 
75, in close
self._writer.close()

--

___
Python tracker 

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



[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-27 Thread Tim Peters


Tim Peters  added the comment:

I'm not clear on exactly what it is you're asking, but it's better to ask for 
forgiveness than permission ;-)  That is, it's unlikely anyone will object to 
adding a test in a feature PR.

--
stage:  -> needs patch
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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

terminate_broken() method was added by:

commit 0e89076247580ba0e570c4816f0e5628a7e36e83
Author: Thomas Moreau 
Date:   Sun Mar 1 21:49:14 2020 +0100

bpo-39678: refactor queue manager thread (GH-18551)

--

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

> ERROR: test_killed_child 
> (test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest)

The patch below makes this test failure more likely:

diff --git a/Lib/multiprocessing/connection.py 
b/Lib/multiprocessing/connection.py
index 510e4b5aba..63518e55d9 100644
--- a/Lib/multiprocessing/connection.py
+++ b/Lib/multiprocessing/connection.py
@@ -370,6 +370,7 @@ class Connection(_ConnectionBase):
 def _send(self, buf, write=_write):
 remaining = len(buf)
 while True:
+time.sleep(0.050)
 n = write(self._handle, buf)
 remaining -= n
 if remaining == 0:

--

___
Python tracker 

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



[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-27 Thread Lewis Ball


Change by Lewis Ball :


--
keywords: +patch
pull_requests: +19064
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/19742

___
Python tracker 

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



[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-27 Thread Lewis Ball


Lewis Ball  added the comment:

Oh okay, well I was just saying I have added a test which is unrelated to the 
feature I have added, but it does test a different part of the same function. 
Anyway, I have raised a PR for this now (19742) and can separate it out if 
needed.

--

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like test_killed_child() race condition was introduced by:

commit a5cbab552d294d99fde864306632d7e511a75d3c (refs/bisect/bad)
Author: Thomas Moreau 
Date:   Sun Feb 16 19:09:26 2020 +0100

bpo-39104: Fix hanging ProcessPoolExecutor on shutdown nowait with pickling 
failure (GH-17670)

--

___
Python tracker 

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



[issue39104] ProcessPoolExecutor hangs on shutdown nowait with pickling failure

2020-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-39104: Fix hanging ProcessPoolExecutor on shutdown nowait with pickling 
> failure (GH-17670)
> https://github.com/python/cpython/commit/a5cbab552d294d99fde864306632d7e511a75d3c

ProcessPoolSpawnProcessPoolExecutorTest.test_killed_child() of 
test_concurrent_futures started to fail randomly since this change: see 
bpo-39995.

--
nosy: +vstinner

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> The parser generator imports modules token and tokenize. It is not correct, 
> because they are relevant to the Python version used to run the parser 
> generator, and not to the Python version for which the parser is generated. 
> It works currently only because there is no differences between 3.8 and 3.9, 
> but it will fail when you add a new token or change/remove an old one.

Very good point, Serhiy! Thanks for catching that

So there are two parts of the parser generator where we use these modules:

- For the grammar parser and the python-based generator (that generates the 
grammar parser) we are good because we just need the modules to parse the 
grammars and generate the metaparser so there is no need for those modules to 
be updated. Running the grammar parser (the one generated with the 
meta-grammar) is also fine.

- For the C generator we need the current set of "exact_token_types" and in 
this case we need them to be synchronized with the Tokens file. I think we can 
do as pgen and take the path to that file as part of the command line interface 
and parse it.

I will make a PR for this soon.

--

___
Python tracker 

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



[issue2190] MozillaCookieJar ignore HttpOnly cookies

2020-04-27 Thread Daniel Lenski


Daniel Lenski  added the comment:

Also confused about why this was closed.

This format is still frequently used. In the absence of a solution in the 
standard library, I'm using this kludge to strip the leading `#HttpOnly_`.


from tempfile import NamedTemporaryFile
from http.cookiejar import MozillaCookieJar
from contextlib import contextmanager

def fix_cookie_jar_file(orig_cookiejarfile):
with NamedTemporaryFile(mode='w+') as cjf:
with open(orig_cookiejarfile, 'r') as ocf:
for l in ocf:
cjf.write(l[10:] if l.startswith('#HttpOnly_') else l)
cjf.seek(0)
yield cjf.name

MozillaCookieJar(filename=fix_cookie_jar_file(orig_cookiejarfile))

--
nosy: +dlenski

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19065
pull_request: https://github.com/python/cpython/pull/19743

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19066
pull_request: https://github.com/python/cpython/pull/19744

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread paul rubin


paul rubin  added the comment:

I just saw this.  Interesting.  Sometimes I use ast.literal_eval to read big, 
deeply nested data objects.  I can probably convert to JSON if necessary but 
it's another thing to watch out for.  I might try to benchmark some of these.

--
nosy: +phr

___
Python tracker 

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



[issue2190] MozillaCookieJar ignore HttpOnly cookies

2020-04-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This issue was closed as useless for Firefox in 2010 by the original poster, 
msg109958.  My participation here is only as tracker triager, as I only have a 
consumer knowledge of cookies.  Unfortunately, there is no core developer 
expert for http, let alone the http.cookiejar.  The person who once handled 
some cookie related patches is no longer active.

Adding a patch to a closed issue is somewhat useless.  In any case, a possible 
revised PR would be needed.  My suggestion is to ask on python-ideas whether 
this enhancement might be accepted now and whether better to reopen this issue 
or open a new one.

--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

@phr: examples welcome! The bigger and nastier, the better. This *should* all 
be speedy but it wouldn't hurt to check.

--

___
Python tracker 

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



[issue40411] frozen collection.Counter

2020-04-27 Thread paul rubin


New submission from paul rubin :

It would be nice to have frozen Counters analogous to frozensets, so they are 
usable as dictionary keys.  One can of course create frozenset(counter.items()) 
but that means the set items are tuples rather than the original set elements, 
so it's no longer quick to check membership.  I can work around this in my 
immediate application but it seems like a shortcoming.  There are some other 
set operations that aren't supported by counters either, that would be nice if 
they are conceptually multisets.

--
components: Library (Lib)
messages: 367472
nosy: phr
priority: normal
severity: normal
status: open
title: frozen collection.Counter
type: enhancement

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +19067
pull_request: https://github.com/python/cpython/pull/19745

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset d55133f49fe678fbf047a647aa8bb8b520410e8d by Lysandros Nikolaou in 
branch 'master':
bpo-40334: Catch E_EOF error, when the tokenizer returns ERRORTOKEN (GH-19743)
https://github.com/python/cpython/commit/d55133f49fe678fbf047a647aa8bb8b520410e8d


--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3d53d8756f0403eec6a4e12f183103d651bed6c5 by Lysandros Nikolaou in 
branch 'master':
bpo-40334: Don't skip test_parser:test_trigget_memory_error (GH-19744)
https://github.com/python/cpython/commit/3d53d8756f0403eec6a4e12f183103d651bed6c5


--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-27 Thread paul rubin


Change by paul rubin :


--
nosy:  -phr

___
Python tracker 

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



[issue40411] frozen collection.Counter

2020-04-27 Thread Kyle Stanley


Kyle Stanley  added the comment:

Rather than starting this out as a bpo issue, I would highly recommend bringing 
forth a proposal for this in python-id...@python.org and explaining in as much 
detail as possible:

1) How a frozen variation of collection.Counter would benefit your specific use 
case
2) The current available workaround you mentioned, issues with it, and the 
comparative benefit your proposal would provide
3) Why it should be included in the standard library, compared to a 3rd party 
package on PyPI

The 3rd one can be a bit tricky, but it typically involves explaining how 
widespread the potential use case(s) would be and how tricky it would be for 
users to implement something like this on their own (from both a functionality 
and performance perspective).

>From a brief glance of the archives, it doesn't look like this specific idea 
>was proposed, other than part of a more generalized one to add frozen 
>equivalents for the entire collections module, which was rejected on the basis 
>of the use cases being too theoretical and overly broad.

Also, while not specific to your particular proposal, I would recommend reading 
over the following post from Raymond Hettinger in the python-ideas archive 
(from the previously mentioned thread): 
https://mail.python.org/archives/list/python-id...@python.org/message/QVBVJU4RNJ5MDKBJ5CNGINYG24WZDZX7/.
 It explains why the collections module tries to be minimalist, and 
specifically the requirement of new features providing a tangible, real-world 
benefit.

It's of course up to you how you decide to format the proposal, but by 
answering the above points and demonstrating clear value in specific use cases, 
it has a much better chance of eventually making into the standard library (or 
at the least, a constructive discussion about it).

--
nosy: +aeros

___
Python tracker 

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



[issue40411] frozen collection.Counter

2020-04-27 Thread Kyle Stanley


Kyle Stanley  added the comment:

Also, adding Raymond to the nosy list in case he has any specific comments 
about a frozen collections.Counter.

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



[issue40412] inittab_copy not set to NULL after free, can lead to crashes when running multiple interpreters in a single process

2020-04-27 Thread Gregory Szorc


New submission from Gregory Szorc :

Filing a bug to placate the requirement that pull requests have issues.

--
components: C API
messages: 367477
nosy: indygreg
priority: normal
severity: normal
status: open
title: inittab_copy not set to NULL after free, can lead to crashes when 
running multiple interpreters in a single process
type: crash
versions: Python 3.5, 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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread Kyle Stanley


Change by Kyle Stanley :


--
nosy: +aeros

___
Python tracker 

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



[issue40412] inittab_copy not set to NULL after free, can lead to crashes when running multiple interpreters in a single process

2020-04-27 Thread Gregory Szorc


Change by Gregory Szorc :


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

___
Python tracker 

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



[issue1726707] add itertools.ichain function and count.getvalue

2020-04-27 Thread paul rubin


paul rubin  added the comment:

Note, nowadays this is implement as itertools.chain.from_iterable .

--

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-27 Thread Kyle Stanley


Change by Kyle Stanley :


--
nosy: +pitrou

___
Python tracker 

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



  1   2   >