[issue35086] tkinter docs: errors in A Simple Hello World Program

2018-10-28 Thread Daniel Lovell


Daniel Lovell  added the comment:

Thanks for the reply xtreak. I agree that changing the example to include 
main() isn't necessary - I unintentionally included that from my example of the 
case where the current version isn't functional. 

In the PR I submitted on Github (https://github.com/python/cpython/pull/10160), 
the proposed change is simply adding the master Tk instance to self.master then 
using that to close the window in the Quit button callback.

Sorry for the confusion.

--

___
Python tracker 

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



[issue35087] IDLE: update idlelib help files for current doc build

2018-10-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue35088] Update idlelib.help.copy_string docstring

2018-10-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue35042] Use the role :pep: for the PEP \d+

2018-10-28 Thread Julien Palard


Change by Julien Palard :


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



[issue1529353] Squeezer - squeeze large output in IDLE's shell

2018-10-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +9493

___
Python tracker 

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



[issue34364] problem with traceback for syntax error in f-string

2018-10-28 Thread Anthony Sottile


Change by Anthony Sottile :


--
keywords: +patch
pull_requests: +9494
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



[issue35089] Remove typing.io and typing.re from documentation

2018-10-28 Thread Sebastian Rittau


New submission from Sebastian Rittau :

Per the discussion in https://github.com/python/typing/issues/589 and 
https://github.com/python/typeshed/issues/1652, IO, BinaryIO, TextIO, Pattern, 
and Match should be imported directly from typing, not from typing.io and 
typing.re. The documentation needs to be adjusted accordingly.

--
assignee: docs@python
components: Documentation
messages: 328683
nosy: docs@python, srittau
priority: normal
severity: normal
status: open
title: Remove typing.io and typing.re from documentation

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9495

___
Python tracker 

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



[issue32892] Remove specific constant AST types in favor of ast.Constant

2018-10-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6015cc50bc38b9e920ce4986ee10658eaa14f561 by Serhiy Storchaka in 
branch 'master':
bpo-32892: Support subclasses of base types in isinstance checks for AST 
constants. (GH-9934)
https://github.com/python/cpython/commit/6015cc50bc38b9e920ce4986ee10658eaa14f561


--

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 913876d824d969f8c7431e8a9d4610a9a11a786e by Serhiy Storchaka in 
branch 'master':
bpo-35054: Add yet more index entries for symbols. (GH-10121)
https://github.com/python/cpython/commit/913876d824d969f8c7431e8a9d4610a9a11a786e


--

___
Python tracker 

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



[issue35089] Remove typing.io and typing.re from documentation

2018-10-28 Thread Sebastian Rittau


Change by Sebastian Rittau :


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

___
Python tracker 

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



[issue35090] bz2: Potential division by zero in BZ2_Malloc()

2018-10-28 Thread Alexey Izbyshev


New submission from Alexey Izbyshev :

BZ2_Malloc() checks for size < 0 at 
https://github.com/python/cpython/blob/6015cc50bc38b9e920ce4986ee10658eaa14f561/Modules/_bz2module.c#L278
 , but doesn't check for size == 0 before dividing by it:

if (items < 0 || size < 0)
return NULL;
if ((size_t)items > (size_t)PY_SSIZE_T_MAX / (size_t)size)
return NULL;

Reported by Svace static analyzer.

--
components: Extension Modules
messages: 328686
nosy: berker.peksag, izbyshev, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: bz2: Potential division by zero in BZ2_Malloc()
type: behavior
versions: Python 3.6, 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



[issue35090] bz2: Potential division by zero in BZ2_Malloc()

2018-10-28 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


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

___
Python tracker 

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



[issue35083] Fix documentation for __instancecheck__

2018-10-28 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

python-ideas thread for the issue : 
https://mail.python.org/pipermail/python-ideas/2018-October/054335.html

--
nosy: +xtreak

___
Python tracker 

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



