[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-05-03 Thread Chris Jerdonek


Change by Chris Jerdonek :


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

___
Python tracker 

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



[issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib

2020-05-03 Thread Petter S


Petter S  added the comment:

We should whitelist the protocols. The current solution with `getattr` is 
really fragile.

For example, this crashes with a `TypeError`: 
`URLopener().open("unknown_proxy://test")`

--
nosy: +Petter S

___
Python tracker 

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



[issue40454] DEBUG kw to asyncio.run overrides DEBUG mode set elsewhere

2020-05-03 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 3.0 -> 4.0
pull_requests: +19206
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19895

___
Python tracker 

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



[issue40493] Pegen can't parse some function type comments

2020-05-03 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



[issue40493] Pegen can't parse some function type comments

2020-05-03 Thread miss-islington


miss-islington  added the comment:


New changeset 603d3546264149f323edb7952b60075fb6bc4dc2 by Shantanu in branch 
'master':
bpo-40493: fix function type comment parsing (GH-19894)
https://github.com/python/cpython/commit/603d3546264149f323edb7952b60075fb6bc4dc2


--
nosy: +miss-islington

___
Python tracker 

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



[issue40493] Pegen can't parse some function type comments

2020-05-03 Thread Shantanu


Change by Shantanu :


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

___
Python tracker 

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



[issue40493] Pegen can't parse some function type comments

2020-05-03 Thread Shantanu

New submission from Shantanu :

Currently fails if we don't have any arguments before *args and **kwargs

```
~ λ python3.9
Python 3.9.0a6+ (heads/master:c95e691, May  3 2020, 19:57:46) 
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast; ast.parse("(*int) -> None", mode="func_type", 
>>> type_comments=True)
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/shantanu/.pyenv/versions/3.9-dev/lib/python3.9/ast.py", line 50, 
in parse
return compile(source, filename, mode, flags,
  File "", line 1
(*int) -> None
 ^
SyntaxError: invalid syntax
```

--
messages: 368009
nosy: hauntsaninja
priority: normal
severity: normal
status: open
title: Pegen can't parse some function type comments

___
Python tracker 

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



[issue40492] -m cProfile -o f.pstats with a script that does chdir() writes to the changed directory and not `.`

2020-05-03 Thread Anthony Sottile


New submission from Anthony Sottile :

just spent quite a bit of time debugging this, here's a minimal example:

```bash
# rm -rf a (if you want to reset)
cd /tmp
mkdir -p a/b
echo 'import os; os.chdir("..")' > a/b/c.py
cd a/b
python3 -m cProfile -o log.pstats c.py
ls -al
ls -al ..
```

example output:

```console
$ cd /tmp
$ mkdir -p a/b
$ echo 'import os; os.chdir("..")' > a/b/c.py
$ cd a/b
$ python3 -m cProfile -o log.pstats c.py
$ ls -al
total 12
drwxr-xr-x 2 asottile asottile 4096 May  3 20:35 .
drwxr-xr-x 3 asottile asottile 4096 May  3 20:35 ..
-rw-r--r-- 1 asottile asottile   26 May  3 20:35 c.py
$ ls -al ..
total 16
drwxr-xr-x  3 asottile asottile 4096 May  3 20:35 .
drwxrwxrwt 28 root root 4096 May  3 20:35 ..
drwxr-xr-x  2 asottile asottile 4096 May  3 20:35 b
-rw-r--r--  1 asottile asottile  395 May  3 20:35 log.pstats
```

happy to work on a patch if this seems like a good idea to fix

--
components: Library (Lib)
messages: 368008
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: -m cProfile -o f.pstats with a script that does chdir() writes to the 
changed directory and not `.`
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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-03 Thread hai shi


hai shi  added the comment:

The easy way to fix this test case is that don't define the shared memory 
block's name. `test_shared_memory_basics` has tested against the shared memory 
block's name, so canceling the shared memory block'name has no side-effect.

--

___
Python tracker 

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



[issue40491] Typo in SyntaxError produced by pegen for numeric literals

2020-05-03 Thread Shantanu


Change by Shantanu :


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

___
Python tracker 

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



[issue40491] Typo in SyntaxError produced by pegen for numeric literals

2020-05-03 Thread Shantanu

New submission from Shantanu :

```
~ λ python3.9
Python 3.9.0a6+ (heads/master:c95e691, May  3 2020, 19:57:46) 
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> ast.parse("1_2", feature_version=(3, 5))
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/shantanu/.pyenv/versions/3.9-dev/lib/python3.9/ast.py", line 50, 
in parse
return compile(source, filename, mode, flags,
  File "", line 1
1_2
^
SyntaxError: Underscores in numeric literals are only supportedin Python 3.6 
and greater
```

--
messages: 368006
nosy: hauntsaninja
priority: normal
severity: normal
status: open
title: Typo in SyntaxError produced by pegen for numeric literals

___
Python tracker 

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-03 Thread hai shi


Change by hai shi :


--
keywords: +patch
nosy: +shihai1991
nosy_count: 1.0 -> 2.0
pull_requests: +19203
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19892

___
Python tracker 

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



[issue40490] peg_generator module has unused imports

2020-05-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue40490] peg_generator module has unused imports

2020-05-03 Thread anthony shaw


Change by anthony shaw :


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

___
Python tracker 

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



[issue40490] peg_generator module has unused imports

2020-05-03 Thread anthony shaw


New submission from anthony shaw :

the tools/peg_generator package contains a number of unused imports

--
components: Interpreter Core
messages: 368005
nosy: anthonypjshaw, pablogsal
priority: normal
severity: normal
stage: needs patch
status: open
title: peg_generator module has unused imports
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7f06af684a1882fdb19d20650825948b1d7996e5 by Lysandros Nikolaou in 
branch 'master':
bpo-40334: Set error_indicator in _PyPegen_raise_error (GH-19887)
https://github.com/python/cpython/commit/7f06af684a1882fdb19d20650825948b1d7996e5


--

___
Python tracker 

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



[issue40487] Unexpected exception handler behavior in Jupyter when returning task objects created with create_task

2020-05-03 Thread Kyle Stanley


Kyle Stanley  added the comment:

John Smith wrote:
> The code works normally again if I remove the return statement from the 
> `run_coro` function.

I am a bit surprised that the code works as intended simply by removing the 
return statement. Perhaps Yury or Andrew can clarify on that point.

>From looking at the code above, the main issue seems to be that the tasks are 
>not awaited or cancelled and cleaned up at any point. When creating a task 
>without ever awaiting it, there's no guarantee that it will be completed 
>within the duration of the event loop. This is handled for the user when using 
>asyncio.run() by cancelling the tasks and propagating any exceptions during 
>event loop finalization, but should be done manually or by the event loop when 
>not using it. For an example, see _cancel_all_tasks() in 
>https://github.com/python/cpython/blob/d699d5e6178adca785a8701c32daf5e18fad0bf1/Lib/asyncio/runners.py#L54.

So, my best guess as to what's happening is that the tasks are still in 
progress while the event loop is finalizing, and the exception handler isn't 
called. But, I can't say that for sure without knowing the implementation of 
the Jupyter event loop.

For now, my recommended solution would be to include something like the above 
_cancel_all_tasks() or simply await your tasks at the end to ensure they are 
completed before the event loop is finalized. Alternatively, Jupyter could 
include something like that in their event loop finalization process, so that 
users don't have to include it on their own when using asyncio.

I would also consider using asyncio.run(), but I'm not certain if it works 
correctly in a Jupyter notebook. I'm aware that it's not always a viable option 
when it is desired to use an existing event loop instead of creating a separate 
one; that's why I'm not explicitly recommending it for this situation.

--
nosy: +aeros

___
Python tracker 

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



[issue40480] "fnmatch" exponential execution time

2020-05-03 Thread Tim Peters


Tim Peters  added the comment:

"The trick" with this kind of pattern is that a `*` should consume as little as 
possible to allow the next fixed portion to match.  Apply that at every stage, 
and it succeeds or it doesn't.  Backtracking can't change that outcome.  For, 
e.g., the shell pattern:

a*bc*d*

a regexp to do this without backtracking would be like this, IF Python's re 
engine supported "atomic groups" (but it doesn't):

a(?>.*?bc)(?>.*?d).*\Z

The same effect can be gotten in a more convoluted way, via positive lookahead 
assertions and backreferencing (which Python's re engine does support):

a(?=(.*?bc))\1(?=(.*?d))\2.*\Z

Assertions are "one and done":  if the overall match fails, assertions don't 
try alternatives.

So that's _a_ way to proceed.  I'm unclear on that it's worth it, though.  
Stuff like "*a*a*a*a*a*a*" is just hard to swallow as a shell pattern that 
would occur in real life.

--

___
Python tracker 

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



[issue13097] ctypes: segfault with large number of callback arguments

2020-05-03 Thread Furkan Onder


Furkan Onder  added the comment:

The issue continues in python 3.8.2.

--
nosy: +furkanonder

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

After Serhiy unlinked the linked PR, it did not happen again, so it may have 
been an one-off hiccup. I updated the description GH-19888 nevertheless.

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

In the title -> in the description

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think that may be happening because you are still refering to this issue in 
the title of
https://github.com/python/cpython/pull/19888?

Not sure how the linkage is made, but if this keeps happening you may open an 
issue in the core-workflow repo in the Python org.

--
nosy: +pablogsal

___
Python tracker 

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



[issue40489] INCREF/DECREFs around the rich comparison needs tests

2020-05-03 Thread Raymond Hettinger


New submission from Raymond Hettinger :

In Objects/dictobject.c, if I remove the INCREF/DECREF pair around 
PyObject_RichCompareBool(), all the tests still pass:

-   Py_INCREF(startkey);
cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
-   Py_DECREF(startkey);

It would be nice to have tests demonstrating why it is necessary.  IIRC the 
reason is that an object could have a custom comparison that clears the 
enclosing container and frees the element during the comparison.  

Also, it would be nice if PyObject_RichCompareBool() could be redesigned to not 
fail if a borrowed reference gets deallocated while the function is running.  
The incref and decref occur on a hot path, and it is unfortunate that they 
cause extra writes to objects scattered all over memory, likely causing a lot 
of cache misses in real programs.

--
assignee: serhiy.storchaka
components: Interpreter Core
messages: 367997
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: INCREF/DECREFs around the rich comparison needs tests

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -19201

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

PRs keep getting linked to this issue under my name, without me doing anything.

--

___
Python tracker 

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



[issue40256] Python 3.8 Not Launching on Bootcamp Windows 10.

2020-05-03 Thread Yusuf Mumtaz


Yusuf Mumtaz  added the comment:

Hello, I have just updated to the new version of python 3.8.3.
The problem still occurs however, now an interactive black window does appear 
when an attempt to open any Python file.

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19201
pull_request: https://github.com/python/cpython/pull/19888

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

I opened a pull request with an invalid bpo issue number so I unlinked it. Then 
a completely unrelated PR was is shown as linked by me, but I didn't do that. 
Unlinking that as well.

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests:  -19200

___
Python tracker 

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



[issue27035] Cannot set exit code in atexit callback

2020-05-03 Thread Glyph Lefkowitz


Glyph Lefkowitz  added the comment:

gwk, I absolutely agree; at this point that's the main thing I'm looking for.

But it would be great if whoever adds that documentation could include the 
rationale for this behavior too.  It still seems "obvious" to me that it should 
change the exit code, and every time I bump into this behavior I am freshly 
confused and have to re-read these bugs.  If I had a better intuition for what 
the error-handling *model* of atexit was, I think it might stick to memory a 
bit better.

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19200
pull_request: https://github.com/python/cpython/pull/19888

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests:  -19198

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
nosy: +lys.nikolaou
nosy_count: 3.0 -> 4.0
pull_requests: +19198
pull_request: https://github.com/python/cpython/pull/19888

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19199
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/19888

___
Python tracker 

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



[issue27035] Cannot set exit code in atexit callback

2020-05-03 Thread George King


George King  added the comment:

I think we should change the documentation to expand the parenthetical " 
(unless SystemExit is raised)" to a complete explanation of that special case.

--

___
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-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19197
pull_request: https://github.com/python/cpython/pull/19887

___
Python tracker 

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



[issue39643] Python calls newfstatat for "" in inspect

2020-05-03 Thread Ivan Babrou


Ivan Babrou  added the comment:

The issue in Salt should be fixed by the following PR:

* https://github.com/saltstack/salt/pull/57062

Still, I think Python itself could do better.

--

___
Python tracker 

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



[issue40488] setup.py shall search by default for libffi.so in /usr/local/lib64

2020-05-03 Thread Дилян Палаузов

New submission from Дилян Палаузов :

With libffi 3.3 doing `./configure && make install` puts  libffi.so in 
/usr/local/lib64/ . This can be found by pkgconfig.

But setup.py neither uses pkgconfig, nor checks by default /usr/local/lib64 for 
libffi

--
components: Build
messages: 367990
nosy: dilyan.palauzov
priority: normal
severity: normal
status: open
title: setup.py shall search by default for libffi.so in /usr/local/lib64
versions: Python 3.8

___
Python tracker 

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



[issue40487] Unexpected exception handler behavior in Jupyter when returning task objects created with create_task

2020-05-03 Thread John Smith


John Smith  added the comment:

Additional note:

In a almost identical set-up, the simple fact of assigning the task object to a 
variable:

`task = loop.create_task(coroutine())`

instead of just calling:

`loop.create_task(coroutine())`

...results in the same unexpected behavior in exception handling, without even 
attempting to return the task object.

--

___
Python tracker 

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



[issue40487] Unexpected exception handler behavior in Jupyter when returning task objects created with create_task

2020-05-03 Thread John Smith


Change by John Smith :


--
type:  -> behavior

___
Python tracker 

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



[issue40487] Unexpected exception handler behavior in Jupyter when returning task objects created with create_task

2020-05-03 Thread John Smith


New submission from John Smith :

Hi,

I'm running the following code in a Jupyter notebook (so there is already a 
running loop).

`run_coro` (non-async function) adds given coroutines to the loop with 
`loop.create_task`. I want to return the task objects created by 
`loop.create_task` to check for result later in the code.

Adding the task objects to a list and returning the list has the exception 
handler behave differently than expected.


```
async def test1():
''' Enumerate numbers from 1 to 9'''
n = 0
while (n := n + 1) < 10:
print(f'Test 1: {n}')
await asyncio.sleep(0.3)
return 'Test 1: DONE'


async def test2():
''' Enumerate numbers starting 1, raising exception at 5'''
n = 0
while (n := n + 1) < 10:
if n == 5:
raise ValueError('Test Exception')
print(f'Test 2: {n}')
await asyncio.sleep(0.2)


def handle_exception(loop, context):
if context['exception']:
print(f'Caught exception <{context["exception"]}> while executing 
{context["future"]}')


def run_coro(loop, coros):
loop.set_exception_handler(handle_exception)
tasks = deque()
for coro in coros:
task = loop.create_task(coro)
#tasks.append(task)
# ^--- if I uncomment, exc handler behaves strangely
return tasks
# ^-- BUT if I remove the "return" statement, it behaves correctly again


loop = asyncio.get_running_loop()   # retrieves Jupyter's running loop

tasks = run_coro(loop, [test1(), test2()])
```

Normal (expected output):

```
Test 1: 1
Test 2: 1
Test 2: 2
Test 1: 2
Test 2: 3
Test 1: 3
Test 2: 4
Caught exception  while executing :10> exception=ValueError('Test Exception')>
Test 1: 4
Test 1: 5
Test 1: 6
Test 1: 7
Test 1: 8
Test 1: 9
```

If I uncomment `tasks.append(task)` and return the list of task objects, output 
is:

```
Test 1: 1
Test 2: 1
Test 2: 2
Test 1: 2
Test 2: 3
Test 1: 3
Test 2: 4
Test 1: 4
Test 1: 5
Test 1: 6
Test 1: 7
Test 1: 8
Test 1: 9
```

If I re-run the code (re-run the Jupyter cell) the exception message would 
appear at the beginning of the output (as if it had been waiting in a queue 
somewhere), so for some reason it seems to get eaten-up somewhere.

The code works normally again if I remove the return statement from the 
`run_coro` function.

Is this expected behaviour? Am I missing something?

--
components: asyncio
messages: 367988
nosy: asvetlov, jeanmonet, yselivanov
priority: normal
severity: normal
status: open
title: Unexpected exception handler behavior in Jupyter when returning task 
objects created with create_task
versions: Python 3.8

___
Python tracker 

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



[issue40486] pathlib's iterdir doesn't specify what happens if directory content change

2020-05-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There is no principal difference between Path.iterdir() and os.listdir(). 
Somebody can change the directory during iteration. The only difference is that 
in the latter case you iterate in C instead of Python, so it is less easy to 
catch a race condition. What would happen is OS and FS specific. Depending on 
OS and FS it may be even possible to get the same name several times when 
somebody quickly creates and removes entities in the directory.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue38715] Regression in compileall ddir parameter when recursing

2020-05-03 Thread Filipe Laíns

Filipe Laíns  added the comment:

Nevermind! I ran it with my system python binary, which is patched to against 
this.

--

___
Python tracker 

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



[issue38870] Expose ast.unparse in the ast module

2020-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 493bf1cc316b0b5bd90779ecd1132878c881669e by Batuhan Taskaya in 
branch 'master':
bpo-38870: Don't start generated output with newlines in ast.unparse (GH-19636)
https://github.com/python/cpython/commit/493bf1cc316b0b5bd90779ecd1132878c881669e


--

___
Python tracker 

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



[issue38715] Regression in compileall ddir parameter when recursing

2020-05-03 Thread Filipe Laíns

Filipe Laíns  added the comment:

Can this be closed? I can't reproduce.

$ python -c 'from library.a.a import go; go()'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/a/a/__init__.py", line 2, in go
raise AssertionError('dummy')
AssertionError: dummy
$ python -c 'from library.a import go; go()'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/a/__init__.py", line 2, in go
raise AssertionError('dummy')
AssertionError: dummy
$ python -c 'from library import go; go()'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/__init__.py", line 2, in go
raise AssertionError('dummy')
AssertionError: dummy

--
nosy: +FFY00

___
Python tracker 

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



[issue40480] "fnmatch" exponential execution time

2020-05-03 Thread Tim Peters


Tim Peters  added the comment:

Note that doctest has the same kind of potential problem with matching ellipsis 
(0 or more characters) in expected output blocks.  Backtracking isn't needed at 
all to resolve patterns of that limited kind, but I don't think Python's re 
module supports enough gimmicks to disable backtracking.

So instead doctest has its own

_ellipsis_match()

function to do it in worst-case linear time.

--
nosy: +tim.peters

___
Python tracker 

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



[issue40486] pathlib's iterdir doesn't specify what happens if directory content change

2020-05-03 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pitrou
title: pathlib's iterdir doesn't expecify what happens if directory content 
change -> pathlib's iterdir doesn't specify what happens if directory content 
change

___
Python tracker 

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



[issue40480] "fnmatch" exponential execution time

2020-05-03 Thread kleshni


kleshni  added the comment:

>So the solution is to replace multiple asterisks with a single one
No, this is not a solution. This glob also hangs:

fnmatch.fnmatchcase("a" * 32, "*a" * 16 + "b")

And again, Bash and SQLite 3 work perfectly.

--

___
Python tracker 

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



[issue40486] pathlib's iterdir doesn't expecify what happens if directory content change

2020-05-03 Thread Facundo Batista


New submission from Facundo Batista :

Documentation for Path.iterdir ( 
https://docs.python.org/3/library/pathlib.html#pathlib.Path.iterdir ) doesn't 
specify what happens when the directory change.

This is important, as the function does NOT return a list (which would imply 
that a "snapshot" of the directory will be returned).

Also, it's not only relevant what would happen if somebody else changes the 
directory after the iteration is started (will that change be reflected?) but 
also if it's ALLOWED for the same code that iterates the dir content to change 
it (or problems would arise, like when changing a dictionary while being 
iterated).

--
assignee: docs@python
components: Documentation
messages: 367981
nosy: docs@python, facundobatista
priority: normal
severity: normal
status: open
title: pathlib's iterdir doesn't expecify what happens if directory content 
change
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



[issue40485] Provide an abstraction for a select-able Event

2020-05-03 Thread Filipe Laíns

Change by Filipe Laíns :


--
nosy: +FFY00

___
Python tracker 

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



[issue40482] _hashlib: register Python names as OpenSSL aliases

2020-05-03 Thread Christian Heimes


Christian Heimes  added the comment:

Yes, it changes the global state of libcrypto.

I consider the risk to other application slim to non-existing. Two cases are 
problematic:

1) an application relies on the fact that EVP_get_digestbyname("sha3_256") 
fails.
2) an application also uses EVP_add_digest_alias() but registers a different 
digest algorithm.

