[issue13397] Option for XMLRPC clients to automatically transform Fault exceptions into standard exceptions

2019-08-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2019-08-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

See also:  https://bugs.python.org/msg131551

--

___
Python tracker 

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



[issue17642] IDLE add font resizing hot keys and wheel

2019-08-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Key or wheel patches will probably be 3.6 only.

I still have hopes that this will happen.

Am I correct in thinking that it wouldn't be difficult to map CMD-plus and 
CMD-minus (or for Windows Cntl-plus and Cntl-minus) to a function that 
increases or decreases the font-size without having to manually go to 
Preferences/FontsAndTabs?

--
versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue24533] Increased Test Coverage for Lib/random.py

2019-08-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The test code now includes this:

def test_shuffle_random_argument(self):
# Test random argument to shuffle.
shuffle = self.gen.shuffle
mock_random = unittest.mock.Mock(return_value=0.5)
seq = bytearray(b'abcdefghijk')
shuffle(seq, mock_random)
mock_random.assert_called_with()

Thank you for the suggestion.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue14112] tutorial intro talks of "shallow copy" concept without explanation

2019-08-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

How about we just like "shallow copy" to the copy module docs.  That way, a 
person can follow-up with more detail if they're interested, yet still can 
read-on without interruption if they choose (this entry occurs *very* early in 
the tutorial).

--

___
Python tracker 

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



[issue37926] regression: PySys_SetArgvEx(0, NULL, 0): SystemError: Python-3.8.0b3/Objects/unicodeobject.c:2089: bad argument to internal function

2019-08-23 Thread Miro Hrončok

New submission from Miro Hrončok :

There is a regression between Python 3.7 and 3.8 when using PySys_SetArgvEx(0, 
NULL, 0).

Consider this example:

#include 

int main() {
Py_Initialize();
PySys_SetArgvEx(0, NULL, 0);  /* HERE */
PyRun_SimpleString("from time import time,ctime\n"
   "print('Today is', ctime(time()))\n");
Py_FinalizeEx();
return 0;
}


This works in 3.7 but no longer does in 3.8:

$ gcc $(python3.7-config --cflags --ldflags) example.c 
$ ./a.out 
Today is Fri Aug 23 07:59:52 2019

$ gcc $(python3.8-config --cflags --ldflags --embed) example.c 
$ ./a.out 
Fatal Python error: no mem for sys.argv
SystemError: /builddir/build/BUILD/Python-3.8.0b3/Objects/unicodeobject.c:2089: 
bad argument to internal function

Current thread 0x7f12c78b9740 (most recent call first):
Aborted (core dumped)


The documentation https://docs.python.org/3/c-api/init.html#c.PySys_SetArgvEx 
explicitly mentions passing 0 to PySys_SetArgvEx:

"if argc is 0..."

So I guess this is not something you shouldn't do.

--
components: Extension Modules
messages: 350262
nosy: hroncok, vstinner
priority: normal
severity: normal
status: open
title: regression: PySys_SetArgvEx(0, NULL, 0): SystemError: 
Python-3.8.0b3/Objects/unicodeobject.c:2089: bad argument to internal function
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



[issue33830] Error in the output of one example in the httplib docs

2019-08-23 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Closing this since PRs have been merged. Thanks Aifu LIU for the report.

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



[issue37927] No Instantiation Restrictions for AbstractBaseClasses derived from builtin types

2019-08-23 Thread Talha Ahmed


New submission from Talha Ahmed :

I have been experimenting a little with the `abc` module in python. A la

>>> import abc

In the normal case you expect your ABC class to not be instantiated if it 
contains an unimplemented `abstractmethod`. You know like as follows:

>>> class MyClass(metaclass=abc.ABCMeta):
... @abc.abstractmethod
... def mymethod(self):
... return -1
...
>>> MyClass()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: Can't instantiate abstract class MyClass with abstract methods 
mymethod

OR for any derived Class. It all seems to work fine until you inherit from 
something ... say `dict` or `list` as in the following: 

>>> class YourClass(list, metaclass=abc.ABCMeta):
... @abc.abstractmethod
... def yourmethod(self):
... return -1
...
>>> YourClass()
[]

This is inconsistent because `type` is supposed to be the primary factory.

>>> type(abc.ABCMeta)

>>> type(list)


Why is the check for `__abstractmethods__` only implemented for `object_new` 
and not for other built-in types?

--
components: Interpreter Core
messages: 350264
nosy: Talha Ahmed
priority: normal
severity: normal
status: open
title: No Instantiation Restrictions for AbstractBaseClasses derived from 
builtin types
type: behavior
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



[issue37927] No Instantiation Restrictions for AbstractBaseClasses derived from builtin types

2019-08-23 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +rhettinger

___
Python tracker 

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



[issue37927] No Instantiation Restrictions for AbstractBaseClasses derived from builtin types

2019-08-23 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This looks like a duplicate of issue35362. I would prefer closing one of them 
to keep the discussion in one place. This looks like a variant of this issue : 
issue35063

--
nosy: +xtreak

___
Python tracker 

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



[issue26589] Add HTTP Response code 451

2019-08-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +15116
pull_request: https://github.com/python/cpython/pull/15413

