[issue38636] IDLE regression: toggle tabs and change indent width functions

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 755caaa753577b907bb7e94560f8adf5eb694d6b by Miss Islington (bot) 
in branch '3.7':
bpo-38636: Fix IDLE tab toggle and file indent width (GH-17008)
https://github.com/python/cpython/commit/755caaa753577b907bb7e94560f8adf5eb694d6b


--
nosy: +miss-islington

___
Python tracker 

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



[issue38636] IDLE regression: toggle tabs and change indent width functions

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 132243957ce834cf5ffced4bf8e39d00f6e34e5f by Miss Islington (bot) 
in branch '3.8':
bpo-38636: Fix IDLE tab toggle and file indent width (GH-17008)
https://github.com/python/cpython/commit/132243957ce834cf5ffced4bf8e39d00f6e34e5f


--

___
Python tracker 

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



[issue38636] IDLE regression: toggle tabs and change indent width functions

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16768
pull_request: https://github.com/python/cpython/pull/17275

___
Python tracker 

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



[issue38636] IDLE regression: toggle tabs and change indent width functions

2019-11-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset b8462477bfd01ff21461065d5063e6b0238ca809 by Terry Jan Reedy in 
branch 'master':
bpo-38636: Fix IDLE tab toggle and file indent width (GH-17008)
https://github.com/python/cpython/commit/b8462477bfd01ff21461065d5063e6b0238ca809


--

___
Python tracker 

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



[issue38636] IDLE regression: toggle tabs and change indent width functions

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16767
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/17274

___
Python tracker 

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



[issue33046] IDLE option to strip trailing whitespace automatically on save

2019-11-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I want to add EOF newline stripping before making this automatic.  Otherwise, 
the new feature will give people a false sense that it is all taken care of.  I 
opened #38862 and hope to do it tomorrow.

I may then merge Zackary's PR with any still edits of existing code,  and make 
fixing the General tab and its Help page a new PR.

I am thinking to make the per file option toggle, under Options, analogous to 
Add/Hide Linenumbers, be 'Fix/Leave Whitespace' + 'on Save' if it does not make 
box too wide.

--
dependencies: +IDLE: Include end newlines in whitespace fix.
versions: +Python 3.7, Python 3.9

___
Python tracker 

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



[issue37367] octal escapes applied inconsistently throughout the interpreter and lib

2019-11-19 Thread Guido van Rossum


Guido van Rossum  added the comment:

For sure the Python tokenizer/parser should reject octal escapes that produce 
values >= 256. Certainly in bytes strings. Probably also in text strings 
(nobody using Unicode thinks in octal). This is ancient behavior though (it's 
the same in 2.7) so it may require a deprecation for the text string case. (For 
byte strings, it should become an error in 3.9 -- dropping the top bit is 
nonsensical.)

The regex parser should not be changed.

--

___
Python tracker 

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



[issue38862] IDLE: Include end newlines in whitespace fix.

2019-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: IDLE: Include end whitespace in whitespace fix. -> IDLE: Include end 
newlines in whitespace fix.

___
Python tracker 

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



[issue38862] IDLE: Include end whitespace in whitespace fix.

2019-11-19 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Format => Strip Trailing Whitespace should strip extra newlines at the end of 
the file after stripping each line, and make sure that there is at least one.  
The latter is done when saving, and that code can be reused.

--
assignee: terry.reedy
components: IDLE
messages: 357030
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: Include end whitespace in whitespace fix.
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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread Brandt Bucher

Brandt Bucher  added the comment:

Thanks Victor. These obviously aren’t urgent, so feel free to return to them 
whenever’s convenient.

I also pinged you on #17235 (_tracemalloc) too.

--

___
Python tracker 

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



[issue38712] add signal.pidfd_send_signal

2019-11-19 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 7483451577916e693af6d20cf520b2cc7e2174d2 by Benjamin Peterson in 
branch 'master':
closes bpo-38712: Add signal.pidfd_send_signal. (GH-17070)
https://github.com/python/cpython/commit/7483451577916e693af6d20cf520b2cc7e2174d2


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



[issue38765] `ast.AST._attributes` is used by `ast.dump()` but not documented

2019-11-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Nosying the ast experts, which I meant to do before.

--
nosy: +benjamin.peterson, brett.cannon, yselivanov

___
Python tracker 

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



[issue37367] octal escapes applied inconsistently throughout the interpreter and lib

2019-11-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I can't find who wrote this block treating octal escapes beginning with 4-7 the 
same as those beginning with 0-3. 

case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
c = s[-1] - '0';
if (s < end && '0' <= *s && *s <= '7') {
c = (c<<3) + *s++ - '0';
if (s < end && '0' <= *s && *s <= '7')
c = (c<<3) + *s++ - '0';
}
*p++ = c;
break;

Antoine Pitrou merged from somewhere in 2010 and Christiqn Heimes renamed 
something in 2008 and before that, ???. Guido wrote the initial bytesobject.c 
in 2006.

Guido, do you agree that the current behavior, treating the same int 
differently when input into a bytes in different ways, is a bug, and if so, 
should we backport the fix?

>>> b'\407'
b'\x07'
>>> bytes((0o407,))
Traceback (most recent call last):
  File "", line 1, in 
bytes((0o407,))
ValueError: bytes must be in range(0, 256)

--
nosy: +gvanrossum

___
Python tracker 

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



[issue38855] test_unpack.py does not catch the unpacking of a set

2019-11-19 Thread Zachary Ware


Zachary Ware  added the comment:

It's not clear what you're asking for here.  Your example works, though the 
contents of `a` and `c` will each be an arbitrary member of S and `b` the rest 
of the members of S and you have no guarantee of what you'll get.  If you want 
to be sure of what each name will be attached to, just do `a, *b, c = 
sorted(S)`.

--
nosy: +zach.ware

___
Python tracker 

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



[issue38853] set.repr breaches docstring contract

2019-11-19 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