Both cases seem highly unlikely to me.

--

___
Python tracker 

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



[issue40482] _hashlib: register Python names as OpenSSL aliases

2020-05-03 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Adding aliases in openssl is presumably process global right? Is that wise
given it'd mean other openssl using c/c++ code in the process would now see
the same aliases and could behave differently when used with python vs
without?

On Sun, May 3, 2020, 3:55 AM Christian Heimes 
wrote:

>
> Change by Christian Heimes :
>
>
> --
> keywords: +patch
> pull_requests: +19193
> pull_request: https://github.com/python/cpython/pull/19880
>
> ___
> Python tracker 
> 
> ___
>

--

___
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-05-03 Thread Miro Hrončok

Miro Hrončok  added the comment:

Ah, sorry, I got it mixed up. Reported there.

--

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-05-03 Thread Miro Hrončok

Miro Hrončok  added the comment:

We also get:

  File "/usr/lib/python3.9/site-packages/dnf/comps.py", line 111
return'.'.join(lcl)
 ^
SyntaxError: invalid string prefix

--
nosy: +hroncok

___
Python tracker 

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



[issue40452] IDLE preserve clipboard on closure (Windows)

2020-05-03 Thread E. Paine


Change by E. Paine :


--
type:  -> enhancement

___
Python tracker 

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



