[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-07-20 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
superseder:  -> idlelib/NEWS.txt for 3.8.0 (and backports)

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2018-07-20 Thread Stefan Behnel


Stefan Behnel  added the comment:

At least for lxml, attributes were never specified to have a sorted order 
(although attribute dicts are sorted on *input*, to give a *predictable* order 
as in ET), and the tutorial says: "Attributes are just unordered name-value 
pairs".

However, I still think that Serhiy is right: this change would break code, and 
in particular test code that compares XML output. Having to deal with two 
different "correct" serialisations in tests depending on the Python version is 
annoying at best. But OTOH, comparing XML output should always be based on C14N 
and not on an arbitrary serialisation. XML C14N serialisation was specifically 
designed to provide a deterministic output byte sequence, regardless of how the 
XML document was created. (This is also used for cryptographic fingerprinting.)

It is interesting that ET sorts the attributes on output. lxml does it only on 
API *input*, because the underlying tree model is order preserving. Parsed 
attributes are always written in the original document order, followed by the 
attributes set through the API in the order in which they were set.

For lxml, a serialisation flag is not going to help, because the serialisation 
order is always deterministic from the time where an attribute is added to the 
tree. Given that dicts are order preserving in Python now, ET could follow this 
path as well. The attributes are already in parse order and could easily be 
serialised that way, and attributes that were added through the API would end 
up being serialised last, also preserving the order. This would leave lxml and 
ET with the same serialisation order, which seems attractive.

In short, I like this change, it's just difficult to see a way how this could 
preserve full backwards compatibility. And it's difficult to say how important 
backwards compatibility really is here.

--

___
Python tracker 

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



[issue34100] Same constants in tuples are not merged while compile()

2018-07-20 Thread INADA Naoki


INADA Naoki  added the comment:

This is another memory overhead comparison.
It seems merging constants reduces 2~3% memory usage.

import sys, django, flask
sys._debugmallocstats()

### master branch

class   size   num pools   blocks in use  avail blocks
-      -   -  
0  8   1 312   194
1 16   1 135   118
2 24   2 198   138
3 32  22269082
4 40  62621448
5 48 149   1246551
6 56 254   1826028
7 64 354   22300 2
8 72 208   1158959
9 80 124617327
   10 88  592708 6
...
# bytes in allocated blocks=9,261,952


### merge-const branch

class   size   num pools   blocks in use  avail blocks
-      -   -  
0  8   1 312   194
1 16   1 135   118
2 24   1 161 7
3 32  222657   115
4 40  62620260
5 48 102850167
6 56 235   1687941
7 64 346   2175147
8 72 204   1138737
9 80 122608317
   10 88  58265612
...
# bytes in allocated blocks=8,919,824

--

___
Python tracker 

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



[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread Windson Yang


Windson Yang  added the comment:

Hi, Orlando, this link maybe useful: https://devguide.python.org/documenting/

--
nosy: +Windson Yang

___
Python tracker 

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



[issue34164] base64.b32decode() leads into UnboundLocalError on some data

2018-07-20 Thread Jussi Judin


New submission from Jussi Judin :

base64.b32decode() function leads into "UnboundLocalError: local variable 'acc' 
referenced before assignment" when passing 8 equality signs as data:

>>> import base64
>>> base64.b32decode(b"")
Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/python-3.7-bin/lib/python3.7/base64.py", line 235, in b32decode
acc <<= 5 * padchars
UnboundLocalError: local variable 'acc' referenced before assignment

When passing a different number of equality signs, the documented 
binascii.Error exception is thrown.

--
components: Library (Lib)
messages: 321991
nosy: Barro
priority: normal
severity: normal
status: open
title: base64.b32decode() leads into UnboundLocalError on some data
type: crash
versions: Python 3.7

___
Python tracker 

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



[issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data

2018-07-20 Thread Jussi Judin


Jussi Judin  added the comment:

Apparently base64.b32decode() also has another issue that I missed when going 
through the issues with base64 module:

>>> import base64
>>> base64.b32decode(b"M===")
Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/python-3.7-bin/lib/python3.7/base64.py", line 236, in b32decode
last = acc.to_bytes(5, 'big')
OverflowError: int too big to convert

--
title: base64.b32decode() leads into UnboundLocalError on some data -> 
base64.b32decode() leads into UnboundLocalError and OverflowError on some data

___
Python tracker 

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



[issue33635] OSError when using pathlib.Path.rglob() to list device files

2018-07-20 Thread Windson Yang


Windson Yang  added the comment:

I tried to fix this issue and I found this should be related to os.stat() in 
os.py. But I can't find the os.stat() API in the file, any ideas?

--
nosy: +Windson Yang

___
Python tracker 

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



[issue34165] uu.decode() raises binascii.Error instead of uu.Error on invalid data

2018-07-20 Thread Jussi Judin


New submission from Jussi Judin :

uu.decode() function can leak the internal binascii.Error exception from 
binascii.a2b_uu() function call instead of the documented uu.Error exception.

Following code demonstrates the issue:

>>> import uu
>>> with open("in.uu", "wb") as fp:
... fp.write(b'begin 0 \n0\xe8')
>>> uu.decode("in.uu", "out.uu")
Traceback (most recent call last):
  File "/tmp/python-3.7-bin/lib/python3.7/uu.py", line 148, in decode
data = binascii.a2b_uu(s)
binascii.Error: Illegal char

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/python-3.7-bin/lib/python3.7/uu.py", line 152, in decode
data = binascii.a2b_uu(s[:nbytes])
binascii.Error: Illegal char

It looks like the the workaround for broken encoders that catches the first 
binascii.Error exception just lets the second one to propagate if the recovery 
fails. I would except uu.Error to be raised instead, as that is mentioned in 
the documentation.

--
components: Library (Lib)
messages: 321994
nosy: Barro
priority: normal
severity: normal
status: open
title: uu.decode() raises binascii.Error instead of uu.Error on invalid data
versions: Python 3.7

___
Python tracker 

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



[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread Orlando


Orlando  added the comment:

Thanks, Mariatta and Windson. I'll make a PR for the change.

--

___
Python tracker 

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



[issue29710] Incorrect representation caveat on bitwise operation docs

2018-07-20 Thread Nick Coghlan


Nick Coghlan  added the comment:

Ah, "the internal representation" was meant to refer a hypothetical 
representation, rather than literally to CPython's actual implementation, but 
now that you point it out, I agree my wording is ambiguous. I like Tim's 
suggested replacement:

=
4. Performing these calculations with at least one extra sign extension bit in 
a finite two's complement representation (a working bit-width of ``1 + 
max(x.bit_length(), y.bit_length()`` or more) is sufficient to get the same 
result as if there were an infinite number of sign bits.
=

--

___
Python tracker 

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



[issue34118] Fix some class entries in 'Built-in Functions'

2018-07-20 Thread Nick Coghlan


Nick Coghlan  added the comment:

Marking memoryview, range, and tuple explicitly as classes, and making the 
initial phrasing in the docs consistent across all the builtin 
collection/container types sounds like a good improvement to me.

I agree with Raymond that we should leave whether or not enumerate, filter, 
map, reversed, and zip support inheritance, isinstance() and issubclass() 
ambiguous for now (at least within the scope of this issue). That's the main 
observable difference between implementations that expose a class definition 
directly, and those that wrap them in a factory function.

While technically that ambiguity is a portability problem across 
implementations, in practice folks that want to emulate one of these behaviours 
are far more likely to write their own generator function or iterator class 
from scratch than they are to try to inherit from one of these.

If we were going to note anything at all for these, it would be to put a 
"CPython implementation detail" note in each one about the fact that you can 
subclass them being a CPython implementation detail, but I'd only suggest 
adding that if we ever get complaints about this hindering portability in 
practice, rather than our pointing it ourselves as a potential point of 
inconsistency.

--

___
Python tracker 

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



[issue34118] Fix some class entries in 'Built-in Functions'

2018-07-20 Thread Nick Coghlan


Nick Coghlan  added the comment:

Note that an alternative option for clarifying the status of the "Are they 
types or factory functions?" builtins would be for someone to review 
https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy 
and compare it to the builtins documentation in the library reference.

The language reference is often a better home for clarifying the Python vs 
CPython behavioural oundary, since it avoids cluttering up the main docs with 
info that's going to be irrelevant to the vast majority of users.

--

___
Python tracker 

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



[issue34157] NamedTemporaryFile can leave temporary files behind

2018-07-20 Thread Nick Coghlan


Nick Coghlan  added the comment:

Aye, this is a specific case of the general issue noted in 
https://bugs.python.org/issue29988 (while it may be partially mitigated by 
https://bugs.python.org/issue32949, it isn't a guarantee)

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> with statements are not ensuring that __exit__ is called if 
__enter__ succeeds

___
Python tracker 

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



[issue34163] Python latest release 2.7 shows SSL error

2018-07-20 Thread Michael Felt


Michael Felt  added the comment:

There is a big chance it is not a direct issue with either python or pip / 
rather an issue with how current your "openssl" setup is.

As an example, using git I was not able to "pull" from a remote. This git (that 
also depends on python) has been working for ages. I "fixed" it by getting an 
updated "global" cacert.pem "chain of trust" installed and now https://... 
queries were working instantly.

So, did you perhaps, also update your SSL while re-installing/updating python2? 
(And also note, v2.7.10 is several years old. The latest v2.7 version is 
2.7.15).

--
nosy: +Michael.Felt

___
Python tracker 

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



[issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7

2018-07-20 Thread Lele Gaifax


New submission from Lele Gaifax :

$ python3.7 msgfmt.py -o test.mo test.po 
msgfmt.py:199: DeprecationWarning: tostring() is deprecated. Use tobytes() 
instead.
  output = generate()

--
components: Demos and Tools
messages: 322001
nosy: lelit
priority: normal
severity: normal
status: open
title: Tools/msgfmt.py emits a DeprecationWarning under Python 3.7
versions: Python 3.7

___
Python tracker 

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



[issue34167] Standard library docs: prev/next skip right over 16.11

2018-07-20 Thread Eric Janson


New submission from Eric Janson :

Hitting next from 16.10 in standard library online docs jumps to 16.12. 
Previous goes from 16.12 back to 16.10.  Curses.Textpad(16.11) must be 
random-accessed.

--
assignee: docs@python
components: Documentation
messages: 322002
nosy: Eric Janson, docs@python
priority: normal
severity: normal
status: open
title: Standard library docs: prev/next skip right over 16.11
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue28166] WindowsConsoleIO misbehavior when Ctrl+C is ignored

2018-07-20 Thread Eryk Sun


Eryk Sun  added the comment:

> all the input before the ignored Ctrl+C is lost

The console host process doesn't know that Python is ignoring Ctrl+C, so it 
cancels the read and flushes the input buffer. For now, we have to accept this 
as a limitation of relying on the high-level console API (i.e. ReadConsoleW 
with the default settings), which implements command-line editing, aliases and 
history completely in the console host process. Restarting the read with a 
flushed input buffer is better than raising EOFError or exiting the REPL.

In the future, Python's console readline implementation could hook deeper into 
the operation by temporarily disabling the console's ENABLE_PROCESSED_INPUT 
mode and using the pInputControl parameter to handle ^C and ^H (backspace). 
This would be fairly involved but still an imperfect solution because ^C will 
replace whichever character is under the cursor (fine if the cursor is at the 
end of the line, but otherwise pretty clunky). The only way to have complete 
control is to use the low-level ReadConsoleInput function. pyreadline 
implements this via ctypes.

--

___
Python tracker 

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



[issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 )

2018-07-20 Thread Dem


New submission from Dem :

I have a list of 30 million strings, and I want to run a dns query to all of 
them. I do not understand how this operation can get memory intensive. I would 
assume that the threads would exit after the job is done, and there is also a 
timeout of 1 minute as well ({'dns_request_timeout': 1}).

Here is a sneak peek of the machine's resources while running the script:

[![enter image description here][1]][1]

My code is as follows:

# -*- coding: utf-8 -*-
import dns.resolver
import concurrent.futures
from pprint import pprint
from json import json


bucket = json.load(open('30_million_strings.json','r'))


def _dns_query(target, **kwargs):
global bucket
resolv = dns.resolver.Resolver()
resolv.timeout = kwargs['function']['dns_request_timeout']
try:
resolv.query(target + '.com', kwargs['function']['query_type'])
with open('out.txt', 'a') as f:
f.write(target + '\n')
except Exception:
pass


def run(**kwargs):
global bucket
temp_locals = locals()
pprint({k: v for k, v in temp_locals.items()})

with 
concurrent.futures.ThreadPoolExecutor(max_workers=kwargs['concurrency']['threads'])
 as executor:
future_to_element = dict()

for element in bucket:
future = executor.submit(kwargs['function']['name'], element, 
**kwargs)
future_to_element[future] = element

for future in concurrent.futures.as_completed(future_to_element):
result = future_to_element[future]


run(function={'name': _dns_query, 'dns_request_timeout': 1, 'query_type': 
'MX'},
concurrency={'threads': 15})


  [1]: https://i.stack.imgur.com/686SW.png

--
components: Library (Lib)
messages: 322004
nosy: DemGiran
priority: normal
severity: normal
status: open
title: RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 )
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 )

2018-07-20 Thread Dem


Dem  added the comment:

It seems that even without the as_completed call it has the same problem. 


```
# -*- coding: utf-8 -*-
import dns.resolver
import concurrent.futures
from pprint import pprint
from json import json


bucket = json.load(open('30_million_strings.json','r'))


def _dns_query(target, **kwargs):
global bucket
resolv = dns.resolver.Resolver()
resolv.timeout = kwargs['function']['dns_request_timeout']
try:
resolv.query(target + '.com', kwargs['function']['query_type'])
with open('out.txt', 'a') as f:
f.write(target + '\n')
except Exception:
pass


def run(**kwargs):
global bucket
temp_locals = locals()
pprint({k: v for k, v in temp_locals.items()})

with 
concurrent.futures.ThreadPoolExecutor(max_workers=kwargs['concurrency']['threads'])
 as executor:
for element in bucket:
executor.submit(kwargs['function']['name'], element, **kwargs)


run(function={'name': _dns_query, 'dns_request_timeout': 1, 'query_type': 'MX'},
concurrency={'threads': 15})
```

--

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:

> This hits fontforge. See https://bugzilla.redhat.com/show_bug.cgi?id=1595421

Copy of my comment 20:



I looked one more time to the issue:

* fontforge code is fine: it calls Py_Initialize() before using the Python C 
API to initialize its Python namespace (modules, functions, types, etc.), and 
later it calls Py_Main().

* Python 3.7.0 is wrong: it fails with a fatal erro when Py_Main() is called if 
Py_Initialize() has been called previously. It is a regression since it worked 
fine in Python 3.6.

* My PR https://github.com/python/cpython/pull/8043 works again the simplest 
test: "fontforge -script hello.py" where hello.py is just "print('Hello 
World!')"

* This PR is not enough according to Miro, since fontforge requires sys.argv to 
be set, whereas sys.argv is no longer set when Py_Main() is after 
Py_Initialize(): 
https://github.com/python/cpython/pull/8043#issuecomment-401731992

--

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:

I looked one more time at Python 3.6, code before my huge 
Py_Main()/Py_Initialize() refactoring, before 
_PyCoreConfig/_PyMainInterpreterConfig have been added. In short, calling 
Py_Main() after Py_Initialize() "works" in Python 3.6 but only sys.argv is set: 
almost all other options are lost/ignored. For example, if you call 
Py_Initialize() you get a sys.path from the current environment, but if 
Py_Main() gets a new module search path: sys.path is not updated.

I modified PR 8043 to write the minimum patch just to fix fontforge. When 
Py_Main() is called Py_Initialize(): just set sys.argv, that's all.

If someone wants to fix this use case, apply properly the new Py_Main() 
configuration carefully, I would suggest to only work in the master branch: 
that's out of the scope of this specific regression.

IMHO it would be nice to enhance this use case. For example, it would be "nice" 
to update at least "sys.path" (and other related variables) in such case.

--

___
Python tracker 

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



[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values

2018-07-20 Thread Noah Haasis


Noah Haasis  added the comment:

I'd like to work on this, if it's ok for everybody.

--
nosy: +noah.haasis

___
Python tracker 

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



[issue34157] NamedTemporaryFile can leave temporary files behind

2018-07-20 Thread Jakub Wilk


Jakub Wilk  added the comment:

I think issue29988 is unrelated, or at least not the whole story.

These are samples of tracebacks I see when the file is left behind:

  Traceback (most recent call last):
File "test-tmpfile.py", line 4, in 
  with tempfile.NamedTemporaryFile(dir='.'):
File "/opt/python/lib/python3.8/tempfile.py", line 548, in 
NamedTemporaryFile
  (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "/opt/python/lib/python3.8/tempfile.py", line 258, in _mkstemp_inner
  fd = _os.open(file, flags, 0o600)
  KeyboardInterrupt
  
  Traceback (most recent call last):
File "test-tmpfile.py", line 4, in 
  with tempfile.NamedTemporaryFile(dir='.'):
File "/opt/python/lib/python3.8/tempfile.py", line 548, in 
NamedTemporaryFile
  (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "/opt/python/lib/python3.8/tempfile.py", line 269, in _mkstemp_inner
  return (fd, _os.path.abspath(file))
File "/opt/python/lib/python3.8/posixpath.py", line 371, in abspath
  path = os.fspath(path)
  KeyboardInterrupt
  
  Traceback (most recent call last):
File "test-tmpfile.py", line 4, in 
  with tempfile.NamedTemporaryFile(dir='.'):
File "/opt/python/lib/python3.8/tempfile.py", line 548, in 
NamedTemporaryFile
  (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "/opt/python/lib/python3.8/tempfile.py", line 269, in _mkstemp_inner
  return (fd, _os.path.abspath(file))
File "/opt/python/lib/python3.8/posixpath.py", line 378, in abspath
  return normpath(path)
File "/opt/python/lib/python3.8/posixpath.py", line 355, in normpath
  if comp in (empty, dot):
  KeyboardInterrupt

In all cases the interrupt happened in the NamedTemporaryFile function,
so before __enter__/__exit__ would have chance to do its job.

--

___
Python tracker 

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



[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread Aaqa Ishtyaq


Change by Aaqa Ishtyaq :


--
keywords: +patch
pull_requests: +7884
stage: needs patch -> patch review

___
Python tracker 

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



[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Clint Hepner


New submission from Clint Hepner :

I expected to be able to pass None as an explicit count to itertools.repeat to 
get the default behavior of an infinite iterator:

>>> list(islice(repeat(1), 10))
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
>>> list(islice(repeat(1, None), 10))
Traceback (most recent call last):
  File "", line 1 in 
TypeError: 'NoneType' object cannot be interpreted as an integer

--
components: Library (Lib)
messages: 322010
nosy: chepner
priority: normal
severity: normal
status: open
title: itertools.repeat does not accept None as an explicit count
versions: Python 3.7

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread Nick Coghlan


Nick Coghlan  added the comment:

+1 from me for the idea of fixing Python 3.7 to correctly set sys.argv in this 
case (and leaving everything else unmodified).

As far as further enhancement in Python 3.8 goes, perhaps that can be seen as 
part of PEP 432, such that embedding applications have to explicitly opt-in to 
any new behaviour by calling the new APIs?

--

___
Python tracker 

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



[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread Aaqa Ishtyaq


Change by Aaqa Ishtyaq :


--
pull_requests: +7885

___
Python tracker 

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



[issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data

2018-07-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +7886
stage:  -> patch review

___
Python tracker 

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



[issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data

2018-07-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your report Jussi.

The type "crash" is used for hard crashes of the Python interpreter – possibly 
with a core dump or a Windows error box.

--
nosy: +serhiy.storchaka
type: crash -> behavior
versions: +Python 3.6, Python 3.8

___
Python tracker 

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



[issue34157] NamedTemporaryFile can leave temporary files behind

2018-07-20 Thread Nick Coghlan


Nick Coghlan  added the comment:

It's still the same problem - the underlying issue is that the with statement 
machinery doesn't currently mask signals in the main thread while __enter__ and 
__exit__ are running, so __enter__ and __exit__ methods written in Python are 
also at risk of being interrupted at an inopportune point.

This means that even "with closing(open('filename')) as f: ..." is more at risk 
of leaving the file open until __del__ cleans it up than the version that calls 
open() directly.

So if this a concern that an application needs to worry about, then it 
currently needs to adopt a more complicated execution structure where:

1. The main thread launches a subthread that actually does all the work.
2. The main thread immediately drops into "active_thread.join()" (which can be 
interrupted by Ctrl-C)

Unfortunately, this scheme *doesn't* work for applications where the 
application itself needs to detect and handling signals other than Ctrl-C.

--

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor


New submission from STINNER Victor :

Attached

--
components: Interpreter Core
messages: 322014
nosy: vstinner
priority: normal
severity: normal
status: open
title: Py_Initialize(): computing path configuration must not have side effect 
(PEP 432)
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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:

Attached PR reworks _PyCoreConfig_Read() to leave _Py_path_config unchanged: 
*reading* the core configuration must not *modify* the path configuration.

The PR adds _PyCoreConfig.dll_path field.

The change is related to the PEP 432.

--

___
Python tracker 

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



[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue21600] mock.patch.stopall doesn't work with patch.dict to sys.modules

2018-07-20 Thread Antoni Szych


Antoni Szych  added the comment:

Hi,

Any chance of getting this resolved 1 year later? :)

BR

--

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-34170: "Py_Initialize(): computing path configuration must not 
have side effect (PEP 432)" as a follow-up of this issue.

--

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-34008: "Do we support calling Py_Main() after Py_Initialize()?".

--

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset fb47bca9ee2d07ce96df94b4e4abafd11826eb01 by Victor Stinner in 
branch 'master':
bpo-34008: Allow to call Py_Main() after Py_Initialize() (GH-8043)
https://github.com/python/cpython/commit/fb47bca9ee2d07ce96df94b4e4abafd11826eb01


--

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7887

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +7888
stage:  -> patch review

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:

PR 8353 is the last piece of my long work on Py_Main() to separate code 
*reading* configuration and code *applying* a new configuration. My work on the 
new _PyPathConfig structure, and the PR should finish that work.

Extract of the commit message:

"A new _PyCoreConfig_SetPathConfig() function now recreates the path 
configuration from the core configuration. This function is now called very 
late in _Py_InitializeCore(), just before calling initimport()."

--

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-07-20 Thread Matthias Klose


Matthias Klose  added the comment:

please don't close this yet.  the patch introduces a dependency on the 
distutils package.  I don't see any reason to compare the libc version as a 
python egg version, so please avoid that.

if we need to have a module to compare arbitrary version strings, then we 
should think about adding one in the standard library, but I think that's what 
the packaging module is for.

--
nosy: +doko

___
Python tracker 

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



[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2018-07-20 Thread Frank Thommen


Frank Thommen  added the comment:

The configure script doesn't work with a proper openssl installation either.  
Even though there is a "lib" directory in the directory given to 
--with-openssl=, libssl.so.1.1 isn't found, because there is still a 
"-L/lib" missing in some of the compiler calls.

LDFLAGS="-L/lib" ./configure --with-openssl= is required, which 
seems somehow redundant.  Bug?

--
nosy: +fthommen

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-07-20 Thread Matthias Klose


Matthias Klose  added the comment:

a tuple comparison should be good enough

--

___
Python tracker 

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



[issue32627] Header dependent _uuid build failure on Fedora 27

2018-07-20 Thread Frank Thommen


Change by Frank Thommen :


--
nosy: +fthommen

___
Python tracker 

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



[issue34011] Default preference not given to venv DLL's

2018-07-20 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 94487d45707772723ef19e86700a40a12743baa1 by Vinay Sajip in branch 
'master':
bpo-34011: Update code copying DLLs and init.tcl into venvs. (GH-8253)
https://github.com/python/cpython/commit/94487d45707772723ef19e86700a40a12743baa1


--

___
Python tracker 

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



[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

Thanks!

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



[issue34171] Lib/trace.cover not removed by the clean target

2018-07-20 Thread Matthias Klose


New submission from Matthias Klose :

Lib/trace.cover is not removed by the clean target, and apparently this file is 
always created in the source tree, not in the build tree.  It should be created 
in the build tree, if that's not possible, it should be cleaned in any case.

--
components: Build
messages: 322026
nosy: doko
priority: normal
severity: normal
status: open
title: Lib/trace.cover not removed by the clean target
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



[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7889

___
Python tracker 

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



[issue34157] NamedTemporaryFile can leave temporary files behind

2018-07-20 Thread R. David Murray


R. David Murray  added the comment:

Nick, what Jakub is saying is that 'with' hasn't even gotten involved yet: 
we're still executing the NamedTemporaryFile constructor, so the object hasn't 
been returned for 'with' to operate on yet.  In other words, 
NamedTemporaryFile.__init__ isn't safe against ctl-C when it calls _mkstemp, 
which is obvious by inspection since it isn't inside the try/except.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue34157] NamedTemporaryFile can leave temporary files behind

2018-07-20 Thread R. David Murray


Change by R. David Murray :


--
resolution: duplicate -> 
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



[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-07-20 Thread tzickel


New submission from tzickel :

In multiprocessing.Pool documentation it's written "When the pool object is 
garbage collected terminate() will be called immediately.":

https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.pool.Pool.terminate

A. This does not happen, creating a Pool, deleting it and collecting the 
garbage, does not call terminate.

B. The documentation for Pool itself does not specify it has a context manager 
(but the examples show it).

C. This bug is both in Python 3 & 2.

--
components: Library (Lib)
messages: 322028
nosy: tzickel
priority: normal
severity: normal
status: open
title: multiprocessing.Pool and ThreadPool leak resources after being deleted
type: behavior
versions: Python 2.7, Python 3.7

___
Python tracker 

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



[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Dong-hee Na


Change by Dong-hee Na :


--
keywords: +patch
pull_requests: +7890
stage:  -> patch review

___
Python tracker 

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



[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Dong-hee Na


Dong-hee Na  added the comment:

IMHO, this issue should be fixed since
times=None can be passed,
ref: https://docs.python.org/3/library/itertools.html#itertools.repeat

This documentation also shows the equivalent python code,
>From this code, times=None should work but does not work in current 
>implementation.

def repeat(object, times=None):
# repeat(10, 3) --> 10 10 10
if times is None:
while True:
yield object
else:
for i in range(times):
yield object

I've upload PR with this issue.

--
nosy: +corona10

___
Python tracker 

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



[issue34118] Fix some class entries in 'Built-in Functions'

2018-07-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I will write a PR only touching the collection class entries.

--

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-07-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7891

___
Python tracker 

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



[issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 )

2018-07-20 Thread Tim Peters


Tim Peters  added the comment:

If your `bucket` has 30 million items, then

for element in bucket:
executor.submit(kwargs['function']['name'], element, **kwargs)

is going to create 30 million Future objects (and all the under-the-covers 
objects needed to manage their concurrency) just as fast as the main thread can 
create them.  Nothing in your code waits for anything to finish until after 
they've _all_ been created and queued up under the covers.

So your producer is running vastly faster than your consumers can keep up with. 
 It's the huge backlog of pending work items that consume the RAM.  To slash 
RAM, you need to craft a way to interleave creating new work items with giving 
consumers time to deal with them.

--
nosy: +tim.peters

___
Python tracker 

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



[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party module fails on Python 3.5)

2018-07-20 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +Python 3.7, Python 3.8 -Python 3.5

___
Python tracker 

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



[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py

2018-07-20 Thread Corey Bryant


New submission from Corey Bryant :

I initially reported this on launchpad at 
https://bugs.launchpad.net/bugs/1782647.

I'm running a test for a project that hangs and requires a Control-C to cancel 
it. The results look like this: https://paste.ubuntu.com/p/SwXsCcghjt/

In narrowing down on this some more, the use of queue.SimpleQueue() seems to 
make the difference that causes the hang. If I switch that back to 
queue.Queue() (which was the case for py3.6) the hang goes away:

- self._work_queue = queue.Queue()
+ self._work_queue = queue.SimpleQueue()

To reproduce with OpenStack designate:

git clone https://github.com/openstack/designate.

Then, update tox.ini with the following:

--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
 [tox]
 minversion = 2.0
-envlist = py35,py27,flake8
+envlist = py35,py37,py27,flake8
 skipsdist = True

 [testenv]
@@ -39,6 +39,12 @@ commands =
   {[testenv]commands}
   stestr run '{posargs}'

+[testenv:py37]
+basepython = python3.7
+commands =
+ {[testenv]commands}
+ stestr run 
'designate\.tests\.test_workers\.test_processing\.TestProcessingExecutor\.(test_execute_multiple_tasks)'
+
 [testenv:docs]
 basepython = python3
 deps =


And run: tox -e py37

--
components: Library (Lib)
messages: 322032
nosy: corey.bryant
priority: normal
severity: normal
status: open
title: [3.7] possible race condition in 
/usr/lib/python3.7/concurrent/futures/thread.py
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue34060] regrtest: log "CPU usage" on Windows

2018-07-20 Thread Ammar Askar


Change by Ammar Askar :


--
pull_requests: +7892

___
Python tracker 

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



[issue5115] Extend subprocess.kill to be able to kill process groups

2018-07-20 Thread Ammar Askar


Change by Ammar Askar :


--
pull_requests: +7893

___
Python tracker 

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



[issue34060] regrtest: log "CPU usage" on Windows

2018-07-20 Thread Ammar Askar


Ammar Askar  added the comment:

> But then again, if it's solely for our tests, perhaps the best way to 
> approach this is to start a Python thread that periodically runs this command?

I opened up https://github.com/python/cpython/pull/8357 with this strategy, in 
my opinion its a lot nicer and doesn't clutter up _winapi with half baked, 
extremely specialized functions. Its a bit more involved than running a thread, 
details are on the PR.

--

___
Python tracker 

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



[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-20 Thread Chris Kessler


New submission from Chris Kessler :

In document 
https://docs.python.org/2/library/argparse.html#argparse.RawDescriptionHelpFormatter

this will fail with NameError: global name 'textwrap' is not defiend

>>> parser = argparse.ArgumentParser(
... prog='PROG',
... formatter_class=argparse.RawDescriptionHelpFormatter,
... description=textwrap.dedent('''\
... Please do not mess up this text!
... 
... I have indented it
... exactly the way
... I want it
... '''))

--
assignee: docs@python
components: Documentation
messages: 322034
nosy: ckessler, docs@python
priority: normal
severity: normal
status: open
title: argparse formatter_class issue for RawDescriptionHelpFormatter
type: resource usage
versions: Python 2.7

___
Python tracker 

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



[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:


New changeset 49abd307d222e6fe85b5175eed6b6f87fc656a8d by Mariatta (Miss 
Islington (bot)) in branch '3.7':
bpo-34161: Remove extra parentheses in output formatting tutorial (GH-8350)
https://github.com/python/cpython/commit/49abd307d222e6fe85b5175eed6b6f87fc656a8d


--

___
Python tracker 

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



[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-20 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

Thanks for the report.

To make it work, you'll have to import textwrap first.

We don't always add all the necessary imports in our code snippets and 
examples, and we don't need to start adding imports into code examples either. 
So I'm closing this issue.

Thanks again.

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



[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-20 Thread Chris Kessler


Chris Kessler  added the comment:

Thanks for the quick response!
I didnt see it anywhere in the documentation on that page so I assumed it was 
built in with argparse.
Thanks!

--

___
Python tracker 

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



[issue34175] typing.NamedTuple: type-checking error when "index" used as member

2018-07-20 Thread Keith Campbell


New submission from Keith Campbell :

Find the test case below:


from typing import NamedTuple

class Foo(NamedTuple):
alpha: int
index: int


This results in the following error when run through type-checking with mypy:


% mypy --version
mypy 0.620
% mypy go.py
go.py:5: error: Incompatible types in assignment (expression has type "int", 
base class "tuple" defined the type as "Callable[[Tuple[int, ...], Any, int, 
int], int]")


When I instantiate this class in the python interpreter, I have no problem 
accessing the "index" member, so I suspect this is a bug in the type checker.

--
components: Library (Lib)
messages: 322038
nosy: campkeith
priority: normal
severity: normal
status: open
title: typing.NamedTuple: type-checking error when "index" used as member
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



[issue34163] Python latest release 2.7 shows SSL error

2018-07-20 Thread Brett Cannon


Change by Brett Cannon :


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



[issue34115] code.InteractiveConsole.interact() closes stdin

2018-07-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

To investigate your claim about closing sys.stdin, I ran the following on 
Windows 10, mostly with 3.7.0, in both the console and IDLE, using various exit 
methods.

import code
import sys

for i in range(2):
try:
code.InteractiveConsole().interact()
print(f'Try {i}: closed is', sys.stdin.closed)
except SystemExit:
print(f'Exc {i}: closed is', sys.stdin.closed)

^D in IDLE and ^Z+ in console prints 'Try 0/1...False'.
The IC.interact loop catches EOFError and breaks for a normal exit.

'raise SystemExit' and sys.exit() print 'Exc 0/1...False'.

exit() and quit() print 'Exc 0/1...True' on Console.  On Windows Console, 
sys.stdin.close() does not prevent a second interact call.  This might be 
considered a bug.

What OS are you running and what is the result and traceback for the code above?

In IDLE, either function exit causes a 'Kill the running process' popup.  If 
yes, user code execution ceases and the shell window  closes.  If no, 
SystemExit is caught and 'SysExit...False' is printed.  The latter is true 
because sys.stdin.close in the user process is 'sys.shell.close()', and the 
latter does the popup.  The *purpose* of sys.stdin.close is to get the 
attention of shells that intercept SystemExit, so that users can say 'Close 
this now'.  Even so, IDLE asks users first to make sure.

Emulating IDLE in a simplified fashion as follows will negate closure.
import _io
class Stdin(_io.TextIOWrapper):
def close(self): pass
sys.stdin = Stdin()  # To restore, sys.__stdin__ is the original.


---
History of sys.stdin.close:

https://github.com/python/cpython/commit/24cb053b158a3cd63f7be05ac27f47e45bb2f1b3
Site.py, line 236, Mar 9, 2006, George Brandel added Quitter with __call__ 
consisting of 'raise SystemExit(code)'.

https://github.com/python/cpython/commit/d112bc7958151fa17c4ccb27413c43e45b8476fb#diff-f34a16518c608b2ca946d3f5ca0a1942
site.py, line Aug 16, 2006, Kurt Kaiser added the following lines
# Shells like IDLE catch the SystemExit, but listen when their
# stdin wrapper is closed.
try:
sys.stdin.close()
except:
pass

https://github.com/python/cpython/commit/862543aa85249b46649b60da96743b4b14c6c83b#diff-f34a16518c608b2ca946d3f5ca0a1942
site.py, line 250, Christian Heimes replace stdin.close with the following to 
avoid Lib/io.py: RuntimeWarning: Trying to close unclosable fd. (I believe io 
has since been patched to not do this.)
fd = -1
if hasattr(sys.stdin, "fileno"):
fd = sys.stdin.fileno()
if fd != 0:
# Don't close stdin if it wraps fd 0
sys.stdin.close()

https://hg.python.org/cpython/rev/82451c88b3c0, 11 Apr 2013
After discussion on #17585 with Antoine Pitrou and Serhiy Storchaka, Roger 
Serwy reverted the above because it was no longer needed 
---

Your code assumes that sys.stdin has a buffer attribute.  Not necessarily true 
when python is started with pythonw.exe.  With the print removed, it also 
assumes that sys.stdin has file descriptor 0.  Ditto.
---

Possible doc improvements: the exit/quit doc says that closes.
https://docs.python.org/3/library/constants.html#constants-added-by-the-site-module

interact doc mentions catching exceptions and quit/exit issue.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, terry.reedy
stage:  -> needs patch
type: behavior -> enhancement
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b1147e43daeb3c51a63056b489e8d868404d4e22 by Victor Stinner in 
branch 'master':
bpo-34170: Rework _PyCoreConfig_Read() to avoid side effect (GH-8353)
https://github.com/python/cpython/commit/b1147e43daeb3c51a63056b489e8d868404d4e22


--

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 03ec4df67d6b4ce93a2da21db7c84dff8259953f by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-34008: Allow to call Py_Main() after Py_Initialize() (GH-8043) (GH-8352)
https://github.com/python/cpython/commit/03ec4df67d6b4ce93a2da21db7c84dff8259953f


--

___
Python tracker 

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



[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Clint, why do you think you need this?

Dong-hee, the pure python code is listed a rough equivalent, not an exact 
equivalent.

--

___
Python tracker 

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



[issue34175] typing.NamedTuple: type-checking error when "index" used as member

2018-07-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> So I suspect this is a bug in the type checker.

Perhaps this report should go on the mypy bug tracker rather than the Python 
language tracker.

--
nosy: +gvanrossum, levkivskyi, rhettinger -campkeith

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, I fixed the fontforge bug in 3.7 and master branches. Sorry for the 
regression, but I really didn't expect that anyone would call Py_Main() after 
Py_Initialize() :-) I guess we should be prepared for such hiccup when 
reworking the Python initialization :-)

Nick: Can I close the issue, or do you want to keep it open 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



[issue34175] typing.NamedTuple: type-checking error when "index" used as member

2018-07-20 Thread Guido van Rossum


Guido van Rossum  added the comment:

> Perhaps this report should go on the mypy bug tracker rather than the Python 
> language tracker.

Agreed. It's up to the OP to file an issue there though (hence adding 
@campkeith back to the nosy list).

--
nosy: +campkeith
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7894

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue since I got a very similar failure of 
test_time.test_process_time() on my laptop: the busy loop took 15.9 ms
whereas the test expects at least 20 ms. I wrote PR 8358 to only require 15 ms 
instead.

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



[issue34176] Asyncio StreamReader fails to close Transport

2018-07-20 Thread Jim DeLaHunt


New submission from Jim DeLaHunt :

Asyncio's StreamReaderProtocol[1] often returns True from 
Protocol.eof_received(). This tells the Transport that "closing the transport 
is up to the protocol" [2]. However, StreamReaderProtocol does not call 
Transport.close(). More precisely, StreamReaderProtocol leaves the transport 
interaction to StreamReader. It calls StreamReader.feed_eof()[3]. But 
StreamReader does not call self._transport.close(). It only sets a self._eof 
flag, and awakens any of its functions which were waiting for data. 

The only occurrence of self._transport.close() occurs in StreamWriter[4]. There 
is none in StreamReader or StreamReaderProtocol.

I believe that the fix should be for StreamReader to call 
self._transport.close(). However, it may need to avoid this if 
StreamReaderProtocol._over_ssl is True, and I don't immediately see how it can 
tell this. Also, it may need to wait for anything waiting for self._waiter to 
run, before closing the Transport.
Or, maybe StreamReaderProtocol should not return True from 
Protocol.eof_received().

I discovered this when using a Transport of my own devising, which reads from a 
file instead of from a socket, with asyncio.streams.  The file did not close in 
the unit test. My transport duly called Protocol.eof_received(), but received a 
True in response, so did not close the file.

My workaround will probably be to not believe what Protocol.eof_received() 
tells me, and to close my transport regardless.

[1] Lib/asyncio.streams.StreamReaderProtocol.eof_received, line 259-266.
[2] 19.5.4.2.3. "Streaming protocols" 

[3] Lib/Lib/asyncio.streams.StreamReader.feed_eof, lines 419-421.
[4] Lib/Lib/asyncio.streams.StreamWriter.close, lines 316-317.

All line numbers are as of tag v3.7.0, commit 
1bf9cc509326bc42cd8cb1650eb9bf64550d817e . 

Bug observed in v3.7.0. Not yet investigated in HEAD revision.

--
components: asyncio
messages: 322047
nosy: JDLH, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Asyncio StreamReader fails to close Transport
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue34127] Gramatically incorrect error message for some descriptor calls with wrong number of arguments

2018-07-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Yes.  0 things, (1/2 thing), 1 thing, (3/2 things),  2... things is the bugaboo 
of formatting sentences with a number field.  Raymond, will we accept a patch 
for this?

--
nosy: +rhettinger, terry.reedy
stage:  -> needs patch
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



[issue34055] IDLE: erroneous 'smart' indents in shell

2018-07-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Of late, I've also encountered two recurring problems along these lines.  At 
some point in the IDLE session, the auto-indents become large and this survives 
a restart-shell.   Another problem is that an extra \n is emitted after every 
result which gives an odd double-spaced effect.  

When added to other existing bugs, this has greatly impaired the usability of 
IDLE for teaching (the tool tips no longer display on the newest mac builds and 
periodically the mouse pointer is mistargeted by 1/4 of the screen until the 
screen is resized, and periodically I encounter cases where pressing any key in 
the interactive session results in pasting the current contents of the keyboard 
on the current entry line).

--
nosy: +rhettinger

___
Python tracker 

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



[issue34134] multiprocessing memory huge usage

2018-07-20 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +pitrou

___
Python tracker 

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



[issue34136] Del on class __annotations__ regressed, failing test

2018-07-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Yes, the test should be removed, commented out, skipped, or made to work, 
depending on intentions.  Test first is for private branches.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue33129] Add kwarg-only option to dataclass

2018-07-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+1 from me -- think would occasionally be nice to have.

--
nosy: +rhettinger

___
Python tracker 

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



[issue34127] Gramatically incorrect error message for some calls with wrong number of arguments

2018-07-20 Thread ppperry


ppperry  added the comment:

Another test case: 

>> classmethod()

Traceback (most recent call last):
  File "", line 2, in check
TypeError: classmethod expected 1 arguments, got 0

--
title: Gramatically incorrect error message for some descriptor calls with 
wrong number of arguments -> Gramatically incorrect error message for some 
calls with wrong number of arguments

___
Python tracker 

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



[issue34132] Obscure netrc parser "bug"

2018-07-20 Thread bbayles


Change by bbayles :


--
pull_requests: +7895

___
Python tracker 

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



[issue34132] Obscure netrc parser "bug"

2018-07-20 Thread bbayles


bbayles  added the comment:

I realized that the Python 2 solution was adapt-able after all; I've 
re-submitted as GitHub PR 8360.

https://github.com/python/cpython/pull/8360

--

___
Python tracker 

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



[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Dong-hee Na


Dong-hee Na  added the comment:

Raymond, when I first read this issue, it seemed very clear that it should not 
work. However, after reading the documentation I misunderstood that it can be 
worked because the pseudocode specifies NoneType. 

IMHO, in that case, we should let users through documentation know that this 
code is just pseudo-code and that the actual counts parameter should be passed 
as an integer type.

--

___
Python tracker 

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



[issue34115] code.InteractiveConsole.interact() closes stdin

2018-07-20 Thread Yonatan Zunger


Yonatan Zunger  added the comment:

Testing your code sample on OS X (10.13.6) with Python 3.6.2:

- quit() in the console yields

Exc 0: closed is True
Python 3.6.2 (default, Apr 17 2018, 12:29:33) 
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> Traceback (most recent call last):
  File "./test.py", line 6, in 
code.InteractiveConsole().interact()
  File "/Users/zunger/.pyenv/versions/3.6.2/lib/python3.6/code.py", line 228, 
in interact
line = self.raw_input(prompt)
  File "/Users/zunger/.pyenv/versions/3.6.2/lib/python3.6/code.py", line 275, 
in raw_input
return input(prompt)
ValueError: I/O operation on closed file.

- ^D and raise SystemExit in console both yield:

Python 3.6.2 (default, Apr 17 2018, 12:29:33) 
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> ^D
now exiting InteractiveConsole...
Try 0: closed is False
Python 3.6.2 (default, Apr 17 2018, 12:29:33) 
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> ^D
now exiting InteractiveConsole...
Try 1: closed is False


So it looks like the issue is specific to quit(), as you say. I'm not sure I 
understand what the purpose of the sys.stdin.close() call is, though: why would 
we *want* to alert the parent shell in some way beyond a SystemExit as the 
default (non-overrideable) behavior? This may be a documentation issue, but it 
seems extremely surprising to me; no other function does this additional thing, 
even when raising a SystemExit. I would think that any caller which is running 
InteractiveConsole.interact() and also wants to do something when it finishes 
would want to handle that additional logic itself.

--

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7896

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e78dace8dcb23c371df19c9add65895adf436995 by Victor Stinner in 
branch 'master':
bpo-33723: Fix test_time.test_process_time() (GH-8358)
https://github.com/python/cpython/commit/e78dace8dcb23c371df19c9add65895adf436995


--

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7897
stage: resolved -> patch review

___
Python tracker 

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



[issue34115] code.InteractiveConsole.interact() closes stdin

2018-07-20 Thread Yonatan Zunger


Yonatan Zunger  added the comment:

Or perhaps in an alternate phrasing: The sys.stdin.close behavior makes sense 
if quit is being used inside IDLE, but is very surprising from the perspective 
of the `code` module. (Really, even the SystemExit is surprising there, and 
should be documented!)

What if we added a stdin-preserving workaround to 
code.InteractiveConsole.interact, and added documentation of the SystemExit 
behavior to that module as well, but left _Quitter itself as-is?

--

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a7a6eac966dd52db1762c8f455c1e208df36feb4 by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-33723: Fix test_time.test_process_time() (GH-8358) (GH-8362)
https://github.com/python/cpython/commit/a7a6eac966dd52db1762c8f455c1e208df36feb4


--

___
Python tracker 

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



[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:

I changed the minimum time from 20 ms to 15 ms in 
test_time.test_process_time(), in Python 3.7 and master branches.

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f2626ce6d4136f13a506e34ca8631ff2eab85fd9 by Victor Stinner in 
branch 'master':
bpo-34170: _PyCoreConfig_Read() leaves Py_IsolatedFlag unchanged (GH-8361)
https://github.com/python/cpython/commit/f2626ce6d4136f13a506e34ca8631ff2eab85fd9


--

___
Python tracker 

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



[issue34149] Behavior of the min/max with key=None

2018-07-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

In 2.x, map(None, 'abc', 'zyz') == [('a', 'z'), ('b', 'y'), ('c', 'z')], but 
with the addition of zip, so that zip('abc', 'xyz') has the same result, we 
deprecated that use of None to mean identity function.

For python-coded functions, a default is needed to make a keyword-only argument 
optional, and preferred over use of *args for making positional arguments 
optional.  Unless I am missing something, a function can special-case 'key is 
identity', to avoid overhead, just as well as it can special-case 'key is 
None'.  So rather than extend 'key=None', to me a kludge, I would rather 
replace it with 'key=identity'.  Both can be accepted during a deprecation 
period.

For instance, after adding identity,

def nsmallest(n, iterable, key=identity):
...
if key is identity or key is None:  # key in (identity, None)
result = min(it, default=sentinel)
...

Since no one need ever write key=None, explicit passing should be rare.  It 
seems to me that the main reason for the type declaration of key to include 
None is so that the def statement itself passes a consistency check with the 
None default.  Once that is changed, most people should be able to use a simple 
callable declaration.  I am considering this for python-ideas.

Since the weekly issues list came out just 10 hours ago, I will not close this 
yet, but I will if still open in couple of days and no coredev objections.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue34149] Behavior of the min/max with key=None

2018-07-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

FWIW, the nsmallest/largest key param was added Dec 2, 2004, before 
keyword-only parameters.
https://github.com/python/cpython/commit/4901a1f267e9d632f85054ce8b21ff23bff305e1

--

___
Python tracker 

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



[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values

2018-07-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

By documentation, you mean the doc string for each widget, which is the basis 
for the help(widget) response.  I checked that there do not seem to be any 
other issues open for the docstrings.  Go ahead.  Use 
https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm as the reference.

C.E.: if you have a list of missing thing, can you post?  This is normal 
priority.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, serhiy.storchaka, terry.reedy
stage:  -> needs patch
type:  -> behavior
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



[issue21600] mock.patch.stopall doesn't work with patch.dict

2018-07-20 Thread ppperry


Change by ppperry :


--
title: mock.patch.stopall doesn't work with patch.dict to sys.modules -> 
mock.patch.stopall doesn't work with patch.dict

___
Python tracker 

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



  1   2   >