[issue37177] IDLE: Search dialogs can be hidden behind the main window

2019-06-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13756
pull_request: https://github.com/python/cpython/pull/13878

___
Python tracker 

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



[issue37177] IDLE: Search dialogs can be hidden behind the main window

2019-06-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13757
pull_request: https://github.com/python/cpython/pull/13879

___
Python tracker 

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



[issue37177] IDLE: Search dialogs can be hidden behind the main window

2019-06-06 Thread Tal Einat


Tal Einat  added the comment:


New changeset 554450fb4e95066e825bdb4a2d544a490daeebdc by Tal Einat in branch 
'master':
bpo-37177: make IDLE's search dialogs transient (GH-13869)
https://github.com/python/cpython/commit/554450fb4e95066e825bdb4a2d544a490daeebdc


--

___
Python tracker 

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



[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-06 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue37162] new importlib dependencies csv, email and zipfile

2019-06-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

@staticmethod
def _switch_path(path):
from contextlib import suppress
import zipfile
from pathlib import Path
with suppress(Exception):
return zipfile.Path(path)
return Path(path)

Oh, I did not know about zipfile.Path!

I do not think this is a correct solution. It does not work with general 
loaders. I think that it would be more correct to override some methods in 
zipimport.

--

___
Python tracker 

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