[issue40468] IDLE split "general" into two tabs

2020-05-03 Thread E. Paine


Change by E. Paine :


--
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-05-03 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

This isn't related to this issue, but to bpo-40246. Please report it there as 
well.

--

___
Python tracker 

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



[issue40485] Provide an abstraction for a select-able Event

2020-05-03 Thread Faidon Liambotis


New submission from Faidon Liambotis :

In certain codebases, it's useful to be able to wait for input from one or more 
file descriptors (e.g. a socket), while at the same time waiting for an event 
triggered by another thread, or perhaps multiprocessing process.

To wait for one or more file descriptors to get ready, the select module can be 
used. However, neither threading.Event() nor multiprocessing.Event() are 
select-able, i.e. they provide no fileno() method.

The standard way one can implement this on Unix is with os.pipe(), but it can 
be tricky (forgetting to use non-blocking I/O etc.). It is also limited to a 
pair of processes at a time. On Linux systems from the past decade, one can 
also implement this much more efficiently using the eventfd() system calls. I 
think similar functionality exists in other Unixes with kqueue etc.

It'd be great if stdlib provided an abstraction over this mechanism. In fact, 
multiprocessing.Event() itself could probably be a thin abstraction over 
eventfd() on Linux? Perhaps even multiprocessing.Semaphore with EFD_SEMAPHORE, 
although I admit I'm less familiar with how all that works.

