[issue42140] asyncio.wait function creates futures set two times

2020-10-26 Thread Justin Arthur


Justin Arthur  added the comment:

> So the behaviour you describe will happen anyway.
Unless we make your change against the 3.9 branch, in which case the fix will 
make it into the 3.9.x series of patch releases.

--

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



[issue42140] asyncio.wait function creates futures set two times

2020-10-26 Thread Justin Arthur


Justin Arthur  added the comment:

I believe the documentation may be referring to the English set and not a 
Python set, but I could be wrong.

Yury changed the wording from sequence to set in 3.7, but we didn't document a 
breaking change as far as I know. The purpose of those set constructions was to 
handle the many things other than a set that can be passed in that may have 
non-unique values. Early asyncio documentation included examples of passing 
wait() a list.

I wouldn't be surprised if there are other libraries or apps out there for 
which removing iterator support was an accidentally-breaking change and it may 
be strange if this is only is broken in 3.9.x, but working both before and 
after.

--

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



[issue42140] asyncio.wait function creates futures set two times

2020-10-26 Thread Justin Arthur


Justin Arthur  added the comment:

Your change makes perfect sense to me. It would be a backport-only change as 
the 2nd set creation is actually getting removed for the development version 
(3.10) to finalize the deprecation of wait's coroutine scheduling.

--
nosy: +JustinTArthur

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



[issue38912] test_asyncio altered the execution environment

2020-10-13 Thread Justin Arthur


Justin Arthur  added the comment:

The "'NoneType' object has no attribute 'close'" error is likely caused by a 
race against the loop calling the test protocol object's connection_made 
callback. I was able to reproduce this case occasionally on macOS and it's 
likely platform-agnostic. Given server/connection cleanup isn't context-managed 
or finally-driven on the affected tests, raising the NoneType error will skip 
cleanup and we see additional exceptions from unclosed networking components 
being garbage collected.

Tests using this test protocol pattern were either waiting for the callback 
already or were waiting on network i/o that happens long after connection 
establishment with the exception of:
- `test_create_server_ssl_verified`
- `test_create_unix_server_ssl_verified`

PR 22691 ensures those two tests wait for the connect callbacks as well.

This may not address the env changed error from recent msg378481, as the 
initial error is not necessarily disclosed in that log.

--

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



[issue38912] test_asyncio altered the execution environment

2020-10-13 Thread Justin Arthur


Change by Justin Arthur :


--
nosy: +JustinTArthur
nosy_count: 5.0 -> 6.0
pull_requests: +21662
pull_request: https://github.com/python/cpython/pull/22691

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



[issue33533] Provide an async iterator version of as_completed

2020-10-08 Thread Justin Arthur


Change by Justin Arthur :


--
versions: +Python 3.10 -Python 3.8

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



[issue33533] Provide an async iterator version of as_completed

2020-10-02 Thread Justin Arthur


Change by Justin Arthur :


--
title: Provide an async-generator version of as_completed -> Provide an async 
iterator version of as_completed

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



[issue33533] Provide an async-generator version of as_completed

2020-10-02 Thread Justin Arthur


Justin Arthur  added the comment:

Thanks, Hrvoje. I've updated the patch to match this bug's suggested format and 
have updated the documentation and What's New.

The one quirk that comes with the benefit of getting the same futures back is 
that we still allow both coroutines and futures to be passed in. Coroutines 
will not be yielded back in their original form, but instead a new task.

--

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



[issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks

2020-10-01 Thread Justin Arthur


Justin Arthur  added the comment:

Not sure if there is consensus on how to fix, but fixing #12731 will fix this 
for most of the cases I've seen complaints about as a side effect.

--

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



[issue33533] Provide an async-generator version of as_completed

2020-10-01 Thread Justin Arthur


Justin Arthur  added the comment:

I've added a new PR, PR 22491. This one has as_completed returning an iterator 
and includes tests for both the old and new style.

I see a trivial amount of latency added in extra call stack over Guido's 
original implementation. Should we decide to deprecate the 
plain-iterator-of-awaitables form, we can possibly regain that latency in 
refactoring this as an asynchronous generator.

--

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



[issue33533] Provide an async-generator version of as_completed

2020-10-01 Thread Justin Arthur


Change by Justin Arthur :


--
nosy: +JustinTArthur
nosy_count: 5.0 -> 6.0
pull_requests: +21508
pull_request: https://github.com/python/cpython/pull/22491

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



[issue12731] python lib re uses obsolete sense of \w in full violation of UTS#18 RL1.2a

2019-09-07 Thread Justin Arthur


Change by Justin Arthur :


--
nosy: +JustinTArthur

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



[issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks

2019-09-05 Thread Justin Arthur


Justin Arthur  added the comment:

Ned, can you confirm that 2to3 is not intended for cumulative/incremental runs 
over the same codebase?

If it's not intended to be run on previously ported code, this will just need 
to be fixed on the lib2to3 downstream projects like awpa and Black that are 
encountering this issue.

--

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



[issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks

2019-09-04 Thread Justin ARthur

New submission from Justin ARthur :

Python 3 code with an identifier that has a non-spacing mark in it does not get 
tokenized by lib2to3 and will result in an exception thrown in the parsing 
process.

Parsing the attached file (badvar.py), results in `ParseError: bad token: 
type=58, value='̇', context=('', (1, 1))`

This happens because the Name pattern regular expression in lib2to3 is `r'\w+'` 
and the word character class doesn't contain non-spacing marks (and possible 
other [continuation characters allowed in Python 3 
identifiers](https://docs.python.org/3/reference/lexical_analysis.html#identifiers)).

(reported by energizer in the Python IRC channel)

--
components: 2to3 (2.x to 3.x conversion tool), Library (Lib)
files: badvar.py
messages: 351153
nosy: JustinTArthur
priority: normal
severity: normal
status: open
title: lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file48592/badvar.py

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