[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-06 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

+1 to Serhiy's proposal

--
nosy: +pablogsal

___
Python tracker 

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



[issue37187] CField.size from the ctypes module does not behave as documented on bitfields

2019-06-06 Thread Eric Wieser


New submission from Eric Wieser :

This behavior is pretty surprising:

```python
import ctypes

class Simple(ctypes.Structure):
_fields_ = [
('a', ctypes.c_uint8),
('b', ctypes.c_uint8),
]

class Bitfields(ctypes.Structure):
_fields_ = [
('a', ctypes.c_uint8, 8),
('b', ctypes.c_uint8, 8),
]

print(Simple.b.size) # 1
print(Bitfields.b.size)  # 262148
```

The docstring for this field, from `help(type(Bitfields.b).size)`, is:

> Help on getset descriptor _ctypes.CField.size:
>
> size
>size in bytes of this field

So either the behavior or the docstring needs to change.

--
assignee: docs@python
components: Documentation
messages: 344895
nosy: Eric Wieser, docs@python
priority: normal
severity: normal
status: open
title: CField.size from the ctypes module does not behave as documented on 
bitfields

___
Python tracker 

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



[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`

2019-06-06 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue37176] super() docs don't say what super() does

2019-06-06 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> It only says "Return a proxy object that delegates method 
> calls to a parent or sibling class of type" and then gives
> a bunch of use cases and examples."  

That wording seems very reasonable to me.

--
nosy: +rhettinger

___
Python tracker 

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



[issue37176] super() docs don't say what super() does

2019-06-06 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

The docs do say what super does: it returns "a proxy object that delegates 
method calls to a parent or sibling class of type", just as you quoted. That 
concise description is (almost) completely accurate and precise.

(I say *almost* because it's not just method calls that it works with, but any 
attribute lookup.)

What more do you want? That's not a rhetorical question.

I'm not saying that the docs are perfect or cannot be improved, but they look 
pretty good to me: they tell you what super does, they tell you why you might 
use it, and show how to use it. What's missing? Again, not a rhetorical 
question.

I understand that super is a very advanced corner of the language: there's a 
lot of necessary technical jargon in the docs, e.g.:

- One already needs to have a good understanding of what super *does* in order 
to make sense of the sentence describing what it *is*, so there's an element of 
circular reasoning needed.

- The reader needs to understand that super isn't magical, it just returns an 
object like any other function, and understand what "proxy object" means, as 
well as delegation.

- And have an understanding of how inheritance and the MRO work in Python, and 
the difference between bound and unbound methods/proxies.

I think that to the experienced reader who knows these concepts, the docs 
should be pretty clear and complete.

I'm having a hard time seeing what you believe is missing from the docs. Can 
you explain further?

Perhaps there ought to be a "gentle guide to super" somewhere, and the docs 
could link to that?

--

___
Python tracker 

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



[issue37186] Everyone uses GIL wrong! = DEADLOCK

2019-06-06 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +eric.snow, vstinner

___
Python tracker 

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



[issue37176] super() docs don't say what super() does

2019-06-06 Thread Steven D'Aprano


Change by Steven D'Aprano :


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

___
Python tracker 

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



[issue37176] super() docs don't say what super() does

2019-06-06 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

The docs do say what super does: it returns "a proxy object that delegates 
method calls to a parent or sibling class of type", just as you quoted. That 
concise description is (almost) completely accurate and precise.

(I say *almost* because it's not just method calls that it works with, but any 
attribute lookup.)

What more do you want? That's not a rhetorical question.

I'm not saying that the docs are perfect or cannot be improved, but they look 
pretty good to me: they tell you what super does, they tell you why you might 
use it, and show how to use it. What's missing?

(Again, not a rhetorical question.)

I understand that super is a very advanced corner of the language: there's a 
lot of necessary technical jargon in the docs:

- One already needs to have a good understanding of what super *does* in order 
to make sense of the sentence describing what it *is*, so there's an element of 
circular reasoning needed.

- The reader needs to understand that super isn't magical, it just returns an 
object like any other function, and understand what "proxy object" means, as 
well as delegation.

- And have an understanding of how inheritance and the MRO work in Python, and 
the difference between bound and unbound methods/proxies.

But to the experienced reader who knows these concepts, I'm having a hard time 
seeing what you believe is missing from the docs.

Perhaps there ought to be a "gentle guide to super" somewhere, and the docs 
could link to that?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue37186] Everyone uses GIL wrong! = DEADLOCK

2019-06-06 Thread Roffild


New submission from Roffild :

Everyone uses GIL wrong! = DEADLOCK

I used sub-interpreters in embedded Python:
https://github.com/Roffild/RoffildLibrary/blob/35ef39fafc164d260396b39b28ff897d44cf0adb/Libraries/Roffild/PythonDLL/private.h#L44
https://github.com/Roffild/RoffildLibrary/blob/35ef39fafc164d260396b39b28ff897d44cf0adb/Libraries/Roffild/PythonDLL/mql_class.c#L142

PyEval_AcquireThread(__interp->interp);
...
PyGILState_Ensure() = DEADLOCK
...
PyEval_ReleaseThread(__interp->interp);

A deadlock happens in the line:
https://github.com/python/cpython/blob/7114c6504a60365b8b0cd718da0ec8a737599fb9/Python/pystate.c#L1313

Of course in the help there is the note:
Note that the PyGILState_() functions assume there is only one global 
interpreter (created automatically by Py_Initialize()). Python supports the 
creation of additional interpreters (using Py_NewInterpreter()), but mixing 
multiple interpreters and the PyGILState_() API is unsupported.

But functions PyGILState_() are used in third-party libraries. Most often, 
these functions are used without checking that GIL is already locked. Often, 
these functions are added to the code for reinsurance only and this can affect 
performance.

Numpy:
https://github.com/numpy/numpy/blob/2d4975e75c210202293b894bf98faf12f4697a31/numpy/core/include/numpy/ndarraytypes.h#L987
https://github.com/numpy/numpy/search?q=NPY_ALLOW_C_API_q=NPY_ALLOW_C_API

Pytorch:
https://github.com/pytorch/pytorch/blob/0a3fb45d3d2cfacbd0469bbdba0e6cb1a2cd1bbe/torch/csrc/utils/auto_gil.h#L9
https://github.com/pytorch/pytorch/search?q=AutoGIL_q=AutoGIL

Pybind11 developers have already fixed this problem:
https://github.com/pybind/pybind11/blob/97784dad3e518ccb415d5db57ff9b933495d9024/include/pybind11/pybind11.h#L1846

It is necessary to change the code of PyGILState_() functions to support 
sub-interpreters.

Or add to 
https://docs.python.org/3/c-api/init.html#thread-state-and-the-global-interpreter-lock
 warning:
Some Python libraries cannot be used in a sub-interpreter due to the likelihood 
of deadlock.

For me, this is a critical vulnerability!

There is another problem:
Calling PyEval_AcquireThread() again results in a deadlock. This can be 
controlled in your code, but not in a third-party library.

--
components: Interpreter Core
messages: 344891
nosy: Roffild
priority: normal
severity: normal
status: open
title: Everyone uses GIL wrong! = DEADLOCK
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



[issue24039] Idle: some modal dialogs maximize, don't minimize

2019-06-06 Thread Tal Einat


Change by Tal Einat :


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

___
Python tracker 

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



[issue24139] Use sqlite3 extended error codes

2019-06-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -13749

___
Python tracker 

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



[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread miss-islington


miss-islington  added the comment:


New changeset dba4448c63b687204813a5b04c89dd458d5ac45b by Miss Islington (bot) 
in branch '3.8':
bpo-37134: Add PEP570 notation to the signature of byte{array}.translate 
(GH-13874)
https://github.com/python/cpython/commit/dba4448c63b687204813a5b04c89dd458d5ac45b


--

___
Python tracker 

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



[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13753
pull_request: https://github.com/python/cpython/pull/13875

___
Python tracker 

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



[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset de76c07a8cd0216c3dce215e4d542e2f45aa022f by Pablo Galindo in 
branch 'master':
bpo-37134: Add PEP570 notation to the signature of byte{array}.translate 
(GH-13874)
https://github.com/python/cpython/commit/de76c07a8cd0216c3dce215e4d542e2f45aa022f


--

___
Python tracker 

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



[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +13752
pull_request: https://github.com/python/cpython/pull/13874

___
Python tracker 

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



[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

On Python 3, you can use tracemalloc.get_object_traceback() to find where an 
object was allocated ;-)

--

___
Python tracker 

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



[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like the translate() method of bytes and bytearray also needs a "/" in 
their doc.

I wrote a quick & dirty script to parse C files:
---
import glob

def parse(filename):
clinic_input = False
args = False
positional = False
func = None
for line_number, line in enumerate(open(filename)):
line = line.rstrip()
if line.startswith("/*[clinic input]"):
clinic_input = True
args = False
positional = False
func = None
elif clinic_input and func is None:
func = line
elif clinic_input and not args and not line:
args = True
elif args and line == "/":
positional = True
elif positional and (line == "*" or line.startswith("[clinic start 
generated code]")):
clinic_input = False
args = False
positional = False
func = None
elif positional and line:
print("!!!", filename, line_number, func, repr(line))
elif not line:
clinic_input = False
args = False
positional = False
func = None

for filename in glob.glob("*/**.c"):
parse(filename)
---

Output on the master branch:
---
!!! Modules/_struct.c 2224 unpack_from 'buffer: Py_buffer'
!!! Modules/_struct.c 2225 unpack_from 'offset: Py_ssize_t = 0'
!!! Modules/zlibmodule.c 195 zlib.compress 'level: 
int(c_default="Z_DEFAULT_COMPRESSION") = Z_DEFAULT_COMPRESSION'
!!! Modules/zlibmodule.c 196 zlib.compress 'Compression level, in 0-9 
or -1.'
!!! Modules/zlibmodule.c 314 zlib.decompress 'wbits: 
int(c_default="MAX_WBITS") = MAX_WBITS'
!!! Modules/zlibmodule.c 315 zlib.decompress 'The window buffer size 
and container format.'
!!! Modules/zlibmodule.c 316 zlib.decompress 'bufsize: 
ssize_t(c_default="DEF_BUF_SIZE") = DEF_BUF_SIZE'
!!! Modules/zlibmodule.c 317 zlib.decompress 'The initial output buffer 
size.'
!!! Modules/zlibmodule.c 744 zlib.Decompress.decompress 'max_length: 
ssize_t = 0'
!!! Modules/zlibmodule.c 745 zlib.Decompress.decompress 'The maximum 
allowable length of the decompressed data.'
!!! Modules/zlibmodule.c 746 zlib.Decompress.decompress 'Unconsumed 
input data will be stored in'
!!! Modules/zlibmodule.c 747 zlib.Decompress.decompress 'the 
unconsumed_tail attribute.'
!!! Objects/bytearrayobject.c 1197 bytearray.translate 'delete as 
deletechars: object(c_default="NULL") = b\'\''
!!! Objects/bytesobject.c 2080 bytes.translate 'delete as deletechars: 
object(c_default="NULL") = b\'\''
!!! Python/bltinmodule.c 2282 sum as builtin_sum 'start: 
object(c_default="NULL") = 0'
---

--

___
Python tracker 

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



[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`

2019-06-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

I figured as much (but didn't want to lead the witness!).

I'm not completely opposed to this. I think the best thing to do is to bring up 
the proposal on python-ideas, and point here.

--

___
Python tracker 

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



[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks Brian for the prototype!

I will close this now. We can reopen if something is missing in the future.

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



[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks Brian!

--

___
Python tracker 

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



[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`

2019-06-06 Thread Noah


Noah  added the comment:

Yes, I'm piping a large amount of data to/from a fairly long-running subprocess.

--

___
Python tracker 

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



[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`

2019-06-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think Popen() is just about as complex as anyone wants it to be. Is there 
something about .run() or .check_call() that keeps you from using them?

--
nosy: +eric.smith
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



[issue37185] use os.memfd_create in multiprocessing.shared_memory?

2019-06-06 Thread Pierre Glaser


New submission from Pierre Glaser :

Hi,
Following https://bugs.python.org/issue26836, I started thinking about using 
memfd_create instead of shm_open for creating shared-memory segments in 
multiprocessing.shared_memory.

The main advantage of memfd_create over shm_open is that the generated 
resources management is easier: a segment created using using memfd_create is 
released once all references to the segment are dropped. This is not the case 
for segments created using shm_open, for which additional resource tracking is 
needed (using the new multiprocessing.resource_tracker)

The main difference between those two calls is that segments created using 
memfd_create are anonymous and can only be accessed using file descriptors. The 
name argument in the signature serves only for debugging purposes. On the 
contrary, shm_open generates segments that map to a file in /dev/shm: 
therefore, segments each have unique names.

Would we decide to switch from shm_open to memfd_create, the name behavior will 
also change. How big of a deal would that be?

--
messages: 344881
nosy: davin, pierreglaser, pitrou
priority: normal
severity: normal
status: open
title: use  os.memfd_create in multiprocessing.shared_memory?
type: resource usage
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



[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`

2019-06-06 Thread Noah


New submission from Noah :

Suggesting option to raise exception if process exits nonzero in `with 
subprocess.Popen(...):`

with subprocess.Popen('/bin/false'):
pass

I made the mistake of assuming this construct would raise an exception 
(CalledProcessError). It would be nice if there were a way to do that.

--
components: Library (Lib)
messages: 344880
nosy: nlevitt
priority: normal
severity: normal
status: open
title: suggesting option to raise exception if process exits nonzero in `with 
subprocess.Popen(...):`
type: behavior

___
Python tracker 

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



[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread Brian Skinn


Brian Skinn  added the comment:

:thumbsup:

Glad I happened to be in the right place at the right time to put it together. 
I'll leave the tabslash repo up for future reference.

--

___
Python tracker 

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



[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread Phil Frost


Phil Frost  added the comment:

Probably too many C extensions to feasibly audit them all. Also we can't rule 
out something busted in Alpine. So I'm going to set a watchpoint on 
small_ints[1]->ob_ival with a little gdb script to dump core right when it 
changes; hopefully inspecting that backtrace will lead directly to the culprit.

--

___
Python tracker 

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



[issue5225] OS X "Update Shell Profile" may not update $PATH if run more than once

2019-06-06 Thread Carol Willing


Carol Willing  added the comment:

No problem :D Ping me when you need a review.

--

___
Python tracker 

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



[issue5225] OS X "Update Shell Profile" may not update $PATH if run more than once

2019-06-06 Thread Ned Deily

Ned Deily  added the comment:

Please don’t close this.  It’s still an issue that needs to be addressed and I 
intend to do so. Thanks.

--
assignee:  -> ned.deily
versions: +Python 3.9 -Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue15913] PyBuffer_SizeFromFormat is missing

2019-06-06 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


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

___
Python tracker 

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



[issue37182] ast - handling new line inside a string

2019-06-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

There was a recent discussion about this on the bug tracker, but of course now 
I can't find it. But for an earlier discussion, see issue 25885.

The decision was that your expectation that the nodes be distinguishable isn't 
a design goal of the ast. There's no expectation that code can round-trip 
through the ast and produce the original text, even for a string.

--
nosy: +eric.smith
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



[issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall

2019-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset dc2476500d91082f0c907772c83a044bf49af279 by Victor Stinner 
(Zackery Spytz) in branch 'master':
bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860)
https://github.com/python/cpython/commit/dc2476500d91082f0c907772c83a044bf49af279


--

___
Python tracker 

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



[issue33048] macOS job broken on Travis CI

2019-06-06 Thread Carol Willing


Carol Willing  added the comment:

Folks, I'm going to close this as resolved since we are now using Azure 
Pipelines for MacOS as well. Brew has also since come up with a naming policy 
for 2 or 3 so hopefully (?) there will be no further renaming.

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



[issue37183] Linker failure when creating main binary with python-config --libs

2019-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

It is a deliberate change but matbe it is not well documented? Should we
update the C API doc?

--

___
Python tracker 

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



[issue5225] OS X "Update Shell Profile" may not update $PATH if run more than once

2019-06-06 Thread Carol Willing


Carol Willing  added the comment:

@ned.deily I'm doing some triaging today. As the original submitter of this 
issue, would you be willing to close it? Thanks.

--

___
Python tracker 

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



[issue23324] Nonblocking serial io using Arduino and Ubuntu 14.10 (Python 3.4.2) performance slowdown

2019-06-06 Thread Carol Willing


Carol Willing  added the comment:

@MrYsLab Well, I'm glad it resolved itself along the way. 

Your project looks cool and the docs are very nice too. Thanks for the link.

--

___
Python tracker 

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



[issue37183] Linker failure when creating main binary with python-config --libs

2019-06-06 Thread Christian Heimes


Christian Heimes  added the comment:

memo to me: read the **whole** what's new document.

https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build

--
resolution:  -> not a bug
stage: needs patch -> 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



[issue23324] Nonblocking serial io using Arduino and Ubuntu 14.10 (Python 3.4.2) performance slowdown

2019-06-06 Thread Alan Yorinks

Alan Yorinks  added the comment:

Hi Carol,
     Thanks for the update. I retested on Python 3.7 and the problem 
seems to have been resolved some where along the way.
BTW, I am using MicroPython on an ESP8266 remotely controlled from a 
Python program on a PC. You can read about it here:
https://mryslab.github.io/python_banyan/#gpio_intro/.

Looking forward to 3.8!

Thanks again,
Alan

On 6/6/19 3:56 PM, Carol Willing wrote:
> Change by Carol Willing :
>
>
> --
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue37182] ast - handling new line inside a string

2019-06-06 Thread Ilya Kamenshchikov


Ilya Kamenshchikov  added the comment:

Same problem holds for tabs (\\t vs \t).

For \\r vs \r, it is even more fun: 
txt1 = '"""\\r"""'
txt2 = '"""\r"""'

>>> b'\r'
>>> b'\n'

--

___
Python tracker 

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



[issue37183] Linker failure when creating main binary with python-config --libs

2019-06-06 Thread Christian Heimes


Christian Heimes  added the comment:

python-3.8.pc also omits -lpython3.8:

$ pkg-config python-3.8 --libs

--

___
Python tracker 

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



[issue23324] Nonblocking serial io using Arduino and Ubuntu 14.10 (Python 3.4.2) performance slowdown

2019-06-06 Thread Carol Willing


Change by Carol Willing :


--
status: open -> closed

___
Python tracker 

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



[issue23324] Nonblocking serial io using Arduino and Ubuntu 14.10 (Python 3.4.2) performance slowdown

2019-06-06 Thread Carol Willing


Carol Willing  added the comment:

@MrYsLab, Sorry that this issue wasn't resolved in the past. 

I would like to close this since we are currently working on a 3.8 release. I'm 
going to do that now. You may wish to take a look at MicroPython and 
CircuitPython if you haven't already seen them. They are pretty interesting.

Thanks for using Python.

--
resolution:  -> out of date
stage:  -> resolved

___
Python tracker 

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



[issue37183] Linker failure when creating main binary with python-config --libs

2019-06-06 Thread Christian Heimes


New submission from Christian Heimes :

With 3.8 it is no longer possible to compile a custom Python interpreter with 
linker flags from python-config. The config helper omits the main Python 
library:

$ python3.8-config --ldflags
 -L/usr/lib64  -lcrypt -lpthread -ldl  -lutil -lm -lm

$ gcc  -L/usr/lib64  -lcrypt -lpthread -ldl  -lutil -lm -lm -o custompython 
custompython.o
/usr/bin/ld: custompython.o: in function `main':
custompython.c:10: undefined reference to `Py_BytesMain'
collect2: error: ld returned 1 exit status

--
components: Interpreter Core
messages: 344864
nosy: christian.heimes, vstinner
priority: high
severity: normal
stage: needs patch
status: open
title: Linker failure when creating main binary with python-config --libs
type: compile error
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



[issue36520] Email header folded incorrectly

2019-06-06 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:


New changeset f6713e84afc5addcfa8477dbdf2c027787f711c0 by Barry Warsaw 
(websurfer5) in branch 'master':
bpo-36520: Email header folded incorrectly (#13608)
https://github.com/python/cpython/commit/f6713e84afc5addcfa8477dbdf2c027787f711c0


--

___
Python tracker 

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



[issue21106] Updated Mac folder icon

2019-06-06 Thread Carol Willing


Carol Willing  added the comment:

This was resolved in https://github.com/python/cpython/pull/1780. Thanks 
@ned.deily.

--
keywords: +patch
message_count: 15.0 -> 16.0
pull_requests: +13750
resolution:  -> fixed
stage: resolved -> patch review
status: open -> closed
pull_request: https://github.com/python/cpython/pull/1780

___
Python tracker 

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



[issue37182] ast - handling new line inside a string

2019-06-06 Thread Ilya Kamenshchikov


New submission from Ilya Kamenshchikov :

parsing two different strings produces identical ast.Str nodes:

import ast

txt1 = '"""\\n"""'
txt2 = '"""\n"""'

tree1 = ast.parse(txt1)
tree2 = ast.parse(txt2)

print(tree1.body[0].value.s == tree2.body[0].value.s)
print(bytes(tree1.body[0].value.s, encoding='utf-8'))
print(bytes(tree2.body[0].value.s, encoding='utf-8'))

>>> True
>>> b'\n'
>>> b'\n'

Expected result: I should be able to distinguish between the nodes created from 
two different strings.

--
components: Library (Lib)
messages: 344861
nosy: Ilya Kamenshchikov
priority: normal
severity: normal
status: open
title: ast - handling new line inside a string
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



[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread Carol Willing


Carol Willing  added the comment:

@brian, Just to echo Brett's words, the Steering Council appreciated the tabbed 
prototype and your effort to create it. While we may not use it in this 
particular case, it's great to keep in mind for other places. Thanks for 
contributing :D

--

___
Python tracker 

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



[issue30809] IDLE parenmatch - highlighting options

2019-06-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I agree.  The parenmatch highlighting is so transient that it hardly matters 
what it is, except that it should not match a syntax color.

--
dependencies:  -Idle extension configuration: add option-help option
resolution:  -> rejected
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



[issue37162] new importlib dependencies csv, email and zipfile

2019-06-06 Thread Brett Cannon


Change by Brett Cannon :


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



[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread Brett Cannon


Brett Cannon  added the comment:

@Brian: And thanks for the experiment! It was an interesting idea to consider.

--

___
Python tracker 

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



[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread Brett Cannon


Brett Cannon  added the comment:

@Brian: Probably not. The worry that came up during the steering council 
meeting was bifurcating the docs could cause confusion as to why it was 
different, which one was more "right", etc.

--

___
Python tracker 

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



[issue37180] Fix Persian KAF in mac_farsi.py

2019-06-06 Thread Ned Deily


Change by Ned Deily :


--
nosy: +lemburg

___
Python tracker 

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



[issue24139] Use sqlite3 extended error codes

2019-06-06 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +13749
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13869

___
Python tracker 

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



[issue37180] Fix Persian KAF in mac_farsi.py

2019-06-06 Thread SilentGhost


SilentGhost  added the comment:

The names of the characters given in comments agree with the unicode database 
name (they're indeed ARABIC-INDIC DIGITs and ARABIC LETTER).

The replacement character that you're proposing is called (according to the 
same database) 'ARABIC LETTER KEHEH', whereas the old one was 'ARABIC LETTER 
KAF'. This encoding was originally generated based on data from unicode.org, 
I'd think a reference would be needed making clear that this is indeed a valid 
replacement.

--
components: +Unicode, macOS
nosy: +SilentGhost, ezio.melotti, ned.deily, ronaldoussoren, vstinner
type: enhancement -> 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



[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread Mark Dickinson


Mark Dickinson  added the comment:

This smells a bit as though someone's doing something like:

myobject = PyInt_FromLong(some_long);

and then assuming that they hold the only reference to `myobject`, so that it's 
safe to mutate in place.

--

___
Python tracker 

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



[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread Mark Dickinson


Mark Dickinson  added the comment:

Interesting indeed.

What 3rd party extension are installed in your Python environment? Is it 
possible that one of them is messing with the CPython internals (perhaps in an 
overeager attempt to optimize)? Any uses of ctypes?

--

___
Python tracker 

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



[issue37181] fix test_regrtest failures on Windows arm64

2019-06-06 Thread Paul Monson


Change by Paul Monson :


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

___
Python tracker 

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



[issue37181] fix test_regrtest failures on Windows arm64

2019-06-06 Thread Paul Monson


Change by Paul Monson :


--
components: Tests, Windows
nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: fix test_regrtest failures on Windows arm64
type: enhancement
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



[issue24039] Idle: some modal dialogs maximize, don't minimize

2019-06-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Dialogs attached to a particular window should be 'transient' to that window.  
https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M64
It is an oversight that the window search and replace windows are not.
Modal windows, including the current Find in Files might just as well be.  

PR 13869 for #37177 (aimed at a different symption) makes search windows 
transient, fixing this issue also.

If Find in Files were not modal, then it need not be transient to a particular 
window, and minimizing could be sensible.  But this is a separate issue.

--
stage: needs patch -> 
versions: +Python 3.8, Python 3.9 -Python 3.6

___
Python tracker 

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



[issue37180] Fix Persian KAF in mac_farsi.py

2019-06-06 Thread Ramin Najjarbashi


Change by Ramin Najjarbashi :


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

___
Python tracker 

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



[issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point

2019-06-06 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

Since having tempfile.TemporaryDirectory() automatically unmount mount points 
is difficult to implement in a portable way (Windows, BSD/macOS, and Linux are 
all different), a shorter-term solution could be to add an 'onerror' callback 
function as a class initialization parameter. This would allow the caller to 
inspect and try to handle any directory entries that the cleanup() function 
can't handle (like unmounting a mount point).

--

___
Python tracker 

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



[issue37180] Fix Persian KAF in mac_farsi.py

2019-06-06 Thread Ramin Najjarbashi

New submission from Ramin Najjarbashi :

Regarding the file named: "Lib/encodings/mac_farsi.py", the numbers are 
inserted in the wrong way, they are inserted Arabic numbers instead of Persian, 
they are edited in the comment.
The KAF character (ك) which was the Arabic version, has been changed and edited 
to the Persian version(ک).

It's not a big deal, but it's my first step to improve my favorite language ;)

--
messages: 344850
nosy: RaminNietzsche
priority: normal
severity: normal
status: open
title: Fix Persian KAF in mac_farsi.py
type: enhancement

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-06 Thread Mark Dickinson


Change by Mark Dickinson :


--
pull_requests: +13746
pull_request: https://github.com/python/cpython/pull/13870

___
Python tracker 

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



[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2019-06-06 Thread Fantix King


Change by Fantix King :


--
nosy: +fantix

___
Python tracker 

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



[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2019-06-06 Thread Yury Selivanov


Yury Selivanov  added the comment:

Yeah, we have the SSL reimplementation ready to be backported from uvloop to 
cpython.  Fantix, the original author, should be able to do that soon.

--

___
Python tracker 

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



[issue30809] IDLE parenmatch - highlighting options

2019-06-06 Thread Tal Einat


Tal Einat  added the comment:

FWIW I'm -1 on this change, due to the decision to keep IDLE simple for new 
users learning Python rather than power users.

--
nosy: +taleinat

___
Python tracker 

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



[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread Phil Frost


Phil Frost  added the comment:

So this is uminteresting

(gdb) p small_ints[0]
$2 = (PyIntObject *) 0x558ce65df528
(gdb) p *small_ints[0]
$3 = {ob_refcnt = 18, ob_type = 0x7fe019b694c0 , ob_ival = -5}
(gdb) p *small_ints[1]
$4 = {ob_refcnt = 65, ob_type = 0x7fe019b694c0 , ob_ival = -3}
(gdb) p *small_ints[2]
$5 = {ob_refcnt = 204, ob_type = 0x7fe019b694c0 , ob_ival = -3}
(gdb) p *small_ints[3]
$6 = {ob_refcnt = 1872, ob_type = 0x7fe019b694c0 , ob_ival = -2}

When is 1/1=10? When -5 + 1 = -3.

So now I suppose the question is how this comes to be.

--

___
Python tracker 

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



[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2019-06-06 Thread Cooper Lees


New submission from Cooper Lees :

aiohttp would love to be able to support HTTPS Proxy servers. To do this, 
asyncio itself needs to be able to provide TLS within TLS connections.

Can we add this support to asyncio please.

(I tried search but could not find a related issue - Please merge if there is)

--
components: asyncio
messages: 344846
nosy: asvetlov, cooperlees, yselivanov
priority: normal
severity: normal
status: open
title: asyncio loop.start_tls() provide support for TLS in TLS
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



[issue37177] IDLE: Search dialogs can be hidden behind the main window

2019-06-06 Thread Tal Einat


Change by Tal Einat :


--
nosy: +IrvKalb

___
Python tracker 

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



[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread Stefan Krah


Stefan Krah  added the comment:

Yes, I'd try Debian first, then potential libc issues can also be eliminated in 
a single experiment.

--

___
Python tracker 

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



[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread Phil Frost


Phil Frost  added the comment:

> Alpine Linux apparently uses musl.  Is that well supported and tested?

Heh. Not really.

Switching to a Debian container is probably just about as much work as building 
Python from source. Would that be preferable?

--

___
Python tracker 

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



[issue14367] try/except block in ismethoddescriptor() in inspect.py, so that pydoc works with pygame in Python 3.2

2019-06-06 Thread Rene Dudfield


Rene Dudfield  added the comment:

This can be closed.

$ python3 -m pydoc -p 7464

Then view in browser: http://localhost:7464/pygame.html


No error.

--
nosy: +illume

___
Python tracker 

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



[issue21315] email._header_value_parser does not recognise in-line encoding changes

2019-06-06 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:


New changeset dc20fc4311dece19488299a7cd11317ffbe4d3c3 by Barry Warsaw (Miss 
Islington (bot)) in branch '3.7':
bpo-21315: Fix parsing of encoded words with missing leading ws. (GH-13425) 
(#13846)
https://github.com/python/cpython/commit/dc20fc4311dece19488299a7cd11317ffbe4d3c3


--

___
Python tracker 

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



[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-06-06 Thread Steve Dower


Steve Dower  added the comment:

Changing our policy here (from "no policy" to "here's a recommendation") 
probably deserves a python-dev discussion first.

--

___
Python tracker 

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



[issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall

2019-06-06 Thread Zackery Spytz


Change by Zackery Spytz :


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



[issue37178] One argument form of math.perm()

2019-06-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I never seen a one argument form of P(n, k) in mathematics. 
itertools.permutations() corresponds two functions: math.perm() and math 
.factorial(). Unless you a going to add a new function in the itertools module 
equal to a one argument form of itertools.permutations() there will be no full 
symmetry.

--

___
Python tracker 

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



[issue37156] Fix libssl DLL tag in Tools/msi project

2019-06-06 Thread Steve Dower


Change by Steve Dower :


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



[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread Stefan Krah


Stefan Krah  added the comment:

There are lots of ideas still. :)

As I said, on a Linux other than RedHat or Debian or such I'd first try
to blame the shipped Python, then the libc (I had a glibc memmove issue
once with similar inexplicable results).

Alpine Linux apparently uses musl.  Is that well supported and tested?



Since you mention concurrency: Before the arrival of contextvars in 3.7
the decimal context is thread-safe, but not coroutine-safe.


If the issue is really in that particular loop I can't see how
that could be the cause, but perhaps the core dump is not accurate.

--

___
Python tracker 

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



[issue36865] FileInput does not allow 'rt' mode, but all its existing delegates do

2019-06-06 Thread Nathaniel Gaertner


Nathaniel Gaertner  added the comment:

Hey sorry for the delay in responding.

My thought with forcing 'rt' mode is that it would actually reduce the 
flexibility of the FileInput class. For 5758, I suspect the issue arose out of 
a confusion about what strings meant in python 2 vs 3. If I understand 
correctly, a "string" in 2 is actually an array of binary data, displayed as if 
it were ASCII encoded text. So when it prints the binary data from the gzip 
file in the example given on that issue, it's happy to say "aha this is ASCII 
encoded text, let's print it like a string." This leads to the case where 2 
"works" (does not mark the printed data from gzip explicitly as binary).

But in 3 strings and binary arrays are totally different kinds of objects! I am 
unfamiliar with the history of introducing 'rt', but I'm guessing it has to do 
with disambiguating 'r', since text is now stored in its own unique object type 
and goes through an explicit encoding process to get there. With the explicit 
'rt' and 'rb' modes, 'r' becomes explicitly ambiguous (an oxymoron I know), so 
if a user provides 'r' they are expressing no preference between text and 
binary. If they have a preference 'rt' and 'rb' give them the ability to 
express it.

I may be totally on the wrong track here, or missing some important backward 
compatibility issues, but that's my thoughts. Thanks!

--

___
Python tracker 

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



[issue37178] One argument form of math.perm()

2019-06-06 Thread Tim Peters


Tim Peters  added the comment:

I agree: perm(n) should return factorial(n).

--

___
Python tracker 

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



[issue37156] Fix libssl DLL tag in Tools/msi project

2019-06-06 Thread miss-islington


miss-islington  added the comment:


New changeset 1c4084f4c13d7ec516abc0439288cbeb2c96489a by Miss Islington (bot) 
in branch '3.8':
bpo-37156: Fix libssl DLL tag in MSI sources (GH-13866)
https://github.com/python/cpython/commit/1c4084f4c13d7ec516abc0439288cbeb2c96489a


--
nosy: +miss-islington

___
Python tracker 

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



[issue37178] One argument form of math.perm()

2019-06-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

perm(n, n) = factorial(n)

--

___
Python tracker 

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



[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread Phil Frost


Phil Frost  added the comment:

skrah: Yes, that's correct. Since I can only produce this bug in production it 
will take me some days to build and validate a source build. But absent any 
better ideas, I will try.

tim.peters: I've observed this bug across hundreds of EC2 hosts, in dozens of 
code paths, with all kinds of inputs. Moreover, the hosts aren't displaying any 
other symptoms of hardware failure such as random segfaults or mysteriously 
corrupted data.

I've also deeply investigated two cores now which show specifically that `exp` 
seems to get 2 added when it should have been 1. I have a hard time explaining 
how a hardware failure can cause precisely the same failure so reliably.

So I doubt hardware is to blame.

Although, it does seem the issue occurs in "clumps" on individual hosts. So we 
might go 10 hours without seeing the issue, then it may happen 5 times within 
30 minutes on one host. We might observe 1 or 2 more such clumps on the same 
host until the next deploy of the application, at which point all the 
containers are replaced with fresh ones. So this suggests there is some 
ephemeral state within a host that creates a propensity for the issue.

I've also been unable to reproduce the problem in a development environment, 
even when that development environment is using the same kernel, instance 
class, and docker container as production. So I suspect the bug is precipitated 
by some particular concurrency or interaction that I haven't been able to 
replicate.

--

___
Python tracker 

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



[issue37178] One argument form of math.perm()

2019-06-06 Thread Raymond Hettinger


New submission from Raymond Hettinger :

The perm() function should have a one argument form and change its signature to 
``perm(n, k=None)``.  This matches what itertools:

itertools.permutations(iterable, r=None)
   Return successive r length permutations of elements
   in the iterable.

   If r is not specified or is None, then r defaults to
   the length of the iterable and all possible full-length
   permutations are generated.

--
components: Library (Lib)
messages: 344833
nosy: mark.dickinson, rhettinger, serhiy.storchaka, tim.peters
priority: normal
severity: normal
status: open
title: One argument form of math.perm()
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



[issue37177] IDLE: Search dialogs can be hidden behind the main window

2019-06-06 Thread Tal Einat


Tal Einat  added the comment:

See proposed fix in GH-13869.

--

___
Python tracker 

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



[issue37177] IDLE: Search dialogs can be hidden behind the main window

2019-06-06 Thread Tal Einat


Change by Tal Einat :


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

___
Python tracker 

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



[issue37177] IDLE: Search dialogs can be hidden behind the main window

2019-06-06 Thread Tal Einat


Change by Tal Einat :


--
stage:  -> needs patch
type:  -> behavior
versions: +Python 2.7, 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



[issue37177] IDLE: Search dialogs can be hidden behind the main window

2019-06-06 Thread Tal Einat


New submission from Tal Einat :

This issue was brought up by Irv Kalb on the idle-dev mailing list.

I haven't been able to reproduce it exactly as he described, but I have managed 
to do so otherwise, and remember it happening on occasion on other computers.

This appears to happen because the dialog windows are not being made transient 
relative to the main window. I'll have a PR up with a fix in a bit.


Following is what Irv Kalb sent to the mailing list:

I teach Python classes using IDLE.  The search dialog is a real a problem for 
new students and me as the teacher.  My students and I often get into a 
scenario where the search dialog gets hidden behind a editing window.  When 
that happens, then you try to make edits in code and nothing happens.  This 
happens to very often.  I have learned to look for the hidden search dialog 
window, but my students get very flustered.


Simple steps to reproduce (I'm using Python 3.6.1 with IDLE):

Open a new document.

Enter any code (e.g., a = 1)

Bring up the Search Dialog.

If the Search Dialog is not over the rectangle of the editing window, 
move it anywhere over the editing window.
(This step is specifically to reproduce the problem, but this happens 
very often as students move windows around.)

Search for: a

Click: Find Next

Click in the editing window (with the intention to make some change)

Results:

Search Dialog is now hidden behind the editing window.  
Keystrokes are now ignored in the editing window, even though the 
editing window appears to have focus.
User has no idea about how to get out of this situation - unless they 
have seen it before and know that the Search Dialog is still active behind the 
current window.

--
assignee: terry.reedy
components: IDLE
messages: 344831
nosy: taleinat, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Search dialogs can be hidden behind the main window

___
Python tracker 

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



[issue34971] add support for tls/ssl sessions in asyncio

2019-06-06 Thread Cooper Lees


Change by Cooper Lees :


--
nosy: +cooperlees

___
Python tracker 

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



[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-06-06 Thread Michael Felt


Michael Felt  added the comment:

On 06/06/2019 14:14, Tal Einat wrote:
> Tal Einat  added the comment:
>
> Steve's suggestion sounds reasonable.
>
> Should we just add this to the devguide, then?

Well, as I said before - it was never about THIS being the solution.
While that would have been nice (for my ego). Would it be worthwhile,
assuming this moves to "devguide" status - for me to work through the
tests - looking for the tests that do not follow these guidelines and
"patch" those?

Probably minor, but it is something I could do. Think of it as
"self-documentation" rather than .rst files.

>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue18355] Merge super() guide into documentation

2019-06-06 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

I opened another doc issue about super(): #37176

--
nosy: +jdemeyer

___
Python tracker 

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



[issue37156] Fix libssl DLL tag in Tools/msi project

2019-06-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13744
pull_request: https://github.com/python/cpython/pull/13868

___
Python tracker 

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



[issue37156] Fix libssl DLL tag in Tools/msi project

2019-06-06 Thread Steve Dower


Steve Dower  added the comment:


New changeset e0c0c7e8c9f8153a54b92e43aa3d09e69a9fd0c0 by Steve Dower in branch 
'master':
bpo-37156: Fix libssl DLL tag in MSI sources (GH-13866)
https://github.com/python/cpython/commit/e0c0c7e8c9f8153a54b92e43aa3d09e69a9fd0c0


--

___
Python tracker 

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



[issue37176] super() docs don't say what super() does

2019-06-06 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

The documentation for super() at 
https://docs.python.org/3.8/library/functions.html#super does not actually say 
what super() does. It only says "Return a proxy object that delegates method 
calls to a parent or sibling class of type" and then gives a bunch of use cases 
and examples.

If there is one place where we should define exactly what super() does (as 
opposed to give guidance on how to use it), the stdlib reference should be it.

--
assignee: docs@python
components: Documentation
messages: 344827
nosy: docs@python, jdemeyer
priority: normal
severity: normal
status: open
title: super() docs don't say what super() does
type: enhancement
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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

Note for myself: Python 2 urllib.urlopen(url) always quotes the URL and so is 
not vulnerable to HTTP Header Injection (at least, not to this issue ;-)).

--

___
Python tracker 

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



  1   2   >