(Select-able Queues would be even neater, but that's a story for a different 
issue :)

--
components: Extension Modules
messages: 367975
nosy: paravoid
priority: normal
severity: normal
status: open
title: Provide an abstraction for a select-able Event
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-05-03 Thread Miro Hrončok

Miro Hrončok  added the comment:

We also get:

  File "/usr/lib/python3.9/site-packages/dnf/comps.py", line 111
return'.'.join(lcl)
 ^
SyntaxError: invalid string prefix

--
nosy: +hroncok

___
Python tracker 

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



[issue40468] IDLE split "general" into two tabs

2020-05-03 Thread E. Paine


Change by E. Paine :


Added file: https://bugs.python.org/file49118/tabs_wn.png

___
Python tracker 

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



[issue40468] IDLE split "general" into two tabs

2020-05-03 Thread E. Paine


Change by E. Paine :


Added file: https://bugs.python.org/file49119/tabs_wn_padx.png

___
Python tracker 

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



[issue40468] IDLE split "general" into two tabs

2020-05-03 Thread E. Paine


E. Paine  added the comment:

Initially, I simply changed the tab position on the settings window notebook to 
west-north (tabs_wn.png). I didn't like that the tabs were right-sticky and 
looked at changing this in the following two ways:

1) Changing the tab position to the right-side (tabs_en.png), though I believe 
they are too easy to miss in this place.