[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2018-10-28 Thread Alexey Izbyshev


New submission from Alexey Izbyshev :

gallop_left() and gallop_right() functions explicitly rely on overflowing 
behavior of Py_ssize_t 
(https://github.com/python/cpython/blob/6015cc50bc38b9e920ce4986ee10658eaa14f561/Objects/listobject.c#L1361):

ofs = (ofs << 1) + 1;
if (ofs <= 0)   /* int overflow */
ofs = maxofs;

Signed integer overflow is undefined in C, and the above is guaranteed to work 
only if compiler-specific workarounds are applied, such as GCC's -fwrapv (that 
is what CPython does). Without such workarounds the compiler would be free to 
remove the if statement.

--
components: Interpreter Core
messages: 328688
nosy: berker.peksag, izbyshev, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Objects/listobject.c: gallop functions rely on signed integer overflow
type: behavior
versions: Python 2.7, Python 3.6, 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



[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2018-10-28 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


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

___
Python tracker 

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



[issue35089] Remove typing.io and typing.re from documentation

2018-10-28 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +gvanrossum, levkivskyi

___
Python tracker 

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



[issue35064] COUNT_ALLOCS build export inc_count() and dec_count() functions which don't have a "Py_" prefix

2018-10-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 49c75a8086c3df9add0779d2479b8f09b95cdf3b by Pablo Galindo in 
branch 'master':
bpo-35064 prefix smelly symbols that appear with COUNT_ALLOCS with _Py_ 
(GH-10152)
https://github.com/python/cpython/commit/49c75a8086c3df9add0779d2479b8f09b95cdf3b


--

___
Python tracker 

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



[issue35064] COUNT_ALLOCS build export inc_count() and dec_count() functions which don't have a "Py_" prefix

2018-10-28 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue35092] test_socket fails in MacOS High Sierra when running with -Werror

2018-10-28 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :



==
ERROR: testCmsgTruncLen0Plus1 (test.test_socket.RecvmsgIntoSCMRightsStreamTest)
--
Traceback (most recent call last):
  File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3387, in 
testCmsgTruncLen0Plus1
self.checkTruncatedArray(ancbuf=socket.CMSG_LEN(0) + 1, maxdata=1)
  File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3362, in 
checkTruncatedArray
len(MSG), ancbuf)
  File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 2436, in 
doRecvmsg
result = sock.recvmsg_into([buf], *args)
RuntimeWarning: received malformed or improperly-truncated ancillary data

==
ERROR: testCmsgTruncLen1 (test.test_socket.RecvmsgIntoSCMRightsStreamTest)
--
Traceback (most recent call last):
  File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3394, in 
testCmsgTruncLen1
maxdata=SIZEOF_INT)
  File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3362, in 
checkTruncatedArray
len(MSG), ancbuf)
  File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 2436, in 
doRecvmsg
result = sock.recvmsg_into([buf], *args)
RuntimeWarning: received malformed or improperly-truncated ancillary data

==
ERROR: testCmsgTruncLen2Minus1 (test.test_socket.RecvmsgIntoSCMRightsStreamTest)
--
Traceback (most recent call last):
  File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3401, in 
testCmsgTruncLen2Minus1
maxdata=(2 * SIZEOF_INT) - 1)
  File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3362, in 
checkTruncatedArray
len(MSG), ancbuf)
  File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 2436, in 
doRecvmsg
result = sock.recvmsg_into([buf], *args)
RuntimeWarning: received malformed or improperly-truncated ancillary data

--
Ran 555 tests in 24.708s

FAILED (errors=8, skipped=142)
test test_socket failed
test_socket failed

1 test failed:
test_socket

Total duration: 25 sec
Tests result: FAILURE

--
components: macOS
messages: 328690
nosy: ned.deily, pablogsal, ronaldoussoren
priority: normal
severity: normal
status: open
title: test_socket fails in MacOS High Sierra when running with -Werror
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



[issue32892] Remove specific constant AST types in favor of ast.Constant

2018-10-28 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue35092] test_socket fails in MacOS High Sierra when running with -Werror

2018-10-28 Thread Ned Deily


Ned Deily  added the comment:

This is a longstanding minor issue as described in Issue23828. A twist here is 
that running with -Werror causes a test failure where normally there is just a 
warning.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> test_socket testCmsgTruncLen0 gets "received malformed or 
improperly-truncated ancillary data" warning under OS X

___
Python tracker 

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



[issue23828] test_socket testCmsgTruncLen0 gets "received malformed or improperly-truncated ancillary data" warning under OS X

2018-10-28 Thread Ned Deily


Ned Deily  added the comment:

Duplicate Issue35092 notes that running the tests with -Werror turns these 
warnings into test failures.

--
components: +macOS
nosy: +ronaldoussoren
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue35090] bz2: Potential division by zero in BZ2_Malloc()

2018-10-28 Thread STINNER Victor


STINNER Victor  added the comment:

Check other wrappers to memory allocators:

* zlib: "zst.zalloc = PyZlib_Malloc" which calls PyMem_RawMalloc
* _lzma: "self->alloc.alloc = PyLzma_Malloc" which calls PyMem_RawMalloc
* _bz2: "bzalloc = BZ2_Malloc" which calls PyMem_RawMalloc()

https://bugs.python.org/issue35056#msg328533

--

___
Python tracker 

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



[issue34672] '%Z' strftime specifier never works with musl

2018-10-28 Thread Xiang Zhang


Change by Xiang Zhang :


--
pull_requests: +9499

___
Python tracker 

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



[issue35092] test_socket fails in MacOS High Sierra when running with -Werror

2018-10-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thank you very much for the quick response, @Ned! :)

--

___
Python tracker 

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



[issue23828] test_socket testCmsgTruncLen0 gets "received malformed or improperly-truncated ancillary data" warning under OS X

2018-10-28 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue34672] '%Z' strftime specifier never works with musl

2018-10-28 Thread Xiang Zhang


Xiang Zhang  added the comment:


New changeset 163eca34c48f1b25e1504e37f4656773fd0fdc78 by Xiang Zhang in branch 
'master':
bpo-34672: fix a compiler warning in timemodule.c (GH-10176)
https://github.com/python/cpython/commit/163eca34c48f1b25e1504e37f4656773fd0fdc78


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue35090] bz2: Potential division by zero in BZ2_Malloc()

2018-10-28 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

May be we should add a new function (_PyMem_RawMallocItems?) that does the same 
checks as PyMem_RawCalloc, but doesn't zero-initialize memory?

--

___
Python tracker 

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



[issue35089] Remove typing.io and typing.re from documentation

2018-10-28 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:


New changeset c8a8d6b347d5a6899feb7c810d28f22f3cb151b8 by Ivan Levkivskyi 
(Sebastian Rittau) in branch 'master':
bpo-35089: Don't mention typing.io and typing.re (GH-10173)
https://github.com/python/cpython/commit/c8a8d6b347d5a6899feb7c810d28f22f3cb151b8


--

___
Python tracker 

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



[issue35089] Remove typing.io and typing.re from documentation

2018-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9500

___
Python tracker 

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



[issue35089] Remove typing.io and typing.re from documentation

2018-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9501

___
Python tracker 

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



[issue35090] bz2: Potential division by zero in BZ2_Malloc()

2018-10-28 Thread STINNER Victor


STINNER Victor  added the comment:

> May be we should add a new function (_PyMem_RawMallocItems?) that does the 
> same checks as PyMem_RawCalloc, but doesn't zero-initialize memory?

Please don't add new functions to the Python memory allocators. We already have 
too many of them :-(
https://docs.python.org/dev/c-api/memory.html

PyZlib_Malloc, PyLzma_Malloc and BZ2_Malloc exists because they use different 
types: 2 unsigned int (zlib), 2 size_t (lzma), 2 int (bz2). PyMem_RawMalloc() 
expects a single size_t.

IMHO it's fine to have a function of 5 lines of code in each module, since each 
module uses a different C type.

--

___
Python tracker 

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



[issue34963] String representation for types created with typing.NewType(…) are opaque and unappealing

2018-10-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 9951 is simpler, but it makes invoking NewType() slower, because retrieving 
the module from the caller frame is slow in comparison with other operations.

$ ./python -m timeit -s "import typing" -- "UserId = typing.NewType('UserId', 
int)"

PR 9808:
100 loops, best of 5: 316 nsec per loop

PR 9951:
50 loops, best of 5: 634 nsec per loop

PR 9951 without setting __module__ and stripping components before dot in 
__name__:
100 loops, best of 5: 316 nsec per loop

In contrary, calling the resulting type is slower with PR 9808:

$ ./python -m timeit -s "import typing" -s "UserId = typing.NewType('UserId', 
int)" -- "UserId(5)"

PR 9808:
200 loops, best of 5: 105 nsec per loop

PR 9951:
500 loops, best of 5: 74.1 nsec per loop


What other operations should be supported? Should the NewType() result be 
pickleable? Currently it is not, in contrary to other typing types. If it 
should be pickleable, should it be pickled by name (resulting in restoring the 
same instance on unpickling, but failing if it is not accessible by name) or by 
its arguments (resulting in creating a new instance when unpickled)? Should it 
support comparison and what values should be treated as equal?

If make NewType a class, I would make the repr looking like a call:

>>> import typing
>>> UserId = typing.NewType('UserId', int)
>>> UserId
NewType('UserId', )
>>> UserNames = typing.NewType('UserNames', typing.List[int])
>>> UserNames
NewType('UserNames', typing.List[int])