To be clear, the docstring is explicitly disclaiming any ordering contract. If 
you're reading "unordered" as meaning "not reordered" (like a list or tuple, 
where the elements appear in insertion order), that's not what "unordered" 
means here. It means "arbitrary order". As it happens, the hashcodes of small 
integers correspond to their numerical values, (mostly, -1 is a special case), 
so if no collisions occur and the numbers are sequential, the ordering will 
often look like it was sorted in semi-numerical order, as in your case.

That doesn't mean it's performing sorting, it just means that's how the hashes 
happened to distribute themselves across the buckets in the set. A different 
test case with slightly more distributed numbers won't create the impression of 
sorting:

>>> print({-5, -1, 13, 17})
{17, -5, 13, -1}

For the record, I chose that case to use CPython implementation details to 
produce a really unordered result (all the numbers are bucketed mod 8 in a set 
that small, and this produces no collisions, with all values mod 8 different 
from the raw value). On other versions of CPython, or alternate interpreters, 
both your case and mine could easily come out differently.

Point is, this isn't a bug, just a quirk in the small int hash codes.

Steven: I think they thought it was sorted in some string-related way, 
explaining (to them) why -1 was out of place (mind you, if it were string 
sorted, -1 would come first since the minus sign is ASCIIbetically first, 19 
would fall between 1 and 2, and 25 between 2 and 3, so it doesn't hold up).

There's no bug here.

--
nosy: +josh.r
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



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

2019-11-19 Thread Tzu-ping Chung


Change by Tzu-ping Chung :


--
nosy: +uranusjr

___
Python tracker 

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



[issue38861] zipfile: Corrupts filenames containing non-UTF8 characters

2019-11-19 Thread John Goerzen


New submission from John Goerzen :

The zipfile.py standard library component contains a number of pieces of 
questionable handling of non-UTF8 filenames.  As the ZIP file format predated 
Unicode by a significant number of years, this is actually fairly common with 
older code.

Here is a very simple reproduction case. 

mkdir t
cd t
echo hi > `printf 'test\xf7.txt'`
cd ..
zip -9r t.zip t

0xf7 is the division sign in ISO-8859-1.  In the "t" directory, "ls | hd" 
displays:

  74 65 73 74 f7 2e 74 78  74 0a|test..txt.|
000a


Now, here's a simple Python3 program:

import zipfile

z = zipfile.ZipFile("t.zip")
z.extractall()

If you run this on the relevant ZIP file, the 0xf7 character is replaced with a 
Unicode sequence; "ls | hd" now displays:

  74 65 73 74 e2 89 88 2e  74 78 74 0a  |testtxt.|
000c

The impact within Python programs is equally bad.  Fundamentally, the zipfile 
interface is broken; it should not try to decode filenames into strings and 
should instead treat them as bytes and leave potential decoding up to 
applications.  It appears to try, down various code paths, to decode filenames 
as ascii, cp437, or utf-8.  However, the ZIP file format was often used on Unix 
systems as well, which didn't tend to use cp437 (iso-8859-* was more common).  
In short, there is no way that zipfile.py can reliably guess the encoding of a 
filename in a ZIP file, so it is a data-loss bug that it attempts and fails to 
do so.  It is a further bug that extractall mangles filenames; unzip(1) is 
perfectly capable of extracting these files correctly.  I'm attaching this zip 
file for reference.

At the very least, zipfile should provide a bytes interface for filenames for 
people that care about correctness.

--
files: t.zip
messages: 357023
nosy: jgoerzen
priority: normal
severity: normal
status: open
title: zipfile: Corrupts filenames containing non-UTF8 characters
type: behavior
Added file: https://bugs.python.org/file48724/t.zip

___
Python tracker 

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



[issue38860] GenericPyCData_new does not invoke new or init

2019-11-19 Thread Justin Capella


New submission from Justin Capella :

When subclassing the ctypes.Structure class, __new__ and __init__ are not 
invoked when using the inherited classmethod from_buffer_copy to create the 
object.

I think this is because tp_alloc is ultimately used by GenericPyCData_new when 
creating the object using the from_buffer_copy classmethod inherited from 
_CData.

https://github.com/python/cpython/blob/be143ec99674ba38c5811f34cdb85ef39c2dc8f8/Modules/_ctypes/_ctypes.c#L3202

Expected behavior: creation of Structure subclass object would invoke __new__ 
and possibly __init__.

--
components: ctypes
files: ctypesnew.py
messages: 357022
nosy: b1tninja
priority: normal
severity: normal
status: open
title: GenericPyCData_new does not invoke new or init
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48723/ctypesnew.py

___
Python tracker 

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



[issue38835] pyfpe.h: Exclude PyFPE_START_PROTECT and PyFPE_END_PROTECT from the Py_LIMITED_API

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset be143ec99674ba38c5811f34cdb85ef39c2dc8f8 by Victor Stinner in 
branch 'master':
bpo-38835: Don't use PyFPE_START_PROTECT and PyFPE_END_PROTECT (GH-17231)
https://github.com/python/cpython/commit/be143ec99674ba38c5811f34cdb85ef39c2dc8f8


--

___
Python tracker 

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



[issue38847] AST Optimization for Single Target List Comprehension

2019-11-19 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I concur with Pablo.

Thank you for the suggestion though.

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

The Azure Pipelines are sick tonight (unable to publish test results). PR 
#17272 and PR #17271 are blocked by this CI.

--

___
Python tracker 

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



[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16766
pull_request: https://github.com/python/cpython/pull/17273

___
Python tracker 

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



[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-19 Thread David Cuthbert


David Cuthbert  added the comment:

FreeBSD 12.1 and MacOS 10.15.1 (Catalina) appear to have saner and safer 
behavior.

Both require the use of SO_REUSEPORT for this behavior to happen as well. 
FreeBSD also requires the UID to be the same or 0 for subsequent processes to 
make the bind() call. I'll call this out as being Linux-specific in the 
deprecation message for now. (I don't have an AIX, HP-UX, or Solaris system 
handy to test, nor do I really want one if I'm being honest. :-) .)

--

___
Python tracker 

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



[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 01b1cc12e7c6a3d6a3d27ba7c731687d57aae92a by Victor Stinner in 
branch 'master':
bpo-36710: Add PyInterpreterState.runtime field (GH-17270)
https://github.com/python/cpython/commit/01b1cc12e7c6a3d6a3d27ba7c731687d57aae92a


--

___
Python tracker 

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



[issue37957] Allow regrtest to receive a file with test (and subtests) to ignore

2019-11-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ok, I reopen until the backports

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue37957] Allow regrtest to receive a file with test (and subtests) to ignore

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

I'm trying to keep regrtest in sync between 3.7, 3.8 and master branches. Maybe 
backport this change to 3.7 and 3.8 branches once buildbots validated the 
change? I'm keeping them in sync mostly to make bugfixes easier, but also to 
make my life easier when I debug issues in 3.7 or 3.8 branch.

--

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 33b671e72450bf4b5a946ce0dde6b7fe21150108 by Victor Stinner 
(Brandt Bucher) in branch 'master':
bpo-38823: Fix refleak in marshal init error path (GH-17260)
https://github.com/python/cpython/commit/33b671e72450bf4b5a946ce0dde6b7fe21150108


--

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16765
pull_request: https://github.com/python/cpython/pull/17272

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16764
pull_request: https://github.com/python/cpython/pull/17271

___
Python tracker 

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



[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2019-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16763
pull_request: https://github.com/python/cpython/pull/17270

___
Python tracker 

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



[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2e96906da764402b4c8062dbf99171ca506f9e12 by Victor Stinner in 
branch 'master':
bpo-36710: Pass tstate parameter to GC collect() (GH-17267)
https://github.com/python/cpython/commit/2e96906da764402b4c8062dbf99171ca506f9e12


--

___
Python tracker 

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



[issue36287] Make ast.dump() not output optional default fields

2019-11-19 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

No objections from me assuming you are going forward along the way proposed by 
Serhiy (i.e. only skip values for certain fields if value is the default, not a 
blanket skip for all Nones and empty lists).

--

___
Python tracker 

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



[issue38859] AsyncMock says it raises StopIteration but that is Impossible

2019-11-19 Thread Jason Fried


Change by Jason Fried :


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

___
Python tracker 

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



[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2019-11-19 Thread Jason Fried


Change by Jason Fried :


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

___
Python tracker 

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



[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-19 Thread David Cuthbert


David Cuthbert  added the comment:

I'm working on patches for the deprecation bits (targeting 3.6 for now; will 
work my way up from there) for review, including documentation. Unless someone 
tells me to stop. :-)

In an attempt to make this not-so-Linux-specific, I'm reviewing how this works 
on non-Linux platforms (MacOS, FreeBSD) as well.

Reading Linux's socket(7) man page makes it seem like reuse_port is the issue 
(but that actually has protections to ensure you're only doing it across the 
same UID at least). I had to write my own test jig to (re-)convince myself 
that, indeed, reuse_addr is the problem.

--

___
Python tracker 

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



[issue38753] AsyncMock not cited as new in 3.8

2019-11-19 Thread Lisa Roach


Lisa Roach  added the comment:


New changeset 279d8df5e5e8bbd4429420649359f7afcb4c8cce by Lisa Roach (John 
Belmonte) in branch 'master':
bpo-38753: AsyncMock added in version 3.8 (GH-17102)
https://github.com/python/cpython/commit/279d8df5e5e8bbd4429420649359f7afcb4c8cce


--

___
Python tracker 

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



[issue38753] AsyncMock not cited as new in 3.8

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16760
pull_request: https://github.com/python/cpython/pull/17268

___
Python tracker 

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



[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2019-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16759
pull_request: https://github.com/python/cpython/pull/17267

___
Python tracker 

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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 444b39bb64aa894d3f1831210a8ce40042a5a532 by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in handle_legacy_finalizers() (GH-17266)
https://github.com/python/cpython/commit/444b39bb64aa894d3f1831210a8ce40042a5a532


--

___
Python tracker 

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



[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2019-11-19 Thread Jason Fried


Change by Jason Fried :


--
type:  -> behavior

___
Python tracker 

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



[issue38859] AsyncMock says it raises StopIteration but that is Impossible

2019-11-19 Thread Jason Fried


New submission from Jason Fried :

If an AsyncMock uses a side_effect that is an Iterable, if called more than 
items exist its suppose to raise StopIteration according to the docs but PEP 
479 says that is impossible. 

My Suggestion is that we update the docs and the code to Raise a 
StopAsyncIteration since it will not be converted to a RuntimeError

--
components: Library (Lib)
messages: 357008
nosy: fried, lisroach
priority: normal
severity: normal
status: open
title: AsyncMock says it raises StopIteration but that is Impossible
type: behavior
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



[issue38847] AST Optimization for Single Target List Comprehension

2019-11-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

IMHO, I think is such a specific use case that is not worth the maintenance 
cost. Especially because of such list comprehension is very uncommon as you can 
simply do `list(it)` which more readable and anecdotally faster.

--
nosy: +pablogsal

___
Python tracker 

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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16758
pull_request: https://github.com/python/cpython/pull/17266

___
Python tracker 

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



[issue37957] Allow regrtest to receive a file with test (and subtests) to ignore

2019-11-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue37957] Allow regrtest to receive a file with test (and subtests) to ignore

2019-11-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset e0cd8aa70a3ce19c3d3712568940aa0cbd9aa97b by Pablo Galindo in 
branch 'master':
bpo-37957: Allow regrtest to receive a file with test (and subtests) to ignore 
(GH-16989)
https://github.com/python/cpython/commit/e0cd8aa70a3ce19c3d3712568940aa0cbd9aa97b


--

___
Python tracker 

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



[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ef5aa9af7c7e493402ac62009e4400aed7c3d54e by Victor Stinner in 
branch 'master':
bpo-38858: Reorganize pycore_init_types() (GH-17265)
https://github.com/python/cpython/commit/ef5aa9af7c7e493402ac62009e4400aed7c3d54e


--

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset a5ed2fe0eedefa1649aa93ee74a0bafc8e628a10 by Miss Islington (bot) 
in branch '3.8':
bpo-38823: Fix refleaks in faulthandler init error path on Windows (GH-17250)
https://github.com/python/cpython/commit/a5ed2fe0eedefa1649aa93ee74a0bafc8e628a10


--

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 5bd2af9c79796aa03b06d1e35ab6df7e28364e24 by Miss Islington (bot) 
in branch '3.7':
bpo-38823: Fix refleaks in faulthandler init error path on Windows (GH-17250)
https://github.com/python/cpython/commit/5bd2af9c79796aa03b06d1e35ab6df7e28364e24


--

___
Python tracker 

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



[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-19 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16756
pull_request: https://github.com/python/cpython/pull/17264

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16755
pull_request: https://github.com/python/cpython/pull/17263

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ac2235432c607ce2c0faf6dff5d9b2534d2f6652 by Victor Stinner 
(Brandt Bucher) in branch 'master':
bpo-38823: Fix refleaks in faulthandler init error path on Windows (GH-17250)
https://github.com/python/cpython/commit/ac2235432c607ce2c0faf6dff5d9b2534d2f6652


--
nosy: +vstinner

___
Python tracker 

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



[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-19 Thread STINNER Victor


New submission from STINNER Victor :

Currently, new_interpreter() is a subset of Py_InitializeFromConfig(): the code 
was duplicated. I would prefer that both functions stay in sync and so that 
new_interpreter() reuses more Py_InitializeFromConfig() code.

--
components: Interpreter Core
messages: 357001
nosy: vstinner
priority: normal
severity: normal
status: open
title: new_interpreter() should reuse more Py_InitializeFromConfig() code
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



[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2019-11-19 Thread Jason Fried


New submission from Jason Fried :

If you are trying to use AsyncMock to mock a coroutine that returns awaitable 
objects, AsyncMock awaits on those objects instead of returning them as is. 

Example:
  mock = AsyncMock(return_value=asyncio.Future())
  v = await mock()  # blocks on trying to await the future

Expected:
  mock = AsyncMock(return_value=asyncio.Future())
  v = await mock()
  assert isisnstance(v, asyncio.Future)

This problem affects side_effects and wraps.

--
components: Library (Lib)
messages: 357000
nosy: fried, lisroach
priority: normal
severity: normal
status: open
title: AsyncMock issue with awaitable return_value/side_effect/wraps
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



[issue33125] Windows 10 ARM64 platform support

2019-11-19 Thread Dan


Dan  added the comment:

According to this -
https://wiki.tcl-lang.org/page/Building+with+Visual+Studio+2017
the issue will be fixed in the next version (8.6.10). TLDR explanation: Tcl/Tk 
has variables with names that are now reserved keywords in VS2017, meaning that 
it can't be build with recent compilers and since VS2017 is the first compiler 
that has official ARM64 support it means that it currently can't be built for 
that target.
Anyway when version 8.6.10 is eventually released then it should (hopefully) 
build fine with the current scripts.
Maybe we can add it later when that happens?

--

___
Python tracker 

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



[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the fix. That was an interesting bug ;-) I like the simplicity of 
the fix.

--

___
Python tracker 

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



[issue38853] set.repr breaches docstring contract

2019-11-19 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I'm sorry, I don't understand what part of the documentation you think is 
violated here. The docs say that sets are unordered, but of course when 
printing the elements have to be given in *some* order.

The given output seems unordered to me: -1 is smaller than 25, but it appears 
last in the output.

The specific order you see will depend on the specific values in the set, as 
well as the order that they were inserted, deleted, and/or re-inserted in some 
arbitrary way. For example:

>>> repr({4, 5, 2**31+1, 2, 2**31+2, 3, 2**31, 0})
'{0, 2147483648, 2, 3, 2147483650, 2147483649, 5, 4}'


I don't think there is a bug here. Can you explain what you think the bug is, 
in detail please?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue38856] wait_closed() can raise ConnectionResetError

2019-11-19 Thread Yury Selivanov


New submission from Yury Selivanov :

The exception should probably be just ignored.  Andrew, thoughts?

Here's an example error traceback:

  Traceback (most recent call last):
File "c:\projects\asyncpg\asyncpg\connection.py", line 1227, in _cancel
  await w.wait_closed()
File "C:\Python38\lib\asyncio\streams.py", line 376, in wait_closed
  await self._protocol._get_close_waiter(self)
File "c:\projects\asyncpg\asyncpg\connection.py", line 1202, in _cancel
  await r.read()  # Wait until EOF
File "C:\Python38\lib\asyncio\streams.py", line 694, in read
  block = await self.read(self._limit)
File "C:\Python38\lib\asyncio\streams.py", line 701, in read
  await self._wait_for_data('read')
File "C:\Python38\lib\asyncio\streams.py", line 534, in _wait_for_data
  await self._waiter
File "C:\Python38\lib\asyncio\proactor_events.py", line 280, in 
_loop_reading
  data = fut.result()
File "C:\Python38\lib\asyncio\windows_events.py", line 808, in _poll
  value = callback(transferred, key, ov)
File "C:\Python38\lib\asyncio\windows_events.py", line 457, in 
finish_recv
  raise ConnectionResetError(*exc.args)
  ConnectionResetError: [WinError 64] The specified network name is no 
longer available

--
messages: 356996
nosy: asvetlov, lukasz.langa, yselivanov
priority: release blocker
severity: normal
status: open
title: wait_closed() can raise ConnectionResetError
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



[issue38841] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2019-11-19 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Please feel free to make a PR for applying @skip_unless_bind_unix_socket 
decorator.

--

___
Python tracker 

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



[issue38855] test_unpack.py does not catch the unpacking of a set

2019-11-19 Thread Cat Chenal


New submission from Cat Chenal :

S = {19,8,-1,25,0,1,2,3,4,5,6,7}

a, *b, c = S
print('a:', a)
print('b:', b)
print('c:', c)

Output:
a: 0
b: [1, 2, 3, 4, 5, 6, 7, 8, 19, 25]
c: -1

Either test_unpack.py needs a test for "non-indexable object" to prevent this 
unpacking of a non-sequence, or the unpacking of a set should be implemented 
(granted the ordered repr of a set is changed to unordered, see Issue38853).

Being able to "unpack" a set would be nice to have, imho, because one would use 
that operation to obtain a partition (over unordered elements).

--
components: Tests, ctypes
messages: 356994
nosy: Ylem
priority: normal
severity: normal
status: open
title: test_unpack.py does not catch the unpacking of a set
versions: Python 3.6

___
Python tracker 

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



[issue38854] Decorator breaks inspect.getsource

2019-11-19 Thread Guido Imperiale


New submission from Guido Imperiale :

Python 3.7.5 and 3.8.0
A decorator causes inspect.getsource() to return clipped output:



from collections import defaultdict
from functools import wraps
import inspect


def foo(*args):
def decorator(func):
@wraps(func)
def wrapper():
pass
return wrapper
return decorator


@foo(dict(), defaultdict(lambda: 1))
def f():
pass


print(inspect.getsource(f))



Output:

@foo(dict(), defaultdict(lambda: 1))

Expected output:

@foo(dict(), defaultdict(lambda: 1))
def f():
pass


These changes to the decorator parameters cause the problem to disappear:

- @foo({}, defaultdict(lambda: 1))
- @foo(dict(), defaultdict(list))

--
messages: 356993
nosy: crusaderky
priority: normal
severity: normal
status: open
title: Decorator breaks inspect.getsource
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-19 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Thank you Jake for the report and PR!

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



[issue38853] set.repr breaches docstring contract

2019-11-19 Thread Cat Chenal


New submission from Cat Chenal :

S = {19,8,-1,25,0,1,2,3,4,5,6,7}
print('Set S = {{19,8,-1,25,0,1,2,3,4,5,6,7}}')

The set is represented by a new string-ordered set:
print(f'Its repr is:\n{S}\n')
Output:
{0, 1, 2, 3, 4, 5, 6, 7, 8, 19, 25, -1}

This is a breach of the contract stated in the docstring: "Build an unordered 
collection of unique elements."

--
components: ctypes
messages: 356991
nosy: Ylem
priority: normal
severity: normal
status: open
title: set.repr breaches docstring contract
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue26278] BaseTransport.close() does not trigger connection_lost()

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

If a bug cannot be reproduced, it cannot be fixed. So I close the issue ;-)

--
resolution:  -> out of date
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



[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 829593a9262e67c72167c6cb20d383203b2ea410 by Miss Islington (bot) 
in branch '3.8':
bpo-38707: Fix for multiprocessing.Process MainThread.native_id (GH-17088)
https://github.com/python/cpython/commit/829593a9262e67c72167c6cb20d383203b2ea410


--

___
Python tracker 

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



[issue38852] test_recursion_limit in test_threading crashes with SIGSEGV on android

2019-11-19 Thread Xavier de Gaye


New submission from Xavier de Gaye :

Actually it is the script that is spawned by test_recursion_limit that crashes 
with SIGSEGV on android API 24. Lowering the recursion limit in the script from 
1000 to 100 with sys.setrecursionlimit() fixes the problem.

Here is the error:

generic_x86_64:/data/local/tmp/python $ python -m test -v test_threading -m 
test_recursion_limit   
== CPython 3.9.0a0 (heads/abifa-dirty:cf805c25e6, Nov 18 2019, 16:40:26) [Clang 
8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
== Linux-3.10.0+-x86_64-with-libc little-endian
== cwd: /data/local/tmp/python/tmp/test_python_4603
== CPU count: 2
== encodings: locale=UTF-8, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/1] test_threading
test_recursion_limit (test.test_threading.ThreadingExceptionTests) ... FAIL

==
FAIL: test_recursion_limit (test.test_threading.ThreadingExceptionTests)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_threading.py", line 
1086, in test_recursion_limit
self.assertEqual(p.returncode, 0, "Unexpected error: " + stderr.decode())
AssertionError: -11 != 0 : Unexpected error: 

--

Ran 1 test in 0.148s

FAILED (failures=1)
test test_threading failed
test_threading failed

== Tests result: FAILURE ==

1 test failed:
test_threading

Total duration: 354 ms
Tests result: FAILURE

--
components: Tests
messages: 356988
nosy: xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: test_recursion_limit in test_threading crashes with SIGSEGV on android
type: crash
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



[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16754
pull_request: https://github.com/python/cpython/pull/17261

___
Python tracker 

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



[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset c6b20be85c0de6f2355c67ae6e7e578941275cc0 by Miss Islington (bot) 
(Jake Tesler) in branch 'master':
bpo-38707: Fix for multiprocessing.Process MainThread.native_id (GH-17088)
https://github.com/python/cpython/commit/c6b20be85c0de6f2355c67ae6e7e578941275cc0


--
nosy: +miss-islington

___
Python tracker 

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



[issue38839] Fix some unused functions in test suite

2019-11-19 Thread Brett Cannon


Change by Brett Cannon :


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

___
Python tracker 

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



[issue38839] Fix some unused functions in test suite

2019-11-19 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 892221bfa04a41cf581f988ba19dc263f557e157 by Brett Cannon (Adam 
Johnson) in branch 'master':
bpo-38839: Fix some unused functions in tests (GH-17189)
https://github.com/python/cpython/commit/892221bfa04a41cf581f988ba19dc263f557e157


--
nosy: +brett.cannon

___
Python tracker 

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



[issue38839] Fix some unused functions in test suite

2019-11-19 Thread Brett Cannon


Change by Brett Cannon :


--
title: Some unused functions in test suite -> Fix some unused functions in test 
suite

___
Python tracker 

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



[issue38851] UDPLITE tests fail on android

2019-11-19 Thread Xavier de Gaye


New submission from Xavier de Gaye :

Attached test_socket.txt is the output of running 'python -m test -v 
test_socket' on android API 24. The 108 tests in error are UDPLITE tests 
introduced in issue #37345.

--
components: Tests
files: test_socket.txt
messages: 356985
nosy: asvetlov, gappleto97, xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: UDPLITE tests fail on android
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file48722/test_socket.txt

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread Thomas Wouters


Thomas Wouters  added the comment:


New changeset 54b32c987146123f2237f0e21b1d02b1c1ebdf6f by T. Wouters (Brandt 
Bucher) in branch 'master':
bpo-38823: Clean up refleak in fcntl module initialization. (GH-17236)
https://github.com/python/cpython/commit/54b32c987146123f2237f0e21b1d02b1c1ebdf6f


--
nosy: +twouters

___
Python tracker 

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



[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-19 Thread Fabio Zadrozny


Fabio Zadrozny  added the comment:

@Bret

I don't really see a problem in breaking the API in major releases (so, having 
access for it in the internal API but without a backwards-compatibility 
guarantee seems like a good fit for me).

--

___
Python tracker 

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



[issue26278] BaseTransport.close() does not trigger connection_lost()

2019-11-19 Thread Sümer Cip

Sümer Cip  added the comment:

Closing the issue seems like a good idea: as it seems nobody seems to have 
spotted similar issue and I have only been able to reproduce it in Python 3.4. 

Just for future ref.: The uncommon thing is that the server I was using is a 
TCP game server holding long-running connections as opposed to short-lived HTTP 
connections, maybe there is a very random issue at the core but as it is 
happening very randomly.

--

___
Python tracker 

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



[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-19 Thread Brett Cannon


Brett Cannon  added the comment:

I think the real question is whether this is part of the CPython public API or 
the CPython internal API.

@Fabio how burdensome would it be if we placed this in the internal API that 
you can get access to but we don't make backwards-compatibility guarantees 
about? For instance, Victor wants to start passing in thread state which will 
change the API for 3.9, but we wouldn't expect to change it in a bugfix release.

--

___
Python tracker 

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



[issue35943] PyImport_GetModule() can return partially-initialized module

2019-11-19 Thread Brett Cannon


Brett Cannon  added the comment:

I've assigned this to Joannah to decide if she wants to backport this.

--
assignee:  -> nanjekyejoannah
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue38841] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2019-11-19 Thread Xavier de Gaye


Xavier de Gaye  added the comment:

No, it is the SELinux configuration on android devices that forbids binds to 
named UNIX sockets. Changing from a named UNIX socket to an unnamed UNIX socket 
would fix the problem. I don't know if all platforms support unnamed UNIX 
sockets.

The fix in issue #28684 (referenced in the OP) provides a new decorator to skip 
the test for platforms such as android.

--

___
Python tracker 

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



[issue38841] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2019-11-19 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Do I understand you correctly: is Android forbids UDP Unix sockets for non-root 
user?
Maybe the socket path should point on another location to get the test passed?

--

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +16753
pull_request: https://github.com/python/cpython/pull/17260

___
Python tracker 

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



[issue38850] test_largefile fails on android

2019-11-19 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

I got the same failures on Fedora rawhide. See 
https://bugs.python.org/issue37096

--
nosy: +cstratak

___
Python tracker 

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



[issue38850] test_largefile fails on android

2019-11-19 Thread Xavier de Gaye


New submission from Xavier de Gaye :

The failure on andoid API 24:

generic_x86_64:/data/local/tmp/python $ python -m test -v test_largefile -m 
test_it
== CPython 3.9.0a0 (heads/abifa-dirty:cf805c25e6, Nov 18 2019, 16:40:26) [Clang 
8.0.2 (https://andro
id.googlesource.com/toolchain/clang 40173bab62ec7462
== Linux-3.10.0+-x86_64-with-libc little-endian
== cwd: /data/local/tmp/python/tmp/test_python_2626
== CPU count: 2
== encodings: locale=UTF-8, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/1] test_largefile
test_it (test.test_largefile.TestCopyfile) ... ERROR
test_it (test.test_largefile.TestSocketSendfile) ... Exception in thread 
Thread-1:
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/threading.py", line 944, in 
_bootstrap_inner
self.run()
  File "/data/local/tmp/python/lib/python3.9/threading.py", line 882, in run
self._target(*self._args, **self._kwargs)
  File "/data/local/tmp/python/lib/python3.9/test/test_largefile.py", line 193, 
in run
f.write(chunk)
OSError: [Errno 28] No space left on device
ERROR

==
ERROR: test_it (test.test_largefile.TestCopyfile)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_largefile.py", line 160, 
in test_it
shutil.copyfile(TESTFN, TESTFN2)
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 270, in copyfile
_fastcopy_sendfile(fsrc, fdst)
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 163, in 
_fastcopy_sendfile
raise err from None
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 149, in 
_fastcopy_sendfile
sent = os.sendfile(outfd, infd, offset, blocksize)
OSError: [Errno 28] No space left on device: '@test_2626_tmp' -> 
'@test_2626_tmp2'

==
ERROR: test_it (test.test_largefile.TestSocketSendfile)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_largefile.py", line 207, 
in test_it
shutil.copyfile(TESTFN, TESTFN2)
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 270, in copyfile
_fastcopy_sendfile(fsrc, fdst)
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 163, in 
_fastcopy_sendfile
raise err from None
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 149, in 
_fastcopy_sendfile
sent = os.sendfile(outfd, infd, offset, blocksize)
OSError: [Errno 28] No space left on device: '@test_2626_tmp' -> 
'@test_2626_tmp2'

==
ERROR: test_it (test.test_largefile.TestSocketSendfile)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_largefile.py", line 207, 
in test_it
client.sendfile(f)
  File "/data/local/tmp/python/lib/python3.9/socket.py", line 483, in sendfile
return self._sendfile_use_sendfile(file, offset, count)
  File "/data/local/tmp/python/lib/python3.9/socket.py", line 400, in 
_sendfile_use_sendfile
raise err from None
  File "/data/local/tmp/python/lib/python3.9/socket.py", line 386, in 
_sendfile_use_sendfile
sent = os_sendfile(sockno, fileno, offset, blocksize)
BrokenPipeError: [Errno 32] Broken pipe

--

Ran 2 tests in 1.207s

FAILED (errors=2)
test test_largefile failed
test_largefile failed

== Tests result: FAILURE ==

1 test failed:
test_largefile

Total duration: 1.4 sec
Tests result: FAILURE

--
components: Tests
messages: 356976
nosy: xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: test_largefile fails on android
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



[issue38849] test_timestamp_naive fails on android

2019-11-19 Thread Xavier de Gaye


New submission from Xavier de Gaye :

test_timestamp_naive of test_datetime fails on android API 24:

generic_x86_64:/data/local/tmp/python $ python -m test -v test_datetime -m 
test_timestamp_naive
== CPython 3.9.0a0 (heads/abifa-dirty:cf805c25e6, Nov 18 2019, 16:40:26) [Clang 
8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
== Linux-3.10.0+-x86_64-with-libc little-endian
== cwd: /data/local/tmp/python/tmp/test_python_2606
== CPU count: 2
== encodings: locale=UTF-8, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/1] test_datetime
test_timestamp_naive (test.datetimetester.TestDateTime_Pure) ... FAIL
test_timestamp_naive (test.datetimetester.TestDateTimeTZ_Pure) ... FAIL
test_timestamp_naive (test.datetimetester.TestSubclassDateTime_Pure) ... FAIL
test_timestamp_naive (test.datetimetester.TestDateTime_Fast) ... FAIL
test_timestamp_naive (test.datetimetester.TestDateTimeTZ_Fast) ... FAIL
test_timestamp_naive (test.datetimetester.TestSubclassDateTime_Fast) ... FAIL

==
FAIL: test_timestamp_naive (test.datetimetester.TestDateTime_Pure)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_n
aive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

==
FAIL: test_timestamp_naive (test.datetimetester.TestDateTimeTZ_Pure)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_n
aive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

==
FAIL: test_timestamp_naive (test.datetimetester.TestSubclassDateTime_Pure)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_n
aive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

==
FAIL: test_timestamp_naive (test.datetimetester.TestDateTime_Fast)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_n
aive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

==
FAIL: test_timestamp_naive (test.datetimetester.TestDateTimeTZ_Fast)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_naive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

==
FAIL: test_timestamp_naive (test.datetimetester.TestSubclassDateTime_Fast)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_naive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

--

Ran 6 tests in 0.026s

FAILED (failures=6)
test test_datetime failed
test_datetime failed

== Tests result: FAILURE ==

1 test failed:
test_datetime

Total duration: 331 ms
Tests result: FAILURE

--
components: Tests
messages: 356975
nosy: xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: test_timestamp_naive fails on android
type: behavior
versions: Python 3.9

___
Python tracker 

___

[issue25172] Unix-only crypt should not be present on Windows.

2019-11-19 Thread Xavier de Gaye


Change by Xavier de Gaye :


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

___
Python tracker 

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



[issue38848] test_compileall fails when the platform lacks a functional sem_open()

2019-11-19 Thread Xavier de Gaye


New submission from Xavier de Gaye :

See also the related issues:
#32126: [asyncio] test failure when the platform lacks a functional  sem_open()
#28668: instanciation of multiprocessing.Queue raises ImportError in 
test_logging

The test failure on android API 24:

generic_x86_64:/data/local/tmp/python $ python -m test -v test_compileall -m 
test_workers
== CPython 3.9.0a0 (heads/abifa-dirty:cf805c25e6, Nov 18 2019, 16:40:26) [Clang 
8.0.2 (https://andro
id.googlesource.com/toolchain/clang 40173bab62ec7462
== Linux-3.10.0+-x86_64-with-libc little-endian
== cwd: /data/local/tmp/python/tmp/test_python_2579
== CPU count: 2
== encodings: locale=UTF-8, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/1] test_compileall
test_workers (test.test_compileall.CommandLineTestsNoSourceEpoch) ... FAIL
test_workers (test.test_compileall.CommandLineTestsWithSourceEpoch) ... FAIL

==
FAIL: test_workers (test.test_compileall.CommandLineTestsNoSourceEpoch)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_py_compile.py", line 20, 
in wrapper
return fxn(*args, **kwargs)
  File "/data/local/tmp/python/lib/python3.9/test/test_compileall.py", line 
707, in test_workersself.assertRunOK(self.directory, '-j', '0')
  File "/data/local/tmp/python/lib/python3.9/test/test_compileall.py", line 
397, in assertRunOK
rc, out, err = script_helper.assert_python_ok(
  File "/data/local/tmp/python/lib/python3.9/test/support/script_helper.py", 
line 157, in assert_pyt
hon_ok
return _assert_python(True, *args, **env_vars)
  File "/data/local/tmp/python/lib/python3.9/test/support/script_helper.py", 
line 143, in _assert_py
thon
res.fail(cmd_line)
  File "/data/local/tmp/python/lib/python3.9/test/support/script_helper.py", 
line 70, in fail
raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['/data/local/tmp/python/bin/python', '-X', 'faulthandler', '-I', 
'-S', '-m', 'compile
all', '/data/local/tmp/python/tmp/tmpc1hy_667', '-j', '0']

stdout:
---

---

stderr:
---
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/multiprocessing/synchronize.py", 
line 28, in 
from _multiprocessing import SemLock, sem_unlink
ImportError: cannot import name 'SemLock' from '_multiprocessing' 
(/data/local/tmp/python/lib/python
3.9/lib-dynload/_multiprocessing.cpython-39d.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/runpy.py", line 192, in 
_run_module_as_main
return _run_code(code, main_globals, None,
  File "/data/local/tmp/python/lib/python3.9/runpy.py", line 85, in _run_code
exec(code, run_globals)
  File "/data/local/tmp/python/lib/python3.9/compileall.py", line 425, in 

exit_status = int(not main())
  File "/data/local/tmp/python/lib/python3.9/compileall.py", line 403, in main
if not compile_dir(dest, maxlevels, args.ddir,
  File "/data/local/tmp/python/lib/python3.9/compileall.py", line 91, in 
compile_dir
with ProcessPoolExecutor(max_workers=workers) as executor:
  File "/data/local/tmp/python/lib/python3.9/concurrent/futures/process.py", 
line 555, in __init__
self._call_queue = _SafeQueue(
  File "/data/local/tmp/python/lib/python3.9/concurrent/futures/process.py", 
line 165, in __init__
super().__init__(max_size, ctx=ctx)
  File "/data/local/tmp/python/lib/python3.9/multiprocessing/queues.py", line 
42, in __init__
self._rlock = ctx.Lock()
  File "/data/local/tmp/python/lib/python3.9/multiprocessing/context.py", line 
67, in Lock
from .synchronize import Lock
  File "/data/local/tmp/python/lib/python3.9/multiprocessing/synchronize.py", 
line 30, in 
raise ImportError("This platform lacks a functioning sem_open" +
ImportError: This platform lacks a functioning sem_open implementation, 
therefore, the required sync
hronization primitives needed will not function, see issue 3770.
---

==
FAIL: test_workers (test.test_compileall.CommandLineTestsWithSourceEpoch)
==  
[38/374]
FAIL: test_workers (test.test_compileall.CommandLineTestsWithSourceEpoch)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_py_compile.py", line 30, 
in wrapper
return fxn(*args, **kwargs)
  File "/data/local/tmp/python/lib/python3.9/test/test_compileall.py", line 
707, in test_workers
self.assertRunOK(self.directory, '-j', '0')
  File "/data/local/tmp/python/lib/python3.9/test/test_compileall.py", line 
397, in assertRunOK
rc, out, err = script_helper.assert_python_ok(
  

[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Pierre Chatelier


Change by Pierre Chatelier :


--
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Pierre Chatelier


Pierre Chatelier  added the comment:

Aaand finally there is still something : it depends on the call context. Once 
in a C++/CLI class, the link bug occurs again.
Here is attached a minimal project.

--
status: closed -> open
Added file: https://bugs.python.org/file48721/PythonFromC.zip

___
Python tracker 

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



[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Pierre Chatelier


Pierre Chatelier  added the comment:

Just reproduced and solved it at the same time !
It happened with Debug build, where I linked to pythonxx.lib instead of 
pythonxx_d.lib, because I did not download the debug binaries.
Ultimately : my fault.

--

___
Python tracker 

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



[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Zachary Ware


Zachary Ware  added the comment:

Thanks for reporting back.  If you find that you can provide a reliable 
reproducer later, do please reopen and attach it.

--
resolution:  -> works for me
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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2019-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Library (Lib)
versions: +Python 2.7, 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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 6c3b471c8c0bfd49c664d8ee7e95da3710fd6069 by Miss Islington (bot) 
in branch '3.8':
bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)
https://github.com/python/cpython/commit/6c3b471c8c0bfd49c664d8ee7e95da3710fd6069


--

___
Python tracker 

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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 4ffc569b47bef9f95e443f3c56f7e7e32cb440c0 by Miss Islington (bot) 
in branch '3.7':
bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)
https://github.com/python/cpython/commit/4ffc569b47bef9f95e443f3c56f7e7e32cb440c0


--

___
Python tracker 

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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16751
pull_request: https://github.com/python/cpython/pull/17257

___
Python tracker 

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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16752
pull_request: https://github.com/python/cpython/pull/17258

___
Python tracker 

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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 8e0de2a4808d7c2f4adedabff89ee64e0338790a by Miss Islington (bot) 
(Vincent Michel) in branch 'master':
bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)
https://github.com/python/cpython/commit/8e0de2a4808d7c2f4adedabff89ee64e0338790a


--
nosy: +miss-islington

___
Python tracker 

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



[issue38837] struct.pack: Unable to pack more than 256 bytes at a time

2019-11-19 Thread Dave Lotton


Dave Lotton  added the comment:

Mark, you are absolutely correct.  I'm an idiot.  

Focused on wrong thing.  Thank you.

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



[issue27724] PEP3119 inconsintent with actual CPython impl

2019-11-19 Thread Guido van Rossum


Guido van Rossum  added the comment:

Presumably when the implementation was done the IS_ABSTRACT name sounded more 
logical than just ABSTRACT. Since the PEP doesn't *specify* the name of this 
flag[1] I see no reason to change anything. Closing.

_
[1] The PEP mentions this flag exactly once:

(If this were implemented in CPython, an internal flag
``Py_TPFLAGS_ABSTRACT`` could be used to speed up this check [6]_.)

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



[issue38847] AST Optimization for Single Target List Comprehension

2019-11-19 Thread Batuhan


Change by Batuhan :


--
components: +Interpreter Core
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



[issue38847] AST Optimization for Single Target List Comprehension

2019-11-19 Thread Batuhan


New submission from Batuhan :

I was going through old issues and I found @inada.naoki's comment on issue 36551

> How about converting `[x for x in it]` to `[*it]` in AST?

Is this feature still wanted? I can try to work on an implementation for this 
if there is a need. Also should this cover set (`{x for x in it}`) 
comprehensions?

--
messages: 356965
nosy: BTaskaya, inada.naoki
priority: normal
severity: normal
status: open
title: AST Optimization for Single Target List Comprehension

___
Python tracker 

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



  1   2   >