2) Setting the tab minimum width after measuring the titles using the tkinter 
default font (finding the largest of these and then adding an appropriate 
padding - for tabs_wn_padx.png, this was 10).
   This meant that tabs behaved as east-west sticky, and text was centred. I 
couldn't find how to change this to left-justified, though it is possible this 
can be done through a ttk layout.

Are there any other ideas?

If we do change the tab position, I think it would also be helpful to increase 
the font size to make them more obvious.

On a separate point, would it be better for me to upload future screenshots to 
an image hosting site and just include the link in the descriptor message?

--

___
Python tracker 

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



[issue40468] IDLE split "general" into two tabs

2020-05-03 Thread E. Paine


Change by E. Paine :


Added file: https://bugs.python.org/file49117/tabs_en.png

___
Python tracker 

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



[issue14106] Distutils manifest: recursive-(include|exclude) matches suffix instead of full filename

2020-05-03 Thread Marius Gedminas


Marius Gedminas  added the comment:

For the record, this is still a bug in Python 3.8 distutils (and it affects 
global-(include|exclude) as well), but it's been fixed in setuptools, so it 
shouldn't affect people writing MANIFEST.in files in 2020.

--
nosy: +mgedmin

___
Python tracker 

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



[issue40484] Document existing compiler flags under ast