___
Python tracker 

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



[issue26589] Add HTTP Response code 451

2019-08-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue37585] Comparing PyDictValues does not give expected results

2019-08-23 Thread Kyle Stanley


Kyle Stanley  added the comment:

Reopening the issue for adding the documentation clarification, that comparing 
the values view of two dictionaries will always return false (as was suggested 
in the ML discussion 
https://mail.python.org/archives/list/python-...@python.org/message/K3SYX4DER3WAOWGQ4SPKCKXSXLXTIVAQ/).
 A month ago, I opened to PR to add the clarification to the documentation for 
dict.values(): https://github.com/python/cpython/pull/14954/files.

It probably went unnoticed because the issue had already been closed (which I 
hadn't realized at the time).

--
status: closed -> open

___
Python tracker 

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



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-23 Thread miss-islington


miss-islington  added the comment:


New changeset 5c77730300c0358d7bebd2bb39ea5d10222a3d9a by Miss Islington (bot) 
in branch '3.8':
bpo-37915: Fix comparison between tzinfo objects and timezone objects (GH-15390)
https://github.com/python/cpython/commit/5c77730300c0358d7bebd2bb39ea5d10222a3d9a


--

___
Python tracker 

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



[issue37926] regression: PySys_SetArgvEx(0, NULL, 0): SystemError: Python-3.8.0b3/Objects/unicodeobject.c:2089: bad argument to internal function

2019-08-23 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue37926] regression: PySys_SetArgvEx(0, NULL, 0): SystemError: Python-3.8.0b3/Objects/unicodeobject.c:2089: bad argument to internal function

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:

Oops, it's my fault! PR 15415 fix the crash.

The regression was introduced by:

commit 74f6568bbd3e70806ea3219e8bacb386ad802ccf
Author: Victor Stinner 
Date:   Fri Mar 15 15:08:05 2019 +0100

bpo-36301: Add _PyWstrList structure (GH-12343)

Simplified change:

-static wchar_t *empty_argv[1] = {L""};
+wchar_t* empty_argv[1] = {L""};

It's a deliberate change to not waste memory: PySys_SetArgvEx() 
(make_sys_argv()) is only called once, whereas static keeps the memory for the 
whole lifecycle of the process.

But I didn't notice a subtle issue with memory allocated on the stack: the code 
works well with gcc -O0! The bug only triggers with gcc -O3.

--

___
Python tracker 

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



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-23 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +15118
pull_request: https://github.com/python/cpython/pull/15417

___
Python tracker 

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



[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-08-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15119
pull_request: https://github.com/python/cpython/pull/15419

___
Python tracker 

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



[issue37926] regression: PySys_SetArgvEx(0, NULL, 0): SystemError: Python-3.8.0b3/Objects/unicodeobject.c:2089: bad argument to internal function

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c48682509dc49b43fe914fe6c502bc390345d1c2 by Victor Stinner in 
branch 'master':
bpo-37926: Fix PySys_SetArgvEx(0, NULL, 0) crash (GH-15415)
https://github.com/python/cpython/commit/c48682509dc49b43fe914fe6c502bc390345d1c2


--

___
Python tracker 

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



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 1b1796df3a4292067a174faa11b1a852f79e98e3 by Pablo Galindo in 
branch '3.7':
[3.7] bpo-37915: Fix comparison between tzinfo objects and timezone objects 
(GH-15390) (GH-15417)
https://github.com/python/cpython/commit/1b1796df3a4292067a174faa11b1a852f79e98e3


--

___
Python tracker 

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



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-23 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +3.7regression -patch
nosy: +ned.deily
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.9

___
Python tracker 

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



[issue37923] Combining typing.get_type_hints and inspect.signature

2019-08-23 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

Somewhat related to https://bugs.python.org/issue37496

--
nosy: +eric.snow, yselivanov

___
Python tracker 

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



[issue37926] regression: PySys_SetArgvEx(0, NULL, 0): SystemError: Python-3.8.0b3/Objects/unicodeobject.c:2089: bad argument to internal function

2019-08-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15120
pull_request: https://github.com/python/cpython/pull/15420

___
Python tracker 

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



[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 767434c39c8f3c6a8af1b3282d8382ccf809fe21 by Victor Stinner in 
branch 'master':
bpo-37531: Fix regrtest _timedout() function on timeout (GH-15419)
https://github.com/python/cpython/commit/767434c39c8f3c6a8af1b3282d8382ccf809fe21


--

___
Python tracker 

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



[issue37928] test_glob.test_selflink() fails randomly on AMD64 Fedora Rawhide Clang Installed 3.x

2019-08-23 Thread STINNER Victor


New submission from STINNER Victor :

The test failed and then passed when re-run in verbose mode:

https://buildbot.python.org/all/#/builders/188/builds/858

FAIL: test_selflink (test.test_glob.SymlinkLoopGlobTests)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.9/test/test_glob.py",
 line 311, in test_selflink
self.assertIn(path, results)
AssertionError: 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/'
 not found in 
{'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link
 /link/link/link/link/link/link/link/link/', 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/lin
 k/link/link/link/link/', 'dir/link/link/link/link/lin
k/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/',
 
'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/'}

--
components: Tests
messages: 350273
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_glob.test_selflink() fails randomly on AMD64 Fedora Rawhide Clang 
Installed 3.x
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



[issue37925] --embed not included in python3.8-config usage/--help

2019-08-23 Thread Batuhan


Batuhan  added the comment:

I can work on this.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue37926] regression: PySys_SetArgvEx(0, NULL, 0): SystemError: Python-3.8.0b3/Objects/unicodeobject.c:2089: bad argument to internal function

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ca9ae94a2aba35d94ac1ec081f9bcac3a13aebd3 by Victor Stinner in 
branch '3.8':
bpo-37926: Fix PySys_SetArgvEx(0, NULL, 0) crash (GH-15415) (GH-15420)
https://github.com/python/cpython/commit/ca9ae94a2aba35d94ac1ec081f9bcac3a13aebd3


--

___
Python tracker 

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



[issue37926] regression: PySys_SetArgvEx(0, NULL, 0): SystemError: Python-3.8.0b3/Objects/unicodeobject.c:2089: bad argument to internal function

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:

I tested my fix manually using example from msg350262 and gcc -O3 (./configure 
&& make): I can reproduce the crash without the change, and I confirm that my 
change fix the crash.

Thanks Miro for the bug report: the fix will be included in next Python 3.8 
beta release. I fixed the bug in 3.8 and master branches (3.7 is not affected).

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

___
Python tracker 

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



[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-23 Thread Ned Deily

Ned Deily  added the comment:

(Removing “3.7regression” as the problematic change for 3.7 had not yet been 
released.)

--
keywords:  -3.7regression

___
Python tracker 

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



[issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT

2019-08-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15121
pull_request: https://github.com/python/cpython/pull/15422

___
Python tracker 

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



[issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:

I am able to reproduce test_multiprocessing.test_fd_transfer() failure on the 
FreeBSD CURRENT buildbot:

CURRENT-amd64% ./python -m test -m test_fd_transfer test_multiprocessing 
(...)
Tests result: FAILURE

I converted my msg330654 patch into PR 15422: I confirm that this PR fix 
test_fd_transfer() and test_large_fd_transfer() of test_multiprocessing.

--

___
Python tracker 

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



[issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:

Note: I also wrote PR 15421 to remove temporary files created by these 2 tests.

--

___
Python tracker 

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



[issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c3642219090f2564c1790330cbf0ba31f19dcaf4 by Victor Stinner in 
branch '2.7':
bpo-34521: Fix FD transfer in multiprocessing on FreeBSD (GH-15422)
https://github.com/python/cpython/commit/c3642219090f2564c1790330cbf0ba31f19dcaf4


--

___
Python tracker 

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



[issue37929] IDLE: OK sometimes fails to close configdialog

2019-08-23 Thread Terry J. Reedy


New submission from Terry J. Reedy :

If one opens configdialog when there is no Shell and then hits OK, the dialog 
fails to close.  The following Squeezer-related traceback appears in associated 
console when there is one.

Exception in Tkinter callback
Traceback (most recent call last):
  File "F:\dev\3x\lib\tkinter\__init__.py", line 1885, in __call__
return self.func(*args)
  File "F:\dev\3x\lib\idlelib\configdialog.py", line 172, in ok
self.apply()
  File "F:\dev\3x\lib\idlelib\configdialog.py", line 186, in apply
self.activate_config_changes()
  File "F:\dev\3x\lib\idlelib\configdialog.py", line 240, in 
activate_config_changes
klass.reload()
  File "F:\dev\3x\lib\idlelib\squeezer.py", line 222, in reload
instance.load_font()
  File "F:\dev\3x\lib\idlelib\squeezer.py", line 318, in load_font
Font(text, font=text.cget('font')).measure('0')
  File "F:\dev\3x\lib\idlelib\delegator.py", line 10, in __getattr__
attr = getattr(self.delegate, name) # May raise AttributeError
AttributeError: 'NoneType' object has no attribute 'cget'

Either the squeezer instance should be destroyed and removed along with Shell 
or, if keeping it is intentional, it should be removed from the update list and 
reinstated or if not doing that is intentional, it must either check 'if text 
is not None' before the access or catch the attribute error after.  Tal, which?

--
assignee: terry.reedy
components: IDLE
messages: 350281
nosy: taleinat, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: OK sometimes fails to close configdialog
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37930] make fails when compiling Python 2.6 from source (posixmodule.c)

2019-08-23 Thread Oguz_eren

New submission from Oguz_eren :

I'm trying to compile Python 2.6.8 on Kubuntu 19.04.

Current system version is Python 2.7.16. See below the error message I receive, 
during make.

oguz@dikanka:~$ tar -xvzf Python-2.6.8.tgz
oguz@dikanka:~$ cd Python-2.6.8/


oguz@dikanka:~/Python-2.6.8$ ./configure
…
…

oguz@dikanka:~/Python-2.6.8$ make

…
…
gcc -pthread  -Xlinker -export-dynamic -o python \ 
   Modules/python.o \ 
   libpython2.6.a -lpthread -ldl  -lutil   -lm   
/usr/bin/ld: libpython2.6.a(posixmodule.o): in function `posix_tmpnam': 
/home/oguz/Python-2.6.8/./Modules/posixmodule.c:7261: warning: the use of 
`tmpnam_r' is dangerous, better use `
mkstemp' 
/usr/bin/ld: libpython2.6.a(posixmodule.o): in function `posix_tempnam': 
/home/oguz/Python-2.6.8/./Modules/posixmodule.c:7216: warning: the use of 
`tempnam' is dangerous, better use `m
kstemp' 
Segmentation fault (core dumped) 
make: *** [Makefile:414: sharedmods] Error 139 

I found this python bug to be very similar to my case, but it's a rather old 
bug : https://bugs.python.org/issue535545

Here it says, posixmodule fails because resource.h is not detected properly by 
configure. Similarly in my case, pyconfig.h file's HAVE_SYS_RESOURCE_H line is 
commented out. I also realized that my c lib headers are not under 
/usr/include/sys and /usr/include/bits. Instead, I can find them under the 
following locations :

oguz@dikanka:/usr/include/linux$ find /usr/include -name resource.h
/usr/include/asm-generic/resource.h
/usr/include/linux/resource.h
/usr/include/x86_64-linux-gnu/asm/resource.h
/usr/include/x86_64-linux-gnu/bits/resource.h
/usr/include/x86_64-linux-gnu/sys/resource.h

I tried symlinks to x86_64-linux-gnu/sys and x86_64-linux-gnu/bits, but the the 
issue persists.

Any ideas ? Thanks in advance!

--
components: Installation
messages: 350283
nosy: Oguz_eren
priority: normal
severity: normal
status: open
title: make fails when compiling Python 2.6 from source (posixmodule.c)
type: compile error

___
Python tracker 

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



[issue26024] Non-ascii Windows locale names

2019-08-23 Thread STINNER Victor

STINNER Victor  added the comment:

It seems like this bug has been fixed in Python 3.5, so I close the issue.

What changed in Python 3.5 is that the *result* of locale.setlocale() is now 
the english name of the locale and so is compatible with the ASCII encoding.

Vidar Fauske:
> The Norwegian locale on Windows has the honor of having the only locale name 
> with a non-ASCII character 

On which Windows version? On Windows 10 build 1903 with Python 3.9, it seems 
like locale names can be encoded/decoded from ASCII:

>>> locale.setlocale(locale.LC_ALL, "swedish") 
'Swedish_Sweden.1252'
>>> locale.setlocale(locale.LC_ALL, "norwegian") 
'Norwegian_Norway.1252'

Eryk Sun confirmed that Python 3.5 doesn't seem to be affected anymore:

> The issue isn't quite the same for 3.5+. The new CRT uses Windows Vista 
> locale APIs. In this case it uses LOCALE_SENGLISHLANGUAGENAME instead of the 
> old LOCALE_SENGLANGUAGE. This maps "Norwegian" to simply "Norwegian" instead 
> of "Norwegian Bokmål":

---

If you consider there is still an issue with the second argument of 
locale.setlocale() which doesn't use the right encoding, please open a 
separated issue.

The workaround is to use the english name of locales. For example, use 
'norwegian' or 'Norwegian_Norway.1252', instead of 'Norwegian 
Bokmål_Norway.1252'.

--
resolution: third party -> 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



[issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:

"AMD64 FreeBSD CURRENT Shared 2.7 #159 is complete: Success"

https://buildbot.python.org/all/#/builders/169/builds/159

The FreeBSD 2.7 buildbot is back to green, I close the issue.

Thanks everyone was helped to get these issues to be fixed!

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



[issue37930] make fails when compiling Python 2.6 from source (posixmodule.c)

2019-08-23 Thread Oguz_eren


Change by Oguz_eren :


Added file: https://bugs.python.org/file48558/config.log

___
Python tracker 

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



[issue29535] datetime hash is deterministic in some cases

2019-08-23 Thread Ashwin Ramaswami


Ashwin Ramaswami  added the comment:

Makes sense, thanks for the explanation. The risk is that if there is code 
that, say, converts a POST dictionary to a dictionary with numeric keys, that 
code could be exploited. Creating a non-deterministic hash doesn't necessarily 
preclude hash(x) = x for a small enough x either. 

Given that other libraries (NumPy, etc.) rely on the numeric hash staying the 
way it is, it makes sense to keep it as it is. Since when did something that 
seems at first glance to be an implementation detail become more like a 
backwards-incompatible API, though? (For example, the implementation of the 
numeric hash was changed without any backwards-compatibility issues in 
https://bugs.python.org/issue14621). Might there be a better way to clarify 
this distinction for other features in Python?

I think the way forward for this patch is to keep the datetime hash as it is, 
and remove "datetime" in the parts of documentation that enumerate which data 
types have non-deterministic hashes.

--

___
Python tracker 

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



[issue37440] httplib should enable post-handshake authentication for TLS 1.3

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

Should this be closed?

--

___
Python tracker 

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



[issue37428] SSLContext.post_handshake_auth implicitly enables cert validation

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

Should this be closed?

--

___
Python tracker 

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



[issue34679] asyncio.add_signal_handler call fails if not on main thread

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

Please fix this ASAP, last 3.8 beta is scheduled for Monday.

--

___
Python tracker 

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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

This is marked as a release blocker. The last beta is scheduled for Monday. 
Please decide how to proceed ASAP.

--

___
Python tracker 

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



[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

This is marked as a release blocker. The last beta is scheduled for Monday. 
Please decide how to proceed ASAP.

--

___
Python tracker 

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



[issue34155] email.utils.parseaddr mistakenly parse an email

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

Downgraded the severity since 3.6 - 3.9 are merged.

--
nosy: +lukasz.langa
priority: deferred blocker -> critical

___
Python tracker 

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



[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread Bruno Oliveira


Change by Bruno Oliveira :


--
nosy: +Bruno Oliveira

___
Python tracker 

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



[issue37055] Numerous warnings with blake2 module

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

This is marked as a release blocker. The last beta is scheduled for Monday. 
Please decide how to proceed ASAP.

--
nosy: +lukasz.langa
priority: deferred blocker -> release blocker

___
Python tracker 

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



[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

This is marked as a release blocker. The last beta is scheduled for Monday. 
Please decide how to proceed ASAP.

--
nosy: +lukasz.langa
priority: deferred blocker -> release blocker

___
Python tracker 

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



[issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

Should this be closed?

--

___
Python tracker 

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



[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

This is marked as a release blocker. The last beta is scheduled for Monday. 
Please decide how to proceed ASAP.

--
priority: deferred blocker -> release blocker

___
Python tracker 

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



[issue36344] install_certificates.command too complicated

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

This is marked as a release blocker. The last 3.8 beta is scheduled for Monday. 
Please decide how to proceed ASAP.

--
nosy: +benjamin.peterson, lukasz.langa
priority: deferred blocker -> release blocker

___
Python tracker 

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



[issue29535] datetime hash is deterministic in some cases

2019-08-23 Thread Ashwin Ramaswami


Ashwin Ramaswami  added the comment:

Oh, that PR is already there in PR 15269, great!

--

___
Python tracker 

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



[issue34679] asyncio.add_signal_handler call fails if not on main thread

2019-08-23 Thread Yury Selivanov


Yury Selivanov  added the comment:

Andrew, can you fix ctrl-c/windows issue? I'm basically afk until monday. 

And we're not going to do anything about add_signal_handler in 3.8.

--

___
Python tracker 

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



[issue37055] Numerous warnings with blake2 module

2019-08-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Related to this, the blake2 function (declared as static inline) is not used, 
which makes the Solaris and compilers unhappy. Patch for reference:

--- a/Modules/_blake2/impl/blake2.h
+++ b/Modules/_blake2/impl/blake2.h
@@ -169,11 +169,6 @@
   BLAKE2_API int blake2sp( uint8_t *out, const void *in, const void *key, 
size_t outlen, size_t inlen, size_t keylen );
   BLAKE2_API int blake2bp( uint8_t *out, const void *in, const void *key, 
size_t outlen, size_t inlen, size_t keylen );

-  static inline int blake2( uint8_t *out, const void *in, const void *key, 
size_t outlen, size_t inlen, size_t keylen )
-  {
-return blake2b( out, in, key, outlen, inlen, keylen );
-  }
-
 #if defined(__cplusplus)
 }
 #endif

--
nosy: +pablogsal

___
Python tracker 

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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think PR 15320 should be merge as soon as possible at least to fix the 
segfault and stop the release blocker. Anything else can wait IMHO

--

___
Python tracker 

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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2019-08-23 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset b5d3ceea48c181b3e2c6c67424317afed606bd39 by Stefan Behnel in 
branch 'master':
bpo-14465: Add an indent() function to xml.etree.ElementTree to pretty-print 
XML trees (GH-15200)
https://github.com/python/cpython/commit/b5d3ceea48c181b3e2c6c67424317afed606bd39


--

___
Python tracker 

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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2019-08-23 Thread Stefan Behnel


Change by Stefan Behnel :


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



[issue37930] make fails when compiling Python 2.6 from source (posixmodule.c)

2019-08-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Hi Oguz,

Sadly Python 2.6.8 is not supported anymore

--
nosy: +pablogsal

___
Python tracker 

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



[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2019-08-23 Thread Vidar Fauske


Vidar Fauske  added the comment:

Note that this is still an issue on Windows:

>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'cp1252')
>>> locale.setlocale(locale.getdefaultlocale())
Error: unsupported locale setting

--
components: +Windows
nosy: +paul.moore, steve.dower, vidartf, zach.ware
versions: +Python 3.7 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue34679] asyncio.add_signal_handler call fails if not on main thread

2019-08-23 Thread Brett Slatkin


Brett Slatkin  added the comment:

Maybe we should just roll back https://bugs.python.org/issue34687 to fix both 
issues? Otherwise asyncio will be broken on Windows in 3.8. Is general API 
stability more important than performance?

--

___
Python tracker 

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



[issue37454] Clarify docs for math.log1p()

2019-08-23 Thread Tim Peters


Tim Peters  added the comment:

> Sometimes you guys make me feel dumb as a rock.

I expect we all do that favor for each other at times ;-)

--

___
Python tracker 

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



[issue26024] Non-ascii Windows locale names

2019-08-23 Thread Vidar Fauske


Vidar Fauske  added the comment:

Thanks. Note that the failing with `
locale.setlocale(locale.LC_ALL, locale.getdefaultlocale())` I mentioned above 
is a different problem, that is tracked in a much older issue: 
https://bugs.python.org/issue10466

--

___
Python tracker 

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



[issue34898] add mtime argument to gzip.compress

2019-08-23 Thread Daniel Himmelstein


Daniel Himmelstein  added the comment:

Any reason not to also expose mtime in the gzip.open API?

--
nosy: +dhimmel

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15122
pull_request: https://github.com/python/cpython/pull/15423

___
Python tracker 

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



[issue23878] Missing sanity checks for various C library function calls...

2019-08-23 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue23878] Missing sanity checks for various C library function calls...

2019-08-23 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9 -Python 3.4

___
Python tracker 

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



[issue31727] FTP_TLS errors when use certain subcommands

2019-08-23 Thread Neha Reddy


Neha Reddy  added the comment:

We faced the same issue while trying to copy files to an FTPS server. 
We are trying to connect to a Filezilla server. The type of encryption we are 
using for the FTPS is 'Require explicit FTP over TLS'.

There are the errors that my colleague and I had while trying to use the 
ftp.nlst() or the storbinary() functions in ftplib. 

EOF occurred in violation of protocol (_ssl.c:852)
OSError: [Errno 0] Error
 
After some research on the internet, we found a workaround on stack overflow 
(https://stackoverflow.com/questions/46633536/getting-a-oserror-when-trying-to-list-ftp-directories-in-python)
 

Below is the code for the workaround. hoping this could help resolve the issue 
in the newer version. 
 
import ftplib
from ssl import SSLSocket


class ReusedSslSocket(SSLSocket):
def unwrap(self):
pass


class MyFTP_TLS(ftplib.FTP_TLS):
"""Explicit FTPS, with shared TLS session"""
def ntransfercmd(self, cmd, rest=None):
conn, size = ftplib.FTP.ntransfercmd(self, cmd, rest)
if self._prot_p:
conn = self.context.wrap_socket(conn,
server_hostname=self.host,
session=self.sock.session)  # 
reuses TLS session
conn.__class__ = ReusedSslSocket  # we should not close reused ssl 
socket when file transfers finish
return conn, size

--
nosy: +realnehareddy

___
Python tracker 

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



[issue37931] crash reimporting posix after Py_Finalize on mac

2019-08-23 Thread Benoit Hudson


New submission from Benoit Hudson :

On OSX, with --enable-shared, if you shut down python and reinitialize, you can 
get a crash.

Repro steps: see attached crashy.c
gcc -I. -I ../Include/ -L. crashy.c -lpython3.9
./a.out

On OSX, with --enable-shared, you get a crash! On other platforms including on 
OSX static builds, no crash.

Not a regression: it's present in 2.7 (where we actually hit it).

PR incoming, the fix is simple. It has to do with caching (on OSX shared builds 
only) a stale value for the environment when building os.environ the first 
time; if you change the environment, the second initialization reads garbage 
when building os.environ.

--
components: Interpreter Core, macOS
files: crashy.c
messages: 350309
nosy: Benoit Hudson, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: crash reimporting posix after Py_Finalize on mac
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file48559/crashy.c

___
Python tracker 

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



[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

The decision has been made to get rid of TargetScopeError and instead just use 
SyntaxError. PEP 572 was updated already. We're just waiting for someone 
(Serhiy?) to review Nick's patch, PR #15131.

--

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15124
pull_request: https://github.com/python/cpython/pull/15427

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3842f2997fbd4dc840986aad2bb94656815e243b by Victor Stinner in 
branch 'master':
bpo-36763: Implement PyWideStringList_Insert() of PEP 587 (GH-15423)
https://github.com/python/cpython/commit/3842f2997fbd4dc840986aad2bb94656815e243b


--

___
Python tracker 

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



[issue37931] crash reimporting posix after Py_Finalize on mac

2019-08-23 Thread Benoit Hudson


Change by Benoit Hudson :


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

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread miss-islington


miss-islington  added the comment:


New changeset a6427cb2a279c4125dc26d468bcbb3374cdc5f41 by Miss Islington (bot) 
in branch '3.8':
bpo-36763: Implement PyWideStringList_Insert() of PEP 587 (GH-15423)
https://github.com/python/cpython/commit/a6427cb2a279c4125dc26d468bcbb3374cdc5f41


--

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15126
pull_request: https://github.com/python/cpython/pull/15431

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:

> _PySys_ReadPreInitOptions() code should be moved somewhere closer to 
> PyConfig_Read().

Done in PR 15431.

--

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:

> The first doc should mention somewhere the new doc.

Done in PR 15433.

--

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15127
pull_request: https://github.com/python/cpython/pull/15433

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1beb7c3de9c3d0e802e4267a11d937e8f024d661 by Victor Stinner in 
branch 'master':
bpo-36763, doc: Add links in the new C API init doc (GH-15433)
https://github.com/python/cpython/commit/1beb7c3de9c3d0e802e4267a11d937e8f024d661


--

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15128
pull_request: https://github.com/python/cpython/pull/15434

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 120b707a6d43452e067daa55a8fdca69f9424abc by Victor Stinner in 
branch 'master':
bpo-36763: PyConfig_Read() handles PySys_AddXOption() (GH-15431)
https://github.com/python/cpython/commit/120b707a6d43452e067daa55a8fdca69f9424abc


--

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread miss-islington


miss-islington  added the comment:


New changeset 9cbdce3917ab41856b61ac5c0f3c4ac0e203f320 by Miss Islington (bot) 
in branch '3.8':
bpo-36763, doc: Add links in the new C API init doc (GH-15433)
https://github.com/python/cpython/commit/9cbdce3917ab41856b61ac5c0f3c4ac0e203f320


--

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15129
pull_request: https://github.com/python/cpython/pull/15435

___
Python tracker 

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



[issue26589] Add HTTP Response code 451

2019-08-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 8f080b09953a2d862de5c74edf414a54ea3dbea5 by Raymond Hettinger in 
branch 'master':
bpo-26589: Add http status code 451 (GH-15413)
https://github.com/python/cpython/commit/8f080b09953a2d862de5c74edf414a54ea3dbea5


--

___
Python tracker 

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



[issue26589] Add HTTP Response code 451

2019-08-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15130
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/15436

___
Python tracker 

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



[issue9938] Add optional kwargs to argparse

2019-08-23 Thread hai shi


Change by hai shi :


--
title: Improving interactive use of argparse -> Add optional kwargs to argparse

___
Python tracker 

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



[issue26589] Add HTTP Response code 451

2019-08-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 761e5a7c7f57cf2a09106c0afa038f04de6a9ed2 by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.8':
bpo-26589: Add http status code 451 (GH-15413) (GH-15436)
https://github.com/python/cpython/commit/761e5a7c7f57cf2a09106c0afa038f04de6a9ed2


--

___
Python tracker 

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



[issue26589] Add HTTP Response code 451

2019-08-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue17642] IDLE add font resizing hot keys and wheel

2019-08-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I want this too, and part of it should be simple.  Given that I have had a 
never empty backlog of PRs to review for 2 1/2 years, it got forgotten.  There 
was also a tk problem that seemed to block implementation.

Specification for hotkey: Cntl/Cmd - -+= decrease/increase font size within 
limits in the current window only.  (The current limits for turtledemo are 6 
and 100.  Change this?  The keys are fixed and cannot be customized. Keys have 
no affect on IdleConf.  Setting font size in dialog continues to set font size 
for all Windows, whether individually set or not.  Should work same for editor 
and text (read-only) windows.

As near as I can tell, these key combinations currently do nothing.  I presume 
they are not bound in the built-in keysets.  Custom keysets are always subject 
to interference when we add new key bindings.  (I don't know that the custom 
key dialog checks against such fixed builtins. Another issue.  Checking custom 
keysets on import is likely a third issue.)

Implementation for hotkey: The desired behavior is the behavior of turtledemo, 
so the same implementation should work.  It is annoying that we need to add it 
separately for editor and text windows.  But refactoring to create a common 
base class would be a lot harder. 

Mousewheel: Currently, in turtledemo, control-wheel changes size on all 
systems.  

Raymond: Should it be cmd-wheel on Mac?

In msg226328 I reported a tk issue blocking both this and line numbers.  We now 
deliver 3.7.4 and 3.8.0 with tk 8.6.9.  We have line numbers because I no 
longer saw the glitchy behavior I remember.  Nor did I see any issue with font 
resizing with turtledemo.

I may include the module browser, etc, with this issue.  Dialogs would be 
another issue.

--

___
Python tracker 

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



[issue14112] tutorial intro talks of "shallow copy" concept without explanation

2019-08-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

With /like/link/ I agree.

--

___
Python tracker 

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



[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread Eryk Sun


Eryk Sun  added the comment:

> Should we add a version check as well [1]? I'm not totally comfortable 
> with bitmasking a handle here, but if we only do this additional 
> check on Win7 then I'm okay with it.

A version check should not be necessary. For file objects, setting both handle 
tag bits has always been a reserved signature for console pseudohandles. Here's 
the definition in the published console code:

https://github.com/microsoft/terminal/blob/b726a3d05d35928becc8313f6ac5536c9f503645/dep/Console/winconp.h#L460

It's mostly vestigial in Windows 8+ due to the addition of the ConDrv console 
device. Code that routed calls to LPC-based implementations when passed a 
console pseudohandle has all been removed. The only remaining use I know of is 
in the console attach code. If a process is started with STARTF_USESTDHANDLES, 
then AllocConsole() will only replace handles that are NULL or console 
pseudohandles. The docs for GetStdHandle explain this:

Attach/detach behavior

When attaching to a new console, standard handles are always replaced
with console handles unless STARTF_USESTDHANDLES was specified during
process creation.

If the existing value of the standard handle is NULL, or the existing
value of the standard handle looks like a console pseudohandle, the
handle is replaced with a console handle.

When a parent uses both CREATE_NEW_CONSOLE and STARTF_USESTDHANDLES to
create a console process, standard handles will not be replaced unless
the existing value of the standard handle is NULL or a console
pseudohandle.

I confirmed that this is still relevant in Windows 10 by testing an inherited 
pipe handle in stdout and stderr and manually setting the tag bits in the 
hStdError handle value in STARTUPINFO. The console attach code preserved the 
regular handle in stdout but replaced the console pseudohandle in stderr. So 
the API is still reserving these tag bits in file handles, at least in one 
place, which means they're still reserved in general, even though setting them 
will no longer break a ReadFile call, for one example, like it would in Windows 
7 (in which the API would route the call to the internal ReadConsole 
implementation). 

We've been relying on checking the console pseudohandle tag bits without a 
version check in subprocess.Popen._filter_handle_list for a while now. Console 
pseudohandles have to be removed from the handle list, else CreateProcessW will 
fail.

--

___
Python tracker 

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



[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread Steve Dower


Steve Dower  added the comment:

Thanks, Eryk. In that case, I'll merge the PR.

Since Python 3.9 will not support Windows 7, we can remove it from master as 
soon as the backports are done :)

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread Steve Dower


Steve Dower  added the comment:


New changeset 5be666010e4df65dc4d831435cc92340ea369f94 by Steve Dower (Zackery 
Spytz) in branch 'master':
bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389)
https://github.com/python/cpython/commit/5be666010e4df65dc4d831435cc92340ea369f94


--

___
Python tracker 

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



[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15131
pull_request: https://github.com/python/cpython/pull/15437

___
Python tracker 

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



[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15132
pull_request: https://github.com/python/cpython/pull/15438

___
Python tracker 

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



[issue37916] distutils: allow overriding of the RANLIB command on macOS (darwin)

2019-08-23 Thread Ned Deily


Change by Ned Deily :


--
components: +Distutils
nosy: +dstufft, eric.araujo

___
Python tracker 

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



[issue37930] make fails when compiling Python 2.6 from source (posixmodule.c)

2019-08-23 Thread Ned Deily


Ned Deily  added the comment:

Python 2.6 reached end-of-life in 2013, six years ago, and has not received any 
non-security bug fixes since 2010.  We strongly recommend thst you migrate to a 
modern, supported version of Python, if not Python 3.7, then at least Python 
2.7 which itself will reach end-of-life in 2020.

--
nosy: +ned.deily
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread miss-islington


miss-islington  added the comment:


New changeset f8dc3e85ab01e1b0345738670dcb3993da7ec436 by Miss Islington (bot) 
in branch '3.7':
bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389)
https://github.com/python/cpython/commit/f8dc3e85ab01e1b0345738670dcb3993da7ec436


--
nosy: +miss-islington

___
Python tracker 

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



[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread miss-islington


miss-islington  added the comment:


New changeset 3921d12174c1998d9df7a08d036a7fef2d587a64 by Miss Islington (bot) 
in branch '3.8':
bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389)
https://github.com/python/cpython/commit/3921d12174c1998d9df7a08d036a7fef2d587a64


--

___
Python tracker 

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



[issue36763] Implementation of the PEP 587

2019-08-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset af84a88ef8b3288da528d2f52b7d3fbafb8dc8a6 by Victor Stinner in 
branch '3.8':
bpo-36763: PyConfig_Read() handles PySys_AddXOption() (GH-15431) (GH-15435)
https://github.com/python/cpython/commit/af84a88ef8b3288da528d2f52b7d3fbafb8dc8a6


--

___
Python tracker 

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



[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-08-23 Thread Eryk Sun


Eryk Sun  added the comment:

Alternatively, instead of special casing the file type and spinning on 
PeekNamedPipe, the workaround could be based on a multiple-object wait that 
includes the child process handle. In this case, communicate() would always 
call _communicate in Windows, regardless of the timeout or number of pipes -- 
because simplistically calling either self.stdout.read() or self.stderr.read() 
could hang. 

The implementation would be moderately complicated. If we stop waiting on the 
reader threads because the process exited, we can give the threads a short time 
to finish reading and close the files -- maybe 250 ms is enough. But if they 
haven't exited at this time, we can't simply raise a TimeoutExpired exception 
if the call hasn't actually timed out.  To finish the _communicate call, we 
would have to cancel the pending reads and join() the threads.

We can force a reader thread to exit by canceling the read via WINAPI 
CancelIoEx. However, _readerthread has to be modified to support this. It could 
be implemented as a loop that calls _winapi.ReadFile to read the output in 
chunks that get appended to the buffer list. The read loop would break for 
either ERROR_BROKEN_PIPE or ERROR_OPERATION_ABORTED (canceled). 

The final step in _communicate would be to concatenate the partial reads. If 
it's text mode, it would also have to decode the bytes and translate newlines. 
The POSIX implementation of _communicate has to do this, so we already have a 
_translate_newlines method for this case.

Note that _winapi.WaitForMultipleObjects is interruptible in the main thread 
via Ctrl+C, which is a bonus improvement since Thread.join() can't be 
interrupted in Windows.

--

___
Python tracker 

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



  1   2   >