--

___
Python tracker 

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



[issue35089] Remove typing.io and typing.re from documentation

2018-10-28 Thread miss-islington


miss-islington  added the comment:


New changeset a36f04cedbbbe776deb478114c1bc0e4a6fe9380 by Miss Islington (bot) 
in branch '3.6':
bpo-35089: Don't mention typing.io and typing.re (GH-10173)
https://github.com/python/cpython/commit/a36f04cedbbbe776deb478114c1bc0e4a6fe9380


--

___
Python tracker 

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



[issue35089] Remove typing.io and typing.re from documentation

2018-10-28 Thread miss-islington


miss-islington  added the comment:


New changeset c516dc6e57341f24d2494514c650f4a240c1c95f by Miss Islington (bot) 
in branch '3.7':
bpo-35089: Don't mention typing.io and typing.re (GH-10173)
https://github.com/python/cpython/commit/c516dc6e57341f24d2494514c650f4a240c1c95f


--
nosy: +miss-islington

___
Python tracker 

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



[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


--
title: bz2: Potential division by zero in BZ2_Malloc() -> Potential division by 
zero and integer overflow in allocator wrappers

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset fdf48b6b88f44a3ae6dc3e5eaea40c226c7df6c7 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-35054: Add yet more index entries for symbols. (GH-10121) (GH-10171)
https://github.com/python/cpython/commit/fdf48b6b88f44a3ae6dc3e5eaea40c226c7df6c7


--

___
Python tracker 

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



[issue1529353] Squeezer - squeeze large output in IDLE's shell

2018-10-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 68d6dc0770288075504635a8e42696070823fd69 by Terry Jan Reedy in 
branch 'master':
bpo-1529353: Explain Shell text squeezing in the IDLE doc. (#10169)
https://github.com/python/cpython/commit/68d6dc0770288075504635a8e42696070823fd69


--

___
Python tracker 

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



[issue1529353] Squeezer - squeeze large output in IDLE's shell

2018-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9502

___
Python tracker 

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



[issue1529353] Squeezer - squeeze large output in IDLE's shell

2018-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9503

___
Python tracker 

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



[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3d4fabb2a424cb04ae446ebe4428090c386f45a5 by Victor Stinner 
(Alexey Izbyshev) in branch 'master':
bpo-35090: Fix potential division by zero in allocator wrappers (GH-10174)
https://github.com/python/cpython/commit/3d4fabb2a424cb04ae446ebe4428090c386f45a5


--

___
Python tracker 

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



[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread STINNER Victor


STINNER Victor  added the comment:

I don't want to backport this change. IMHO these wrappers are never called with 
0. Otherwise, I'm sure that someone would report the crash...

But I applied the change anyway, just to avoid future reports of static 
analyzers :-) And the cast doesn't hurt :-)

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



[issue34794] Memory leak in Tkinter

2018-10-28 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9504

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-28 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9505

___
Python tracker 

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



[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

Thanks, Victor. Regarding backporting, what about integer overflow? Do you 
think it's guaranteed that the multiple of items and size always fits in 32-bit 
types, in case of BZ2_Malloc and PyZlib_Malloc?

--
resolution: fixed -> 
status: closed -> open
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



[issue34963] String representation for types created with typing.NewType(…) are opaque and unappealing

2018-10-28 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

Serhiy, thanks for benchmarks and good suggestions!

> If make NewType a class, I would make the repr looking like a call

This is a nice idea, it indeed looks better. We can probably also use 
`_type_repr()` helper for the argument (for consistency).

> Should the NewType() result be pickleable?

This is not required by PEP 484, but I could imagine this may be useful.

> If it should be pickleable, should it be pickled by name (resulting in 
> restoring the same instance on unpickling, but failing if it is not 
> accessible by name) or by its arguments (resulting in creating a new instance 
> when unpickled)?

Logically, they should behave like class objects, so if we are going to make 
them pickleable, they should be pickled by full name.

> Should it support comparison and what values should be treated as equal?

Again, since they should behave like class objects, I think we don't need any 
dedicated `__eq__`, they should be just compared by identity.

>From performance point of view, both PRs look good. Maybe we can even combine 
>both, so that we have both fine-tuned repr and pickleability. I understand 
>this means we will get slower benchmarks for both creation and instantiation, 
>but I think it is still OK, since it is still much faster than creating a new 
>class.

--

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-28 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

Sorry for changing the status, it's browser caching again.

--
resolution:  -> fixed
status: open -> closed
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



[issue20216] Misleading docs for sha1, sha256, sha512, md5 modules

2018-10-28 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9506

___
Python tracker 

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



[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread STINNER Victor


STINNER Victor  added the comment:

> Regarding backporting, what about integer overflow? Do you think it's 
> guaranteed that the multiple of items and size always fits in 32-bit types, 
> in case of BZ2_Malloc and PyZlib_Malloc?

I don't know. Serhiy: What do you think?

--

___
Python tracker 

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



[issue1529353] Squeezer - squeeze large output in IDLE's shell

2018-10-28 Thread miss-islington


miss-islington  added the comment:


New changeset 8dccb00c197e7b4f6ce65950a9ed6802fa217094 by Miss Islington (bot) 
in branch '3.7':
bpo-1529353: Explain Shell text squeezing in the IDLE doc. (GH-10169)
https://github.com/python/cpython/commit/8dccb00c197e7b4f6ce65950a9ed6802fa217094


--

___
Python tracker 

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



[issue1529353] Squeezer - squeeze large output in IDLE's shell

2018-10-28 Thread miss-islington


miss-islington  added the comment:


New changeset 69ab28d2a616ae0234b6e412a979400523b2a6d9 by Miss Islington (bot) 
in branch '3.6':
bpo-1529353: Explain Shell text squeezing in the IDLE doc. (GH-10169)
https://github.com/python/cpython/commit/69ab28d2a616ae0234b6e412a979400523b2a6d9


--

___
Python tracker 

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



[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2018-10-28 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


--
pull_requests: +9507

___
Python tracker 

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



[issue29174] 'NoneType' object is not callable in subprocess.py

2018-10-28 Thread STINNER Victor


STINNER Victor  added the comment:

This bug is now fixed if I understood correctly.

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

___
Python tracker 

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



[issue20216] Misleading docs for sha1, sha256, sha512, md5 modules

2018-10-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset f29bded3d3b0de63b45819eec292f5007c0cd3cf by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873). 
(GH-10183)
https://github.com/python/cpython/commit/f29bded3d3b0de63b45819eec292f5007c0cd3cf


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 5b2e1cfde28cce7f4b9275ec1b3757c561eef94e by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-35054: Add yet more index entries for symbols. (GH-10121). (GH-10182)
https://github.com/python/cpython/commit/5b2e1cfde28cce7f4b9275ec1b3757c561eef94e


--

___
Python tracker 

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



[issue34794] Memory leak in Tkinter

2018-10-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset aaea2802da0a074c695ab86911d8bcc0b2dd5ec5 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-34794: Fix a leak in Tkinter. (GH-10025) (GH-10181)
https://github.com/python/cpython/commit/aaea2802da0a074c695ab86911d8bcc0b2dd5ec5


--

___
Python tracker 

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



[issue35089] Remove typing.io and typing.re from documentation

2018-10-28 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


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



[issue1154351] add get_current_dir_name() to os module

2018-10-28 Thread Anthony Sottile


Anthony Sottile  added the comment:

Does this actually make sense for the `os` module? `PWD` is a variable set by 
your interactive shell and doesn't really make sense outside that context.

I expect this function to be too easily confused with `os.getcwd()` and a 
source of bugs when the latter is desired

--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self"

2018-10-28 Thread STINNER Victor


STINNER Victor  added the comment:

The cast warning is not specific to this issue, it's a more general issue that 
will be address in bpo-33012. I close again  the bug.

--
status: open -> closed

___
Python tracker 

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



[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2018-10-28 Thread Michael Felt

Michael Felt  added the comment:

re; the current status of PR8672 - which I shall probably close as it no longer 
merges.

@taleinat re: the need for lambda

As _find_mac_netstat() is only called once the need for the last two arguments 
may be unnecessary. My reason for including them was to keep _find_mac_netstat 
comparable to _find_mac.

1) I am reluctant to make changes to historical code, however, in this case it 
was needed as _find_mac has, imho, a requirement for input that differs from 
AIX netstat.

* On linux (debian, centos) I do not find a MAC address for netstat
* On linux, where, e.g., ifconfig does return a value - the lambda i: i±1 is 
vital as the value follows the keyword on the same line.
For AIX lambda I: i is needed because only the first line (header) has 
keywords, the remaining lines give the values.

Linux: ifconfig (keyword "ether")

root@x074:~# ifconfig
eth0: flags=4163  mtu 1500
inet 192.168.129.74  netmask 255.255.255.0  broadcast 192.168.129.255
inet6 fe80::f8d1:81ff:fe12:b104  prefixlen 64  scopeid 0x20
inet6 2001:981:56fd:1:f8d1:81ff:fe12:b104  prefixlen 64  scopeid 
0x0
ether fa:d1:81:12:b1:04  txqueuelen 1000  (Ethernet)
RX packets 1605776  bytes 177990366 (169.7 MiB)
RX errors 0  dropped 1027921  overruns 0  frame 0
TX packets 25045  bytes 1567902 (1.4 MiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
device interrupt 20


So, when the keyword is found, as each word on the line is examined "i+1" gives 
the value

For AIX (in anycase), the keyword is Address - the output is:
michael@x071:[/data/prj/python/git/python3-3.8]netstat -ia
Name  Mtu   Network Address   Ipkts IerrsOpkts Oerrs  Coll
en0   1500  link#2  fa.d1.8c.f7.62.4 2348009992 0 946551098 0 0
01:00:5e:00:00:01
en0   1500  192.168.129 x071 2348009992 0 946551098 0 0
224.0.0.1
en0   1500  192.168.90  x071 2348009992 0 946551098 0 0
224.0.0.1
en1   1500  link#3  fa.d1.8c.f7.62.5 64346336 0 89935059 0 0
01:00:5e:00:00:01
en1   1500  192.168.2   mail.aixtools.xx 64346336 0 89935059 0 0
224.0.0.1

Note - the value with colons - as many (all?) other systems - this seems to be 
a constant, and a value on a line all by itself - so the old code could never 
ever find it, even if it could have parsed it. The actual MAC address is on a 
line with several entries - matching the values given by the "header" line - so 
lambda i: i is needed to examine the later lines to find a suitably formatted 
value.

So, should I write _find_mac_netstat for AIX only (and maybe set "skipIf" 
Linux). There are many assumptions in this code. I do not feel qualified to 
change things I cannot test - so, as much as possible I follow the tried and 
true.

I hope this clarifies my intent well enough that you can make a decision.

--

___
Python tracker 

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



[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2018-10-28 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue1154351] add get_current_dir_name() to os module

2018-10-28 Thread STINNER Victor


STINNER Victor  added the comment:

The glibc has a get_current_dir_name() function which returns the same value 
that getcwd(), the difference is that get_current_dir_name() allocates memory. 
If someone wants to add a function using PWD env var, a different function name 
should be found.

--
nosy: +vstinner

___
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-10-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Diego, I've taken care of the ElementTree case.  Would you like to make a PR 
for the other occurrences (minidom, html, etc)?

--

___
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-10-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset e3685fd5fdd8808acda81bfc12fb9702d4b59a60 by Raymond Hettinger in 
branch 'master':
bpo-34160: Preserve user specified order of Element attributes (GH-10163)
https://github.com/python/cpython/commit/e3685fd5fdd8808acda81bfc12fb9702d4b59a60


--

___
Python tracker 

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



[issue34931] os.path.splitext with more dots

2018-10-28 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

IMHO this is not a bug. Every file starting with a dot is hidden by default, so 
this is somewhat correct behaviour. Since it is documented correctly I don't 
this something needs to change here.

Yet again, could someone more experienced offer their opinion as well?

--
nosy: +lys.nikolaou

___
Python tracker 

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



[issue1154351] add get_current_dir_name() to os module

2018-10-28 Thread Marc Adam Anderson


Change by Marc Adam Anderson :


--
nosy:  -marcadam

___
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-10-28 Thread STINNER Victor


STINNER Victor  added the comment:

Nice enhancement! I was always annoyed by XML libraries in PHP and Python which 
don't respect the "insertion order".

--
nosy: +vstinner

___
Python tracker 

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



[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2018-10-28 Thread Romain Geissler


Romain Geissler  added the comment:

Hi,

Yes this bug report is still valid. I just tried compiling Python 3.7.1 on 
linux with libedit installed (https://thrysoee.dk/editline/) but not 
libreadline, and indeed the configure script fails to detect I have it 
installed and falls back on the python readline emulation.

Note: I am using Linux, not Mac OS.

Cheers,
Romain

--
nosy: +RomainGeissler1A

___
Python tracker 

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



[issue35093] IDLE: document the help document viewer

2018-10-28 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Implement issue 33396 item 6: document the IDLE Doc viewer.

--
assignee: docs@python
components: Documentation, IDLE
messages: 328725
nosy: docs@python, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: document the help document viewer
type: enhancement
versions: Python 3.6, 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



[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2018-10-28 Thread Mark Harfouche


Mark Harfouche  added the comment:

My workaround has been to use neither readline nor libedit.

On Sun, Oct 28, 2018 at 2:40 PM Romain Geissler 
wrote:

>
> Romain Geissler  added the comment:
>
> Hi,
>
> Yes this bug report is still valid. I just tried compiling Python 3.7.1 on
> linux with libedit installed (https://thrysoee.dk/editline/) but not
> libreadline, and indeed the configure script fails to detect I have it
> installed and falls back on the python readline emulation.
>
> Note: I am using Linux, not Mac OS.
>
> Cheers,
> Romain
>
> --
> nosy: +RomainGeissler1A
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue35093] IDLE: document the help document viewer

2018-10-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
assignee: docs@python -> terry.reedy
components:  -Documentation

___
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-10-28 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9508

___
Python tracker 

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



[issue14956] custom PYTHONPATH may break apps embedding Python

2018-10-28 Thread Romain Geissler


Romain Geissler  added the comment:

Hi,

Just updating this 6 year old bug report. The last comment says it's not 
possible to ignore environment when using the C-API. I don't know back then, 
but today it is possible. I have just built gdb 8.2 against python 3.7.1, and 
patched gdb with this simple patch, which apparently works:

--- gdb/python/python.c
+++ gdb/python/python.c
@@ -1726,6 +1726,9 @@
 #endif
 #endif

+  // Force using the toolchain python without being troubled by $PYTHONHOME or 
$PYTHONPATH.
+  Py_IgnoreEnvironmentFlag = 1;
+
   Py_Initialize ();
   PyEval_InitThreads ();

Cheers,
Romain

--
nosy: +RomainGeissler1A

___
Python tracker 

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



[issue22021] shutil.make_archive() root_dir do not work

2018-10-28 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +9509
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



[issue35094] Improved algorithms for random.sample

2018-10-28 Thread Paul Crowley


New submission from Paul Crowley :

random.sample currently uses either a Fisher-Yates shuffle, or rejection 
sampling, to achieve sampling without replacement. I propose using reservoir 
sampling or "cardchoose"; these are similar performance or sometimes faster, 
and don't need to allocate anything except the list used for the results.

--
components: Library (Lib)
messages: 328728
nosy: ciphergoth
priority: normal
severity: normal
status: open
title: Improved algorithms for random.sample
type: resource usage
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



[issue35094] Improved algorithms for random.sample

2018-10-28 Thread Paul Crowley


Change by Paul Crowley :


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

___
Python tracker 

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



[issue35094] Improved algorithms for random.sample

2018-10-28 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +mark.dickinson, rhettinger

___
Python tracker 

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



[issue34794] Memory leak in Tkinter

2018-10-28 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text

2018-10-28 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

Right now we have:

Path.read_bytes
Path.read_text
Path.write_bytes
Path.write_text

as opening the file, appending something and closing the file is also a very 
typical operation to do it would be nice to have:

Path.append_bytes
Path.append_text

--
components: Library (Lib)
messages: 328730
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Implement pathlib.Path.append_bytes and pathlib.Path.append_text
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



[issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text

2018-10-28 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think it is worth to backport. Perhaps it is possible even to create a 
reproducer for integer overflow, but I afraid it will be too slow for using in 
tests.

--

___
Python tracker 

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



[issue35084] binascii.Error: Incorrect padding

2018-10-28 Thread TestUser


TestUser  added the comment:

The file contained the following code:
0x11a3ff119c\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80#%^ciuqrfiqrYWJjMTIzIT8kKiYoKSctPUB-
abc123!

On Sun, Oct 28, 2018 at 1:35 AM Karthikeyan Singaravelan <
rep...@bugs.python.org> wrote:

>
> Karthikeyan Singaravelan  added the comment:
>
> Thanks for the report. Can you please attach the file test.code1? Your
> original report says "test.code1" is not base64 encoded and -d takes a file
> that is base64 encoded and decodes it. Can you please be more descriptive
> about what you are expecting?
>
> --
> nosy: +xtreak
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue35094] Improved algorithms for random.sample

2018-10-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Sorry, this has been discussed and rejected multiple times.  Reservoir sampling 
makes far too many calls to the underlying random number generator.

--
assignee:  -> rhettinger
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



[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2018-10-28 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> tim.peters
nosy: +tim.peters

___
Python tracker 

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



[issue35093] IDLE: document the help document viewer

2018-10-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +9513
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



[issue35085] FileNotFoundError: [Errno 2] No such file or directory:

2018-10-28 Thread TestUser


TestUser  added the comment:

How can that be CLI useful. Lucky I guess as this does not generate a Crash
Report. OK.

Bad/Missing File would have been my preferred. Then again?

Thanks

On Sun, Oct 28, 2018 at 1:48 AM Karthikeyan Singaravelan <
rep...@bugs.python.org> wrote:

>
> Karthikeyan Singaravelan  added the comment:
>
> I can see one another related report issue35084. As @steven.daprano said
> this is an expected traceback and it's working correctly. -d expects a
> valid base64 encoded file and supplying a non-existent file or file with
> invalid encoding is supposed to throw a traceback.
>
> --
> nosy: +xtreak
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue35084] binascii.Error: Incorrect padding

2018-10-28 Thread TestUser


TestUser  added the comment:

FYI: This error generates an Ubuntu Crash Report. Every time I use it on
the CLI. I wonder how many of these are generated?

On Sun, Oct 28, 2018 at 3:49 PM TestUser  wrote:

>
> TestUser  added the comment:
>
> The file contained the following code:
>
> 0x11a3ff119c\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80#%^ciuqrfiqrYWJjMTIzIT8kKiYoKSctPUB-
> abc123!
>
> On Sun, Oct 28, 2018 at 1:35 AM Karthikeyan Singaravelan <
> rep...@bugs.python.org> wrote:
>
> >
> > Karthikeyan Singaravelan  added the comment:
> >
> > Thanks for the report. Can you please attach the file test.code1? Your
> > original report says "test.code1" is not base64 encoded and -d takes a
> file
> > that is base64 encoded and decodes it. Can you please be more descriptive
> > about what you are expecting?
> >
> > --
> > nosy: +xtreak
> >
> > ___
> > Python tracker 
> > 
> > ___
> >
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue35094] Improved algorithms for random.sample

2018-10-28 Thread Paul Crowley


Paul Crowley  added the comment:

I would be very grateful for your help finding those dicussions! I've tried 
this search:

https://www.google.com/search?q=python+%22Reservoir+sampling%22+rhettinger

and found this discussion:

https://mail.python.org/pipermail/python-ideas/2016-April/039708.html

but if I've missed any I'm keen to know.

In my pull request reservoir sampling is only used if 2k>=n, so it makes at 
most twice as many random requests as any other algorithm.

--

___
Python tracker 

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



[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2018-10-28 Thread Romain Geissler


Romain Geissler  added the comment:

Yes in my case the build works, but then I have a resulting python interpreter 
with limited readline functionality. That's why I have some interest in having 
this patch rebased and included into trunk.

--

___
Python tracker 

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



[issue33234] Improve list() pre-sizing for inputs with known lengths

2018-10-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 372d705d958964289d762953d0a61622755f5386 by Pablo Galindo in 
branch 'master':
bpo-33234 Improve list() pre-sizing for inputs with known lengths (GH-9846)
https://github.com/python/cpython/commit/372d705d958964289d762953d0a61622755f5386


--

___
Python tracker 

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



[issue33396] IDLE: Improve and document help doc viewer

2018-10-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#35063 implements item 6, (initially) doc the help viewer.  When we improve the 
help viewer, we should revise the doc at the same time.

--
dependencies: +Checking for abstractmethod implementation fails to consider MRO 
for builtins

___
Python tracker 

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



[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread STINNER Victor


Change by STINNER Victor :


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



[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9514
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



[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9515

___
Python tracker 

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



[issue35093] IDLE: document the help document viewer

2018-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9516

___
Python tracker 

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



[issue35093] IDLE: document the help document viewer

2018-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9517

___
Python tracker 

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



[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread STINNER Victor


STINNER Victor  added the comment:

Serhiy: "I think it is worth to backport."

Ok. I asked the bot to create 3.6 and 3.7 backports, and I just approved them.

I checked: Python 2.7 is not affected.

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



[issue33234] Improve list() pre-sizing for inputs with known lengths

2018-10-28 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-33234 Improve list() pre-sizing for inputs with known lengths (GH-9846)

Oh. Can you please document the optimization in the following doc as well?
https://docs.python.org/dev/whatsnew/3.8.html#optimizations

--

___
Python tracker 

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



  1   2   >