2020-05-03 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue40484] Document existing compiler flags under ast

2020-05-03 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

PyCF_ALLOW_TOP_LEVEL_AWAIT, PyCF_TYPE_COMMENTS and PyCF_ONLY_AST should be 
documented just like CO_ flags under inspect module.

--
assignee: docs@python
components: Documentation
messages: 367972
nosy: BTaskaya, docs@python
priority: normal
severity: normal
status: open
title: Document existing compiler flags under ast
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



[issue14869] imaplib erronously quotes atoms such as flags

2020-05-03 Thread Zackery Spytz


Zackery Spytz  added the comment:

Python 2 is EOL.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue40447] compile_file's stripdir does not accept pathlib.Path

2020-05-03 Thread Filipe Laíns

Change by Filipe Laíns :


--
keywords: +patch
nosy: +FFY00
nosy_count: 2.0 -> 3.0
pull_requests: +19195
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19883

___
Python tracker 

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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-05-03 Thread hai shi


Change by hai shi :


--
pull_requests: +19194
pull_request: https://github.com/python/cpython/pull/19882

___
Python tracker 

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



[issue40483] Implementing a verifier function to verify integrity of AST nodes

2020-05-03 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

This is actually a problem that is existing for a long time. A recent example 
would be the discussion in the GH-19868.

Implementation
- It should check existence of all fields (like ast.Constant() wont verified)
- It should check types of all fields against their declarations in ASDL (this 
is actually depending on GH-19031) (like ast.List({ast.Constant(1)}, 
ctx=ast.Load()) wont pass, or the example in GH-19868)

After bpo-39981 resolved, I'll submit a patch.

--
components: Library (Lib)
messages: 367969
nosy: BTaskaya, pablogsal, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Implementing a verifier function to verify integrity of AST nodes
type: enhancement

___
Python tracker 

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



[issue40483] Implementing a verifier function to verify integrity of AST nodes

2020-05-03 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
dependencies: +Default values for AST Nodes

___
Python tracker 

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



[issue40482] _hashlib: register Python names as OpenSSL aliases

2020-05-03 Thread Christian Heimes


Change by Christian Heimes :


--
keywords: +patch
pull_requests: +19193
pull_request: https://github.com/python/cpython/pull/19880

___
Python tracker 

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



[issue40482] _hashlib: register Python names as OpenSSL aliases

2020-05-03 Thread Christian Heimes


New submission from Christian Heimes :

Python uses valid Python identifiers for hashing algorithms while OpenSSL uses 
slightly different default names. For example OpenSSL uses "SHA3-256" while 
Python has "sha3_256". The function py_digest_by_name() in _hashopenssl.c maps 
from Python names to EVP_MD pointer.

It's possible to simplify the lookup by registering Python's aliases with 
OpenSSL, e.g. EVP_add_digest_alias(SN_sha3_512, "sha3_512").

Also see https://github.com/openssl/openssl/issues/11715

--
assignee: christian.heimes
components: Library (Lib), SSL
messages: 367968
nosy: christian.heimes, gregory.p.smith
priority: normal
severity: normal
stage: patch review
status: open
title: _hashlib: register Python names as OpenSSL aliases
type: behavior
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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-05-03 Thread Chris Jerdonek


Change by Chris Jerdonek :


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



[issue20120] Percent-signs (%) in .pypirc should not be interpolated

2020-05-03 Thread Sviatoslav Sydorenko


Sviatoslav Sydorenko  added the comment:

Not sure if it's in the scope of this issue but I thought I'd report it.

I've just hit a similar issue with `setup.cfg` under Python 3.8 which is 
supposed to be parsed by `setuptools` but for some reason, I only see 
`distutils` in the trace, coming from `pip`.

```
$ python -m pip install --upgrade tox
ERROR: Exception:
Traceback (most recent call last):
  File 
"/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/cli/base_command.py",
 line 186, in _main
status = self.run(options, args)
  File 
"/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/commands/install.py",
 line 253, in run
options.use_user_site = decide_user_install(
  File 
"/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/commands/install.py",
 line 604, in decide_user_install
if site_packages_writable(root=root_path, isolated=isolated_mode):
  File 
"/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/commands/install.py",
 line 549, in site_packages_writable
test_writable_dir(d) for d in set(get_lib_location_guesses(**kwargs))
  File 
"/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/commands/install.py",
 line 543, in get_lib_location_guesses
scheme = distutils_scheme('', *args, **kwargs)
  File 
"/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/locations.py",
 line 109, in distutils_scheme
d.parse_config_files()
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/distutils/dist.py", 
line 413, in parse_config_files
val = parser.get(section,opt)
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/configparser.py", 
line 799, in get
return self._interpolation.before_get(self, section, option, value,
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/configparser.py", 
line 395, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/configparser.py", 
line 442, in _interpolate_some
raise InterpolationSyntaxError(
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', 
found: '%3Adevel\nCode of Conduct = 
https://docs.ansible.com/ansible/latest/community/code_of_conduct.html\nSource 
Code = https://github.com/ansible/pylibssh'
```
(https://github.com/ansible/pylibssh/runs/640262804?check_suite_focus=true#step:7:32)

This is caused by
```
diff --git a/setup.cfg b/setup.cfg
index 9318235..0455376 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -9,7 +9,7 @@ version = 0.0.1.dev1
 url = https://github.com/ansible/pylibssh
 project_urls =
 Bug Tracker = https://github.com/ansible/pylibssh/issues
-CI: Travis = https://travis-ci.com/ansible/pylibssh
+CI: GitHub Workflows = 
https://github.com/ansible/pylibssh/actions?query=branch%3Adevel
 Code of Conduct = 
https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
 Source Code = https://github.com/ansible/pylibssh
 description = Python bindings for libssh client specific to Ansible use case
```

--
nosy: +webknjaz

___
Python tracker 

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



[issue40481] Add include and exclude filters to zipapp cli

2020-05-03 Thread Jarosław Wygoda

Change by Jarosław Wygoda :


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

___
Python tracker 

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



[issue40481] Add include and exclude filters to zipapp cli

2020-05-03 Thread Jarosław Wygoda

New submission from Jarosław Wygoda :

Currently I can pass a filter function when creating archive but it's a bit 
cumbersome so I'd like to do it through cli.

Related issue:
https://bugs.python.org/issue31072

--
components: Library (Lib)
messages: 367966
nosy: Jarosław Wygoda
priority: normal
severity: normal
status: open
title: Add include and exclude filters to zipapp cli
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue40480] "fnmatch" exponential execution time

2020-05-03 Thread kleshni


New submission from kleshni :

Hello. The following code hangs:

import fnmatch
fnmatch.fnmatchcase("a" * 32, "*" * 16 + "b")

Measurements show that its execution time rises exponentially with the number 
of asterisks. Bash and SQLite 3 process this glob instantly.

This is because "fnmatchcase" generates a regular expression with repeated dots:

(?s:.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*b)\\Z

It's equivalent to:

(?s:.*b)\\Z

But works in exponential time. So the solution is to replace multiple asterisks 
with a single one, so the latter regexp is generated instead.

--
components: Library (Lib)
messages: 367963
nosy: kleshni
priority: normal
severity: normal
status: open
title: "fnmatch" exponential execution time
type: performance
versions: Python 3.8

___
Python tracker 

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



[issue40031] IDLE fails trying to inport old idlelib file names for config

2020-05-03 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Everything from AutoComplete onwards has been added somehow and must be removed.

The preliminary version of 3.8.3 was released last Wednesday.  When the final 
version is released in a week or two, I recommend upgrading and getting the 
untouched .def files.

I am leaving this issue open to revise the comments in the file and explain 
that except for the 4 back compatibility entries, there must only be sections 
for currently existing and loadable modules.

--
stage: test needed -> 

___
Python tracker 

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



[issue40479] Port _hashlib to OpenSSL 3.0.0

2020-05-03 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue40479] Port _hashlib to OpenSSL 3.0.0

2020-05-03 Thread Christian Heimes


New submission from Christian Heimes :

OpenSSL 3.0.0-alpha1 was releases about a week ago. OpenSSL 1.1.x APIs are 
still functional. However some APIs have been deprecated and FIPS 
(usedforsecurity flag) is no longer functional.

* One shot HMAC() is deprecated and should be replaced with EVP_MAC API calls
* ERR_func_error_string() is deprecated
* OpenSSL has introduced a new concept of crypto providers (OSSL_PROVIDER), 
library context (OPENSSL_CTX) and additional flags. A new function 
EVP_MD_fetch() has been introduced.
* FIPS support has been rewritten and is now shipped with OpenSSL 3.0.0. 
EVP_MD_CTX_FLAG_NON_FIPS_ALLOW is no longer supported. FIPS state is no longer 
part of EVP_MD_CTX but of EVP_MD.

See https://wiki.openssl.org/index.php/OpenSSL_3.0

--
assignee: christian.heimes
components: SSL
messages: 367962
nosy: christian.heimes, gregory.p.smith
priority: normal
severity: normal
status: open
title: Port _hashlib to OpenSSL 3.0.0
type: enhancement
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



[issue40416] Calling TextIOWrapper.tell() in the middle of reading a gb2312-encoded file causes UnicodeDecodeError

2020-05-03 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The commit referenced above is for #33578.  The symptoms for that issue were 
very similar, including involving a cjk codec.  The change was not backported 
because it was seen an enhancement.  Rob, if you try 3.8.2 or 3.8.3 (the 
release candidate was out Wednesday, the final probably next week or so) and 
still have the same problem, re-open this.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> cjkcodecs missing getstate and setstate implementations

___
Python tracker 

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



[issue9216] FIPS support for hashlib

2020-05-03 Thread Christian Heimes


Christian Heimes  added the comment:

_hashlib.get_fips_mode() is not compatible with new FIPS design in OpenSSL 
3.0.0:

  The function calls 'FIPS_mode()' and 'FIPS_mode_set()' are present in OpenSSL 
3.0 but always fail. You should rewrite your application to not use them.

https://wiki.openssl.org/index.php/OpenSSL_3.0#Upgrading_from_the_OpenSSL_2.0_FIPS_Object_Module

--

___
Python tracker 

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



[issue40031] IDLE fails trying to inport old idlelib file names for config

2020-05-03 Thread Saaheer Purav


Saaheer Purav  added the comment:

Here is the file.

--
Added file: https://bugs.python.org/file49116/config-extensions.def

___
Python tracker 

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



[issue40416] Calling TextIOWrapper.tell() in the middle of reading a gb2312-encoded file causes UnicodeDecodeError

2020-05-03 Thread Inada Naoki


Inada Naoki  added the comment:

I think this is not a bug, but a limitation of Python 3.7, and improvement in 
3.8.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue27035] Cannot set exit code in atexit callback

2020-05-03 Thread Glyph Lefkowitz


Glyph Lefkowitz  added the comment:

This bug has been filed several times:

issue1257
issue11654

and it's tempting to simply close this as a dup, but this ticket mentions the 
documentation, which is slightly confusing: 

https://docs.python.org/3.8/library/atexit.html#atexit.register

It's not *wrong* exactly; 3.8's behavior matches the letter of the 
documentation, but "the last exception to be raised is re-raised" *implies* a 
change in exit code, since that is what would normally happen if an exception 
were re-raised at the top level.

So would it be a good idea to change the documentation?

--

___
Python tracker 

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



[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-03 Thread Chris Jerdonek


Chris Jerdonek  added the comment:


New changeset 21893fbb74e8fde2931fbed9b511e2a41362b1ab by Chris Jerdonek in 
branch 'master':
bpo-29587: allow chaining NULL exceptions in _gen_throw() (GH-19877)
https://github.com/python/cpython/commit/21893fbb74e8fde2931fbed9b511e2a41362b1ab


--

___
Python tracker 

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