[issue32690] Return function locals() in order of creation?

2018-01-28 Thread Raymond Hettinger

Change by Raymond Hettinger :


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



[issue32687] wrong meaning of arg in Py_tracefunc doc

2018-01-28 Thread Xiang Zhang

Xiang Zhang  added the comment:


New changeset 854f0424de389f023b375dfd0b50c34dea29e8f8 by Xiang Zhang (Miss 
Islington (bot)) in branch '3.6':
bpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation 
(GH-5361) (GH-5377)
https://github.com/python/cpython/commit/854f0424de389f023b375dfd0b50c34dea29e8f8


--

___
Python tracker 

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



[issue32687] wrong meaning of arg in Py_tracefunc doc

2018-01-28 Thread Xiang Zhang

Xiang Zhang  added the comment:


New changeset 745e9de7dd9d237d54e92d6e4b469e916fb0352b by Xiang Zhang (Miss 
Islington (bot)) in branch '2.7':
bpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation 
(GH-5361) (GH-5378)
https://github.com/python/cpython/commit/745e9de7dd9d237d54e92d6e4b469e916fb0352b


--

___
Python tracker 

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



[issue32687] wrong meaning of arg in Py_tracefunc doc

2018-01-28 Thread Xiang Zhang

Change by Xiang Zhang :


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



[issue32692] test_threading.test_set_and_clear fails in AppVeyor CI

2018-01-28 Thread Xiang Zhang

New submission from Xiang Zhang :

test_threading.test_set_and_clear fails in AppVeyor CI. But seems it not stable 
since rerun succeeds. See 
https://ci.appveyor.com/project/python/cpython/build/3.6build11314/job/ussor83yaglx5whb.

FAIL: test_set_and_clear (test.test_threading.EventTests)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\lock_tests.py", line 407, in 
test_set_and_clear
self.assertEqual(results, [True] * N)
AssertionError: Lists differ: [False, False, False, True, True] != [True, True, 
True, True, True]
First differing element 0:
False
True
- [False, False, False, True, True]
+ [True, True, True, True, True]

--
components: Tests
messages: 310930
nosy: xiang.zhang
priority: normal
severity: normal
status: open
title: test_threading.test_set_and_clear fails in AppVeyor CI
versions: Python 3.6

___
Python tracker 

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



[issue32649] complete C API doc debug and profile part with new PyTrace_OPCODE

2018-01-28 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 255f7a26da47ca6b7bd1d375b8a04920f68c119c by Nick Coghlan (Xiang 
Zhang) in branch 'master':
bpo-32649: Add C API docs for per-opcode tracing & profiling (GH-5360)
https://github.com/python/cpython/commit/255f7a26da47ca6b7bd1d375b8a04920f68c119c


--

___
Python tracker 

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



[issue32649] complete C API doc debug and profile part with new PyTrace_OPCODE

2018-01-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

Merged, thanks!

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

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-28 Thread David Beazley

David Beazley  added the comment:

Some context:  I noticed this while discussing (in a course) a programming 
trick involving instance initialization and locals() that I'd encountered in 
the past:

def _init(locs):
self = locs.pop('self')
for name, val in locs.items():
setattr(self, name, val)

class Spam:
def __init__(self, a, b, c, d):
_init(locals())

In looking at locals(), it was coming back in reverse order of method arguments 
(d, c, b, a, self).   To be honest, it wasn't a critical matter, but more of an 
odd curiosity in light of recent dictionary ordering.

I could imagine writing a slightly more general version of _init() that didn't 
depend on a named 'self' argument if order was preserved:

def _init(locs):
   items = list(locs.items())
   _, self = items[0]
   for name, val in items[1:]:
   setattr(self, name, val)

Personally, I don't think the issue Nathaniel brings up is worth worrying about 
because it would be such a weird edge case on something that is already an edge 
case.  Returning variables in "lexical order"--meaning the order in which first 
encountered in the source seems pretty sensible to me.

--
nosy: +dabeaz

___
Python tracker 

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



[issue32685] Erroneous suggestion in print statement

2018-01-28 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 43c0f1ac5ed8bc9c3bd048d2ce4de4c98a83de99 by Nick Coghlan (Nitish 
Chandra) in branch 'master':
bpo-32685: Improve suggestion for print statement (GH-5375)
https://github.com/python/cpython/commit/43c0f1ac5ed8bc9c3bd048d2ce4de4c98a83de99


--

___
Python tracker 

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



[issue32685] Erroneous suggestion in print statement

2018-01-28 Thread Nick Coghlan

Change by Nick Coghlan :


--
stage: patch review -> backport needed

___
Python tracker 

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



[issue32685] Erroneous suggestion in print statement

2018-01-28 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5221
stage: backport needed -> patch review

___
Python tracker 

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



[issue29120] Move hash randomisation initialisation out of Python/random.c

2018-01-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

Aye, but the reason they're here rather than in the os module where you might 
otherwise expect to find them is because the hash randomization bootstrapping 
needs them.

--

___
Python tracker 

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



[issue32693] os.path.ismount does not accept bytes objects

2018-01-28 Thread Nikolay Aleksandrovich Pavlov

New submission from Nikolay Aleksandrovich Pavlov :

According to the documentation it ought to accept any path-like object, but 
actually throws for bytes ones. The trace of logic is the following:

1. ismount() from Lib/ntpath.py is using `os.fpath` which may return either 
bytes or str: 
https://github.com/python/cpython/blob/255f7a26da47ca6b7bd1d375b8a04920f68c119c/Lib/ntpath.py#L263.
2. The output is passed to _getvolumepathname unchanged.
3. The clinic defines that function’s only argument as 
[unicode](https://github.com/python/cpython/blob/255f7a26da47ca6b7bd1d375b8a04920f68c119c/Modules/posixmodule.c#L3793).
4. If clinic was not there it would still require to change how path_wchar is 
defined below, PyUnicode… functions will not accept bytes object: 
https://github.com/python/cpython/blob/255f7a26da47ca6b7bd1d375b8a04920f68c119c/Modules/posixmodule.c#L3808.

Suggestion: change `Lib/ntpath.py` to use `os.fsdecode` in place of `os.fspath`.

This is a relay of issue https://github.com/powerline/powerline/issues/1876. 
Initial reporter observed bug on Python 3.6 (patch unknown), I could see an 
issue in current master (all links above point to that).

--
components: Windows
messages: 310936
nosy: Nikolay Aleksandrovich Pavlov, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: os.path.ismount does not accept bytes objects
type: behavior
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



[issue32685] Erroneous suggestion in print statement

2018-01-28 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset b3b4b81d0147534151941105eba4af984acdc763 by Nick Coghlan (Miss 
Islington (bot)) in branch '3.6':
bpo-32685: Improve suggestion for print statement (GH-5380)
https://github.com/python/cpython/commit/b3b4b81d0147534151941105eba4af984acdc763


--

___
Python tracker 

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



[issue32685] Erroneous suggestion in print statement

2018-01-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

Thanks for the patches, Sanyam & Nitish, and for the original bug report Mayank.

Thanks also to Cheryl for nudging us to get it resolved :)

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



[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2018-01-28 Thread Ofer

Ofer  added the comment:

Perhaps this is a problem for a different issue, but pickling custom exceptions 
fails when the exception gets more than one argument:

import pickle
class MultipleArgumentsError(Exception):
def __init__(self, a, b):
self.a = a
self.b = b
Exception.__init__(self, a)

pickle.loads(pickle.dumps(MultipleArgumentsError('a', 'b')))


this code produces the following error:

Traceback (most recent call last):
  File "/tmp/multiple_arguments_exception.py", line 8, in 
pickle.loads(pickle.dumps(MultipleArgumentsError('a', 'b')))
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
 line 1388, in loads
return Unpickler(file).load()
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
 line 864, in load
dispatch[key](self)
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
 line 1139, in load_reduce
value = func(*args)
TypeError: __init__() takes exactly 3 arguments (2 given)

--
nosy: +slallum

___
Python tracker 

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



[issue31900] localeconv() should decode numeric fields from LC_NUMERIC encoding, not from LC_CTYPE encoding

2018-01-28 Thread Andreas Schwab

Andreas Schwab  added the comment:

> The technical issue here is that the libc has no "stateless" function to 
> process bytes and text with one specific locale.

That's not true.  There is a rich set of *_l functions that take a locale_t 
object and operate on that locale.

--
nosy: +schwab

___
Python tracker 

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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2018-01-28 Thread Steve Dower

Steve Dower  added the comment:

>From the log file, all I can tell is that it failed to open the file 
>containing information about ongoing installs. At a guess, another install was 
>running (maybe failed?) and didn't clean up properly.

Rebooting should generally resolve that. If it doesn't, you're either looking 
at serious OS corruption (worth testing if any other MSI installers work - 
Anaconda does not use MSI) or disk corruption.

--

___
Python tracker 

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



[issue32611] Tkinter taskbar icon (Windows)

2018-01-28 Thread Steve Dower

Steve Dower  added the comment:

To fix this, we need to make Idle its own .exe file with an AppId and properly 
registered icon. Right now, it's just a .pyw file running in Python, and so 
things like pinning icons or file associations won't work cleanly.

--
type: behavior -> enhancement
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue17305] IDNA2008 encoding missing

2018-01-28 Thread Christian Heimes

Christian Heimes  added the comment:

A fix will land in 3.7 and maybe get backported to 3.6. Stay tuned!

--

___
Python tracker 

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



[issue32686] python3.6.4 build with --enable-optimzations hangs on macOS 10.13

2018-01-28 Thread 7stud

7stud <7s...@excite.com> added the comment:

Hi Ned Deily,

Thanks for the suggestion.  I ran ./configure again, but this time make errored 
out:


...
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [python.exe] Error 1

So I deleted the Python3.6.4 directory:

$ rm -rf Python-3.6.4

and I started over:

~/Downloads$ tar xfvz Python-3.6.4.tgz 

Then I ran ./configure, then make, and this time make completed successfully.

Howevernext up was make test, and after letting make test run for two 
hours, I killed it:

...
...
running: test_asyncio (56 sec)
running: test_asyncio (86 sec)
running: test_asyncio (116 sec)
running: test_asyncio (146 sec)
running: test_asyncio (176 sec)
running: test_asyncio (206 sec)
running: test_asyncio (236 sec)
running: test_asyncio (266 sec)
running: test_asyncio (296 sec)
running: test_asyncio (326 sec)
running: test_asyncio (356 sec)
running: test_asyncio (386 sec)
running: test_asyncio (416 sec)
running: test_asyncio (446 sec)
running: test_asyncio (476 sec)
running: test_asyncio (506 sec)
running: test_asyncio (536 sec)
running: test_asyncio (566 sec)
running: test_asyncio (596 sec)
running: test_asyncio (626 sec)
running: test_asyncio (656 sec)
running: test_asyncio (686 sec)
running: test_asyncio (716 sec)
running: test_asyncio (746 sec)
running: test_asyncio (776 sec)
running: test_asyncio (806 sec)
running: test_asyncio (836 sec)
running: test_asyncio (866 sec)
running: test_asyncio (896 sec)
running: test_asyncio (926 sec)
running: test_asyncio (956 sec)
running: test_asyncio (986 sec)
running: test_asyncio (1016 sec)
running: test_asyncio (1046 sec)
running: test_asyncio (1076 sec)
running: test_asyncio (1106 sec)
running: test_asyncio (1136 sec)
running: test_asyncio (1166 sec)
running: test_asyncio (1196 sec)
running: test_asyncio (1226 sec)
running: test_asyncio (1256 sec)
running: test_asyncio (1286 sec)
running: test_asyncio (1316 sec)
running: test_asyncio (1346 sec)
running: test_asyncio (1376 sec)
running: test_asyncio (1406 sec)
running: test_asyncio (1436 sec)
running: test_asyncio (1466 sec)
running: test_asyncio (1496 sec)
running: test_asyncio (1526 sec)
running: test_asyncio (1556 sec)
running: test_asyncio (1586 sec)
running: test_asyncio (1616 sec)
running: test_asyncio (1646 sec)
running: test_asyncio (1676 sec)
running: test_asyncio (1706 sec)
running: test_asyncio (1736 sec)
running: test_asyncio (1766 sec)
running: test_asyncio (1796 sec)
running: test_asyncio (1826 sec)
running: test_asyncio (1856 sec)
running: test_asyncio (1886 sec)
running: test_asyncio (1916 sec)
running: test_asyncio (1946 sec)
running: test_asyncio (1976 sec)
running: test_asyncio (2006 sec)
running: test_asyncio (2036 sec)
running: test_asyncio (2066 sec)
running: test_asyncio (2096 sec)
running: test_asyncio (2126 sec)
running: test_asyncio (2156 sec)
running: test_asyncio (2186 sec)
running: test_asyncio (2216 sec)
running: test_asyncio (2246 sec)
running: test_asyncio (2276 sec)
running: test_asyncio (2306 sec)
running: test_asyncio (2336 sec)
running: test_asyncio (2366 sec)
running: test_asyncio (2396 sec)
running: test_asyncio (2426 sec)
running: test_asyncio (2456 sec)
running: test_asyncio (2486 sec)
running: test_asyncio (2516 sec)
running: test_asyncio (2546 sec)
running: test_asyncio (2576 sec)
running: test_asyncio (2606 sec)
running: test_asyncio (2636 sec)
running: test_asyncio (2666 sec)
running: test_asyncio (2696 sec)
running: test_asyncio (2726 sec)
running: test_asyncio (2756 sec)
running: test_asyncio (2786 sec)
running: test_asyncio (2816 sec)
running: test_asyncio (2846 sec)
running: test_asyncio (2876 sec)
running: test_asyncio (2906 sec)
running: test_asyncio (2936 sec)
running: test_asyncio (2966 sec)
running: test_asyncio (2996 sec)
running: test_asyncio (3026 sec)
running: test_asyncio (3056 sec)
running: test_asyncio (3086 sec)
running: test_asyncio (3116 sec)
running: test_asyncio (3146 sec)
running: test_asyncio (3176 sec)
running: test_asyncio (3206 sec)
running: test_asyncio (3236 sec)
running: test_asyncio (3266 sec)
running: test_asyncio (3296 sec)
running: test_asyncio (3326 sec)
running: test_asyncio (3356 sec)
running: test_asyncio (3386 sec)
running: test_asyncio (3416 sec)
running: test_asyncio (3446 sec)
running: test_asyncio (3476 sec)
running: test_asyncio (3506 sec)
running: test_asyncio (3536 sec)
running: test_asyncio (3566 sec)
running: test_asyncio (3596 sec)
running: test_asyncio (3626 sec)
running: test_asyncio (3656 sec)
running: test_asyncio (3686 sec)
running: test_asyncio (3716 sec)
running: test_asyncio (3746 sec)
running: test_asyncio (3776 sec)
running: test_asyncio (3806 sec)
running: test_asyncio (3836 sec)
running: test_asyncio (3866 sec)
running: test_asyncio (3896 sec)
running: test_asyncio (3926 sec)
running: test_asyncio (3956 sec)
running: test_asyncio (3986 sec)
running: test_asyncio (4016 sec)
running: test_asyn

[issue32659] Solaris "stat" should support "st_fstype"

2018-01-28 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:


New changeset 6c51d518800cdda7ba16ae163be0d211d2c4fa12 by jcea in branch 
'master':
bpo-32659: Solaris "stat" should support "st_fstype" (#5307)
https://github.com/python/cpython/commit/6c51d518800cdda7ba16ae163be0d211d2c4fa12


--

___
Python tracker 

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



[issue32660] Solaris should support constants like termios' FIONREAD

2018-01-28 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:


New changeset f0a95f27c043e847a23940534fdfc53e1b3e31a1 by jcea in branch 
'master':
bpo-32660: Solaris should support constants like termios' FIONREAD (#5328)
https://github.com/python/cpython/commit/f0a95f27c043e847a23940534fdfc53e1b3e31a1


--

___
Python tracker 

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



[issue29571] test_re is failing when local is set for `en_IN`

2018-01-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

Hmm, even though we reverted the original test_re based change, and the initial 
attempted fix for bpo-20087 was also reverted, I'm still not currently seeing 
the failure for:

LANG=en_IN.utf8 ./python -m test -v test_re

I do have the locale installed, so it's not a result of falling back to the C 
locale and that getting coerced to C.UTF-8:

$ LANG=en_IN.utf8 locale -k currency_symbol
currency_symbol="₹"

Jaysinh, are you still seeing this test failure on a fresh checkout?

--

___
Python tracker 

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



[issue29571] test_re is failing when local is set for `en_IN`

2018-01-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

Hmm, this actually works for me on Fedora 27 even if I go back to 
1b3d88eb33085e90af729c4c2f78b5ba1b942b1e, the commit just before the initially 
merged (and subsequently reverted) test change above.

Unassigning, since I can't readily reproduce it myself.

--
assignee: ncoghlan -> 

___
Python tracker 

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



[issue31687] test_semaphore_tracker() of test_multiprocessing_spawn fails randomly (race condition?)

2018-01-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

A warning I'm sometimes seeing currently on successful test runs is as follows:

--
/home/ncoghlan/devel/cpython/Lib/multiprocessing/semaphore_tracker.py:55: 
UserWarning: semaphore_tracker: process died unexpectedly, relaunching.  Some 
semaphores might leak.
  warnings.warn('semaphore_tracker: process died unexpectedly, '
--

So it may be that the system has to be under load for the test suite to notice 
that failure.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue32688] weird comment out line of code

2018-01-28 Thread Xiang Zhang

Xiang Zhang  added the comment:

Ahh, I figure out that the line is useless and can't affect any logic then. So 
the analyzer is right! Sorry for the bother Brett.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue21417] Compression level for zipfile

2018-01-28 Thread bbayles

Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

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



[issue21417] Compression level for zipfile

2018-01-28 Thread bbayles

Change by bbayles :


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



[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2018-01-28 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

@slallum, That does seem to be a problem, though I do observe that the issue 
reported by bdb with CalledProcessError is no longer an issue:

>>> import subprocess, pickle
>>> try:
...   subprocess.check_call(['python', '-c', 'raise SystemExit(1)'])
... except Exception as e:
...   pickle.loads(pickle.dumps(e))
... 
CalledProcessError(1, ['python', '-c', 'raise SystemExit(1)'])

Looking into how CalledProcessError is defined 
(https://github.com/python/cpython/blob/79db11ce99332d62917be9d03b31494b1ff2f96a/Lib/subprocess.py#L60)
 may shed some light on the recommended way to make a pickleable Exception 
class that takes more than one argument.

Hmm. It seems it does it by not calling the superclass __init__. Indeed, 
following that model it seems to work:

import pickle
class MultipleArgumentsError(Exception):
def __init__(self, a, b):
self.a = a
self.b = b

err = pickle.loads(pickle.dumps(MultipleArgumentsError('a', 'b')))
assert err.a == 'a'
assert err.b == 'b'

--

___
Python tracker 

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



[issue32654] Fixes Python for Android API 19

2018-01-28 Thread Chih-Hsuan Yen

Chih-Hsuan Yen  added the comment:

Here are some ideas after testing:

* Testing environment:
 - My building scripts at https://github.com/yan12125/python3-android/
 - Android NDK r16b
 - Google's emulator image 'system-images;android-19;default;x86'

* Ideas/findings:
 - Locale emulation for setlocale() no longer works as _locale builds fine.

>>> locale.setlocale(locale.LC_ALL, None)
Traceback (most recent call last):
  File "", line 1, in 
  File "/data/local/tmp/python3/usr/lib/python3.7/locale.py", line 608, in 
setlocale
return _setlocale(category, locale)
locale.Error: locale query failed

 - Declarations for mmap/sendfile shouldn't be necessary. In Android NDK r16b, 
sendfile() is defined if __USE_FILE_OFFSET64 is not defined: (from 
$ANDROID_NDK/sysroot/usr/include/sys/sendfile.h)

#if defined(__USE_FILE_OFFSET64)

#if __ANDROID_API__ >= 21
ssize_t sendfile(int __out_fd, int __in_fd, off_t* __offset, size_t __count) 
__RENAME(sendfile64) __INTRODUCED_IN(21);
#endif /* __ANDROID_API__ >= 21 */

#else
ssize_t sendfile(int __out_fd, int __in_fd, off_t* __offset, size_t __count);
#endif

#if __ANDROID_API__ >= 21
ssize_t sendfile64(int __out_fd, int __in_fd, off64_t* __offset, size_t 
__count) __INTRODUCED_IN(21);
#endif /* __ANDROID_API__ >= 21 */

__USE_FILE_OFFSET64 is defined as _FILE_OFFSET_BITS is defined to 64 in 
pyconfig.h. An NDK developer suggest "stop defining _FILE_OFFSET_BITS=64 on 
32-bit Android." 
(https://github.com/android-ndk/ndk/issues/536#issuecomment-333197557) Either 
disabling large file support on Android or simply don't define 
_FILE_OFFSET_BITS on Android should work.   (Android does not use 
_LARGEFILE_SOURCE)

 - SIGRTMIN/SIGRTMAX: This is a bug on older NDK. r15 has fixed it 
(https://github.com/android-ndk/ndk/issues/352). I propose to wait until 
CPython builds with NDK r15+. I don't like adding patches for a known bug in 
older toolchains and revert them later.

--

___
Python tracker 

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



[issue32694] macos/configure: Discover OpenSSL when installed with MacPorts

2018-01-28 Thread Yury Selivanov

Change by Yury Selivanov :


--
components: Cross-Build
nosy: Alex.Willmer, christian.heimes, ned.deily, yselivanov
priority: normal
severity: normal
status: open
title: macos/configure: Discover OpenSSL when installed with MacPorts
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue32694] macos/configure: Discover OpenSSL when installed with MacPorts

2018-01-28 Thread Yury Selivanov

New submission from Yury Selivanov :

Not sure if we should do it or not:

1. MacPorts maintainers will create a port file for Python 3.7 and they will 
just configure it with `configure --with-openssl=$PREFIX", where PREFIX is 
/opt/local by default.

2. This, however, would certainly improve the experience of manually building 
CPython on MacOS with macports (this would directly benefit guys like me).

--

___
Python tracker 

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



[issue32694] macos/configure: Discover OpenSSL when installed with MacPorts

2018-01-28 Thread Yury Selivanov

Change by Yury Selivanov :


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

___
Python tracker 

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



[issue32695] tarfile.open() raises TypeError when using compresslevel parameter with LZMA

2018-01-28 Thread bbayles

New submission from bbayles :

tarfile.open() allows for specifying both a compression type and a compression 
level. However, the compresslevel parameter doesn't work when using the xz 
modes.

import tarfile
good_archive = tarfile.open('/tmp/dummy.tar.gz', 'w:gz', compresslevel=9)
bad_archive = tarfile.open('/tmp/dummy.tar.gz', 'w:xz', compresslevel=9)

This gives an error in the tarfile.TarFile constructor:

TypeError: __init__() got an unexpected keyword argument 'compresslevel'

This appears to be due to tarfile.xzopen() specifying a preset keyword instead 
of a compresslevel keyword. This matches the LZMAFile compressor, but it means 
that it doesn't get passed in and is then carried along in the kwargs - see [1].

Changing to lzma.LZMAFile(fileobj or name, mode, preset=compresslevel) seems to 
fix the issue. Assuming that's the right fix, I'll submit a PR.

[1] 
https://github.com/python/cpython/blob/374c6e178a7599aae46c857b17c6c8bc19dfe4c2/Lib/tarfile.py#L1684-L1699

--
components: Library (Lib)
messages: 310954
nosy: bbayles
priority: normal
severity: normal
status: open
title: tarfile.open() raises TypeError when using compresslevel parameter with 
LZMA
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



[issue32694] macos/configure: Discover OpenSSL when installed with MacPorts

2018-01-28 Thread Christian Heimes

Change by Christian Heimes :


--
assignee:  -> christian.heimes

___
Python tracker 

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



[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2018-01-28 Thread Ofer

Ofer  added the comment:

@jason.coombs as far as I can tell, this only works in python3, but not in 
python2, where it still produces the same error.

--
versions: +Python 2.7 -Python 3.3

___
Python tracker 

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



[issue26219] implement per-opcode cache in ceval

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

> With the 3.7 beta deadline just around the corner, 3.8 will be the next 
> opportunity to reconsider this idea.

Nick, Ned, Guido,

Would it be OK if we add this to 3.7beta2?

I feel kind of bad about this one... few thoughts:  

1. The speedup is about 5-10% on macro-benchmarks!  This is significant.

2. Inada-san offered me help with this, and I declined, saying that I plan to 
do more research/experiments and commit it before 3.7.  And I didn't have time 
to do it because of other work I did for CPython.

3. Even though the optimization is invasive, I feel confident about it.  It 
just so happens that whatever modification we do to ceval, it will be covered 
100% with tests or any code you execute.  Any regression or anomaly should 
become apparent almost immediately.

4. We'll have quite a bit of time to see if this works or not.  This isn't a 
new functionality, so we can always pull it from the first RC build if 
necessary.

--
nosy: +inada.naoki, ned.deily

___
Python tracker 

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



[issue32611] Tkinter taskbar icon (Windows)

2018-01-28 Thread Minion Jim

Minion Jim  added the comment:

This isn't just IDLE. On the GIF, I also demonstrate other Tkinter windows 
which is why have been led to believe it is an underlying Tkinter problem 
rather than IDLE.

--

___
Python tracker 

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



[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2018-01-28 Thread Guido van Rossum

Guido van Rossum  added the comment:

Please don't discuss on closed issues. Open a new issue.

--

___
Python tracker 

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



[issue32654] Fixes Python for Android API 19

2018-01-28 Thread pmpp

pmpp  added the comment:

@yan12125
Hi, I ran some tests too and here are my findings:
 https://github.com/pmp-p/droid-pydk/tree/master/sources.32/build_logs

* I used some dirty patchset to cover more tests 
https://github.com/pmp-p/droid-pydk/tree/master/sources.32/cpython-bpo-30386.patchset
 i would be glad if you could have a look at them, as i am not a C/C++ 
programmer (i'm "pmpp" on IRC where we met last time).

* Maybe SIG* stuff is fixed only for unified headers API>=21 regardless of NDK 
that would need checking. 

* python build quite fine will all NDK ( sorry to say but especially the non 
vendor one can support cpython for prehistoric api and  version 3.5/3.6 
*without patches* under certain condition of use )

my thoughts :

* Only third parties libs that have trouble with NDK versions, like openssl but 
libssl and libcrypto are provided by OS.

* Third parties are not required to embed libpython. Xavier de Gaye's script 
use shared linking. you should be able to provide whatever version of those you 
need that's not a cpython's build script job to deal with that, imho it was 
just for demontrasting that android build can be easy. I personnally would not 
build my third parties that way.

*  non official cpython build runs very well after android 5.0 there's almost 
nothing to do left, and micropython is able to run everywhere cpython can't 
(yet) so nothing is impossible.

* old api are frozen, there won't be suddenly a lot to support, when devices 
using them will vanish from asian stores it will mark the end of them and their 
need of support : imho there's no "end of life/support" concept for android os.

* I'd like a possible api19 "best effort", because android kitkat vendor 
statistics are wrong they don't take into account the *huge* amount of 
gservice-less devices.

unclear if unrelated to this:

* platform=='android' shoud be set, regardless of any API version : Android 
platform exists and is already running some pythons, it is a fact.

Thanks Victor for trying to clean my patchset : i did not realize my embed use 
of libpython could help official cpython too. Anyway I would be glad to help 
this way or another.

--

___
Python tracker 

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



[issue26219] implement per-opcode cache in ceval

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

> It's up to the release manager, but personally it feels like you're pushing
too hard. Since you've done that frequently in the past I think we should
help you by declining your request.

NP, I totally understand.

> Now maybe we'll need to come up with a different way to do releases, but
that's more a python-dev discussion.

That would be great.

--

___
Python tracker 

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



[issue26219] implement per-opcode cache in ceval

2018-01-28 Thread Guido van Rossum

Guido van Rossum  added the comment:

It's up to the release manager, but personally it feels like you're pushing
too hard. Since you've done that frequently in the past I think we should
help you by declining your request. 3.8 is right around the corner (on a
Python release timescale) and this will give people a nice incentive to
upgrade. Subsequent betas exist to stabilize the release, not to put in
more new stuff.

Now maybe we'll need to come up with a different way to do releases, but
that's more a python-dev discussion.

--

___
Python tracker 

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



[issue32228] truncate() changes current stream position

2018-01-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 059f58ce938d9c3f0286412a4efb1b9131339421 by Antoine Pitrou 
(Nitish Chandra) in branch 'master':
bpo-32228: Reset raw_pos after unwinding the raw stream (#4858)
https://github.com/python/cpython/commit/059f58ce938d9c3f0286412a4efb1b9131339421


--
nosy: +pitrou

___
Python tracker 

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



[issue28414] SSL match_hostname fails for internationalized domain names

2018-01-28 Thread Greg Lindahl

Change by Greg Lindahl :


--
nosy: +wumpus

___
Python tracker 

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



[issue32696] Fix pickling exceptions with multiple arguments

2018-01-28 Thread Ofer

New submission from Ofer :

Pickling exceptions fails when a custom exception class requires multiple 
arguments.

import pickle
class MultipleArgumentsError(Exception):
def __init__(self, a, b):
self.a = a
self.b = b

pickle.loads(pickle.dumps(MultipleArgumentsError('a', 'b')))

this code produces the following error:

Traceback (most recent call last):
  File "/tmp/multiple_arguments_exception.py", line 8, in 
pickle.loads(pickle.dumps(MultipleArgumentsError('a', 'b')))
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
 line 1388, in loads
return Unpickler(file).load()
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
 line 864, in load
dispatch[key](self)
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
 line 1139, in load_reduce
value = func(*args)
TypeError: __init__() takes exactly 3 arguments (2 given)


The same error occurs when using a built-in module like subprocess:
>>> import subprocess, pickle
>>> try:
...   subprocess.check_call(['python', '-c', 'raise SystemExit(1)'])
... except Exception as e:
...   pickle.loads(pickle.dumps(e))
... 


Related issue: https://bugs.python.org/issue1692335

--
components: Interpreter Core
messages: 310963
nosy: alexandre.vassalotti, georg.brandl, jason.coombs, sbt, slallum, zseil
priority: normal
severity: normal
status: open
title: Fix pickling exceptions with multiple arguments
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue32691] "pdb -m " sets __main__.__package__ incorrectly

2018-01-28 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

In the backport, I found that `mod_spec.parent` seemed to be the right thing 
(in at least a few cases). Might that be preferable to 
`module_name.rpartition('.')[0]`?

--

___
Python tracker 

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



[issue26219] implement per-opcode cache in ceval

2018-01-28 Thread Ned Deily

Ned Deily  added the comment:

I concur with Guido and Nick; let's target this for 3.8.

--

___
Python tracker 

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



[issue32654] Fixes Python for Android API 19

2018-01-28 Thread Ned Deily

Ned Deily  added the comment:

Since we won't officially support Android in 3.7, these changes should wait for 
3.8 and until there is a PEP for Android support.

--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue32228] truncate() changes current stream position

2018-01-28 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
pull_requests: +5224

___
Python tracker 

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



[issue32694] macos/configure: Discover OpenSSL when installed with MacPorts

2018-01-28 Thread Ned Deily

Ned Deily  added the comment:

The good news is that, since Christian's recent enhancements in Issue32598 to 
have autoconf use pkg-config to detect OpenSSL header and lib files, configure 
will now automatically find the MacPorts OpenSSL as long as the MacPorts bin 
directory (typically /opt/local/bin) is in the shell PATH when you run 
configure.  MacPorts supplies pkg-config and .pc files for various packages it 
installs including OpenSSL. (Apple doesn't ship a copy of pkg-config with 
macOS).  I found this out by accident; thanks, Christian!  The current status 
quo is also more robust in that MacPorts is not necessarily installed in 
/opt/local, a problem with PR 5388 as it stands.  I install MacPorts from 
source to a non-standard location so it would be good for someone to verify 
that the current 3.7 configure works with a default (/opt/local) binary install 
of MacPorts.

--

___
Python tracker 

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



[issue32694] macos/configure: Discover OpenSSL when installed with MacPorts

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

> The good news is that, since Christian's recent enhancements in Issue32598 to 
> have autoconf use pkg-config to detect OpenSSL header and lib files, 
> configure will now automatically find the MacPorts OpenSSL as long as the 
> MacPorts bin directory (typically /opt/local/bin) is in the shell PATH when 
> you run configure.

/opt/local/bin *is* in my shell's PATH and `./configure' still fails to 
auto-discover OpenSSL:

~ » echo $PATH
/Users/yury/dev/bin /opt/local/bin /opt/local/sbin /usr/local/bin /usr/bin 
/bin /usr/sbin /sbin /usr/local/share/dotnet /Users/yury/dev/sys-venvs/fish/bin

--

___
Python tracker 

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



[issue32694] macos/configure: Discover OpenSSL when installed with MacPorts

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

OK, so the trick is to first install pkg-config:

   sudo port install pkgconfig
   ./configure
   make
   python -m ssl  # works

I'll close the PR then, but we need to document this trick with pkg-config 
somewhere.

--

___
Python tracker 

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



[issue32686] python3.6.4 build with --enable-optimzations hangs on macOS 10.13

2018-01-28 Thread Ned Deily

Ned Deily  added the comment:

Sorry, I wasn't clear but, yes, you will run into the same problem if you try 
to run the test suite with test_asyncio.  There are various ways to exclude 
specific tests (not particularly well-documented), one way is:

make test EXTRATESTOPTS='-x test_asyncio'

But, that said, building Python on current versions of macOS can be problematic 
in that Apple doesn't ship or, in the case of OpenSSL no longer ships, all of 
the third-party libraries and header files needed for a fully-functioning 
Python installation.  The Python Developer's Guide touches on this here:

https://devguide.python.org/setup/#build-dependencies

Depending on what you want to do with Python, you *might* be better off 
installing a pre-built one rather than trying to build it yourself.  Versions 
of Python 3.6.x for macOS 10.13 are available from 
https://www.python.org/downloads/ and from a number of third-party distributors 
like Homebrew, MacPorts, and others.  Good luck!

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 
(darwin 17.3.0)

___
Python tracker 

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



[issue32694] macos/configure: Discover OpenSSL when installed with MacPorts

2018-01-28 Thread Ned Deily

Ned Deily  added the comment:

Good!  Yes, that should go into the devguide.  Unfortunately, it only works 
with 3.7+, so the CFLAGS/LDFLAGS stuff is still needed for 3.6- and 2.7.

--

___
Python tracker 

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



[issue32694] macos/configure: Discover OpenSSL when installed with MacPorts

2018-01-28 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-28 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset a4d00012565d716db6e6abe1b8f33eaaa4de416e by Raymond Hettinger in 
branch 'master':
bpo-32690: Preserve order of locals() (#5379)
https://github.com/python/cpython/commit/a4d00012565d716db6e6abe1b8f33eaaa4de416e


--
nosy: +rhettinger

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-28 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5225

___
Python tracker 

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



[issue32228] truncate() changes current stream position

2018-01-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 1d896ed2cddada4455f40782e4120249defbfa70 by Antoine Pitrou in 
branch '3.6':
[3.6] bpo-32228: Reset raw_pos after unwinding the raw stream (GH-4858) (#5389)
https://github.com/python/cpython/commit/1d896ed2cddada4455f40782e4120249defbfa70


--

___
Python tracker 

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



[issue32228] truncate() changes current stream position

2018-01-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I've now pushed Nitish's fix to 3.7 and 3.6.   I have no interest in 
backporting to 2.7 at this point. Closing!

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



[issue32697] Guarantee that Python preserves the order of kwonly parameters

2018-01-28 Thread Larry Hastings

New submission from Larry Hastings :

Following on from the "Can Python guarantee the order of keyword-only 
parameters?", here's a patch to enforce that guarantee.  It adds documentation 
that makes the guarantee, and adds tests that make at least a passable attempt 
at testing that it's true.

I nosied everybody who +1'd my original proposal in python-dev, because I'm 
looking for someone to review the patch.  Beta 1 gets tagged on Sunday, so can 
someone rubber-stamp this today?

--
assignee: larry
components: Interpreter Core
messages: 310975
nosy: eric.snow, gregory.p.smith, larry, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: Guarantee that Python preserves the order of kwonly parameters
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue32697] Guarantee that Python preserves the order of kwonly parameters

2018-01-28 Thread Larry Hastings

Change by Larry Hastings :


--
keywords: +patch
pull_requests: +5226

___
Python tracker 

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



[issue32697] Guarantee that Python preserves the order of kwonly parameters

2018-01-28 Thread Eric V. Smith

Change by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-28 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 9105879bfd7133ecbac67f3e9c0bacf6e477de5a by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.6':
bpo-32690: Preserve order of locals() (GH-5379) (#5390)
https://github.com/python/cpython/commit/9105879bfd7133ecbac67f3e9c0bacf6e477de5a


--

___
Python tracker 

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



[issue32327] Make asyncio methods documented as coroutines - coroutines.

2018-01-28 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +5227

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-28 Thread Raymond Hettinger

Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue32621] Problem of consistency in collection.abc documentation

2018-01-28 Thread Raymond Hettinger

Change by Raymond Hettinger :


--
assignee: docs@python -> rhettinger

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

Why did this fix go to 3.6?

--
nosy: +yselivanov

___
Python tracker 

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



[issue32698] Improper gzip compression if output file extension is not "gz"

2018-01-28 Thread Adrien

New submission from Adrien :

Hello.

The following code produces a improper compressed "test.txt.gzip" file:

import gzip
import shutil

input_path = "test.txt"
output_path = input_path + ".gzip"

with open(input_path, 'w') as file:
file.write("abc" * 10)

with gzip.open(output_path, 'wb') as f_out:
with open(input_path, 'rb') as f_in:
shutil.copyfileobj(f_in, f_out)

Although the content can be read correctly using `gzip.open(outputh_path, 
'rb')`, it cannot be correctly opened using software like 7-Zip or WinRar.
If I open the "test.txt.gzip" file, it contains another "test.txt.gzip" file. 
If I change the code to use ".gz" extension and then open "test.txt.gz", it 
contains the expected "test.txt" file.
The contained "test.txt.gzip" is actually the same (at bytes level) that 
"test.txt", just the filename differs which causes tools like 7-Zip to mess up.

The bug is not present using compressions functions from "bz2" and "lzma" 
modules. I can use custom extension, it still can be (un)compressed without 
issue.

As to why I need to use an extension differents from ".gz": I would like to 
compress arbitrary ".tar" file given in input to ".tgz". I wish the user could 
open the file in his favorite software archiver and see that it contains a 
".tar" file, rather than he does not understand why it contains the same ".tgz" 
file.

--
components: Library (Lib)
files: test.py
messages: 310978
nosy: Delgan
priority: normal
severity: normal
status: open
title: Improper gzip compression if output file extension is not "gz"
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47414/test.py

___
Python tracker 

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



[issue28685] Optimizing list.sort() by performing safety checks in advance

2018-01-28 Thread Kirill Balunov

Kirill Balunov  added the comment:

What is the current status of this issue and will it go into Python 3.7?

--
nosy: +godaygo

___
Python tracker 

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



[issue32699] pythonXY._pth : unclear how .pth files are handled

2018-01-28 Thread Thomas Kluyver

New submission from Thomas Kluyver :

Nicholas Tollervey has been getting Pynsist to use the new pythonXY._pth file 
to assemble sys.path. However, I'm not clear on how this behaves with .pth 
files. The docs on this 
(https://docs.python.org/3/using/windows.html#finding-modules ) appear to 
contradict themselves:

> site is not imported unless one line in the file specifies import site
> ...
> Note that .pth files (without leading underscore) will be processed normally 
> by the site module.

I can see two possibilities:

1. .pth files are processed normally if and only if the ._pth file specifies 
'import site'. If it doesn't, they are ignored.
2. If a .pth file is encountered, site is imported to process it, but with 
sys.flags.nosite set, so that site doesn't do the normal stuff on import.

Some packages unfortunately seem to depend on .pth files getting processed, so 
if 1. is the case, Pynsist needs to ensure site is loaded.

Thanks :-)

--
messages: 310980
nosy: steve.dower, takluyver
priority: normal
severity: normal
status: open
title: pythonXY._pth : unclear how .pth files are handled

___
Python tracker 

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



[issue32327] Make asyncio methods documented as coroutines - coroutines.

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset bec2372b7e1da5dfdbadaf242aa8e994b164cace by Yury Selivanov in 
branch 'master':
bpo-32327: Revert loop.run_in_executor behaviour: return a Future. (#5392)
https://github.com/python/cpython/commit/bec2372b7e1da5dfdbadaf242aa8e994b164cace


--

___
Python tracker 

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



[issue32697] Guarantee that Python preserves the order of kwonly parameters

2018-01-28 Thread Larry Hastings

Larry Hastings  added the comment:


New changeset f36ba12809d5db1b76464d8f1f04dad8d685ec78 by larryhastings in 
branch 'master':
bpo-32697: Definition order of kwonly params is now guaranteed preserved. 
(#5391)
https://github.com/python/cpython/commit/f36ba12809d5db1b76464d8f1f04dad8d685ec78


--

___
Python tracker 

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



[issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory

2018-01-28 Thread Emily Morehouse

Change by Emily Morehouse :


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

___
Python tracker 

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



[issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory

2018-01-28 Thread Emily Morehouse

Emily Morehouse  added the comment:

Thanks for the bug report!

shutil.move should certainly accept a path object, as shutil.copy does, though 
it should be noted that in your example, 'path' could become out of date as it 
does not refresh the path information. For example, with shutil.move fixed:

>>> import os, pathlib, shutil
>>> os.mkdir('test1')
>>>
>>> os.mkdir('test2')
>>> path = pathlib.Path('test1')
>>> path.absolute()
PosixPath('/Users/e/Development/OSS/cpython/test1')
>>> shutil.move(path, 'test2')
'test2/test1'
>>> path.absolute()
PosixPath('/Users/e/Development/OSS/cpython/test2')

test1 is now actually at '/Users/e/Development/OSS/cpython/test2/test1'


For the fix:
I did a bit of digging and the error comes from a helper method _basename that 
uses rstrip to remove a trailing separator, hence the error as rstrip doesn't 
exist for a path object (and I don't think it makes sense that it should, 
though that was one solution). Removing the trailing separator is, however, 
very important in determining the full destination path.

After trying a few different approaches, I think the simplest way is to cast 
the src to a string before finding its appropriate basename. I also added some 
comments to make it more clear why _basename is used over os.path.basename to 
hopefully save someone else time in the future.

A more robust option would be to explicitly handle Path objects or to handle 
exceptions for any dst that cannot be cast to a string. However, the current 
patch fixes the issue without introducing new problems.

--
nosy: +emilyemorehouse

___
Python tracker 

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



[issue32697] Guarantee that Python preserves the order of kwonly parameters

2018-01-28 Thread Larry Hastings

Larry Hastings  added the comment:

Thanks for the quick turnaround reviews!  Today we've all collectively made 
Python a better programming language.

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



[issue32697] Guarantee that Python preserves the order of kwonly parameters

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

> Today we've all collectively made Python a better programming language.

Literally can't stop doing that for some reason... :)

--

___
Python tracker 

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



[issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory

2018-01-28 Thread Craig Holmquist

Craig Holmquist  added the comment:

In my test, the second call to path.absolute() is just returning the same 
result as the first call, which is what I would expect (as you say, the path 
object doesn't update automatically).

However, your output shows it returning 
'/Users/e/Development/OSS/cpython/test2' instead of the (now broken) path from 
the first call.  Maybe I'm missing something?

--

___
Python tracker 

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



[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2018-01-28 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +5229
stage:  -> patch review

___
Python tracker 

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



[issue28414] SSL match_hostname fails for internationalized domain names

2018-01-28 Thread Christian Heimes

Change by Christian Heimes :


--
pull_requests: +5230

___
Python tracker 

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



[issue31399] Let OpenSSL verify hostname and IP address

2018-01-28 Thread Christian Heimes

Change by Christian Heimes :


--
pull_requests: +5231

___
Python tracker 

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



[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

Mark,

Two tests fail on MacOS X now (newly added tests).  I'm reverting the change 
for now.  If you figure this out, please re-submit a PR for a quick approval.


==
ERROR: test_getaddrinfo_ipv6_scopeid (test.test_socket.GeneralModuleTests)
--
Traceback (most recent call last):
  File "/Users/yury/dev/pydev/cpython/Lib/test/test_socket.py", line 1612, in 
test_getaddrinfo_ipv6_scopeid
ifindex = socket.if_nametoindex(test_interface)
OSError: no interface with this name

==
ERROR: test_getnameinfo_ipv6_scopeid (test.test_socket.GeneralModuleTests)
--
Traceback (most recent call last):
  File "/Users/yury/dev/pydev/cpython/Lib/test/test_socket.py", line 1636, in 
test_getnameinfo_ipv6_scopeid
nameinfo = socket.getnameinfo(sockaddr, socket.NI_NUMERICHOST | 
socket.NI_NUMERICSERV)
socket.gaierror: [Errno 4] Non-recoverable failure in name resolution

--

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

___
Python tracker 

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



[issue17305] IDNA2008 encoding missing

2018-01-28 Thread Christian Heimes

Christian Heimes  added the comment:

bpo-31399 has fixed hostname matching for IDNA 2003 compatible domain names. 
IDNA 2008 domain names with German ß are still broken, for example:

UnicodeError: ('IDNA does not round-trip', b'xn--knigsgchen-b4a3dun', 
b'xn--knigsgsschen-lcb0w')

--

___
Python tracker 

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



[issue28685] Optimizing list.sort() by performing safety checks in advance

2018-01-28 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

It would be really nice to have this into 3.7

--
nosy: +rhettinger
priority: normal -> high

___
Python tracker 

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



[issue32688] weird comment out line of code

2018-01-28 Thread Brett Cannon

Brett Cannon  added the comment:

We should probably delete the line regardless so no one else gets thrown by 
this (or at least leave a comment).

--

___
Python tracker 

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




[issue18369] X509 cert class for ssl module

2018-01-28 Thread Ned Deily

Ned Deily  added the comment:

At Christian's request and considering the importance of the ssl module, I'm 
going to allow an extension for landing of this feature until 3.7.0b2, 
currently scheduled for 2018-02-26.  If anyone else can help Christian get this 
in before b2, that would be great.

--
nosy: +ned.deily
priority: high -> deferred blocker
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



[issue28414] SSL match_hostname fails for internationalized domain names

2018-01-28 Thread Ned Deily

Ned Deily  added the comment:

At Christian's request and considering the importance of the ssl module, I'm 
going to allow an extension for landing of this feature until 3.7.0b2, 
currently scheduled for 2018-02-26.  If anyone else can help Christian get this 
in before b2, that would be great.  I'm removing older versions for now. We can 
discuss potential backports after the feature lands.

--
nosy: +ned.deily
priority: normal -> deferred blocker
versions: +Python 3.8 -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



[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 0ceb717689b04c0540d78c1ba93c0572c66c0994 by Yury Selivanov in 
branch 'master':
Revert "bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)" 
(#5394)
https://github.com/python/cpython/commit/0ceb717689b04c0540d78c1ba93c0572c66c0994


--

___
Python tracker 

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



[issue32611] Tkinter taskbar icon (Windows)

2018-01-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Looking at the animated .gif, Jim's problem has nothing to do with IDLE in 
particular, and is as least partly specific to his system, as I do not have the 
same problem on my system.  (That does not mean that improvements are not 
possible, so that reboots are not needed after updates.)

If one runs a file with python.exe that does not exit immediately, the taskbar 
icon is the 'Python Console icon, a dark console with blue title bar and text 
and the Python double snake overlaid.  If on runs a file with pythonw.exe (no 
console) that does not exit immediately, the taskbar icon should be the 'Python 
GUI' icon, a spiral-bound notebook page with folded upper right corner and the 
Python double snake overlaid.  The expected use case is a GUI program, such as 
a tkinter program, that runs an event loop until closed.  IDLE is just the 
prime example of such. Another example is the test program for this issue.

import tkinter as tk
r = tk.Tk()
r.mainloop()

When I name this file tem.py or tem.pyw and double-click, I get the respective 
Python icons.

Jim, the 'blank' icon you see when you double-click *.pyw is a white sheet of 
paper with the upper right corner folded.  It is the first one shown when the 
builtin icons are displayed.  It is used when Windows cannot find the proper 
icon for an application (or perhaps also when there is None).

Some while ago, after an update, my pinned Skype icon visually changed from the 
blue blob with white S to this default.  Yesterday, I right-clicked the folded 
page icon, right-clicked 'Skype, selected Properties, and then [Change Icon] on 
the Shortcut tab.

An error box popped up with a message similar to 
"%SystemRoot%\Installer\{3B7E914A-93D5-4A29-92BB-AF8C3F66C431}\SkypeIcon.exe 
cannot be found". My guess is that an update changed the uuid without updating 
the pinned icon, so the default folded page is the substitute.  When I clicked 
'OK', the Change Icon dialog appeared.  When I browsed to the Skype directory, 
I did not find an icon file, so I clicked on Skype.exe instead, and that 
worked, and I again have the Skype icon on my taskbar.

Jim, I suggest you try the same, except navigate to 3.6 pythonw.exe.  Running 
'import sys; sys.executable' shows the location.  If pythonw.exe has the proper 
icon, I expect that this should work.

--
type: enhancement -> behavior
versions: +Python 3.6 -Python 3.8

___
Python tracker 

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



[issue32700] The replys additional (Re.) is ok.

2018-01-28 Thread Allen

New submission from Allen :

..

--
messages: 310995
nosy: BIGAL
priority: normal
severity: normal
status: open
title: The replys additional (Re.) is ok.

___
Python tracker 

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



[issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS

2018-01-28 Thread Ned Deily

Ned Deily  added the comment:

I'm not clear if this is still needed, i.e. has Debian backed off on their 
change across the board?  If it is still needed, I'm going to allow an 
extension for landing of it until 3.7.0b2, currently scheduled for 2018-02-26.  
If anyone else can help Christian get this in before b2, that would be great.  
I'm removing older versions for now. We can discuss potential backports after 
the code lands.

--
priority: normal -> deferred blocker
versions: +Python 3.8 -Python 2.7, Python 3.6

___
Python tracker 

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



[issue32693] os.path.ismount does not accept bytes objects

2018-01-28 Thread Eryk Sun

Change by Eryk Sun :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> support bytes paths in nt _getdiskusage, _getvolumepathname, 
and _getfinalpathname

___
Python tracker 

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



[issue28685] Optimizing list.sort() by performing safety checks in advance

2018-01-28 Thread Tim Peters

Tim Peters  added the comment:

I agree it would be nice (very!) to get this in.  Indeed, I'm surprised to see 
that this is still open :-(

But who can drive it?  I cannot.

--

___
Python tracker 

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



[issue31333] Implement ABCMeta in C

2018-01-28 Thread Ned Deily

Ned Deily  added the comment:

There has been a lot of work by a number of people on this feature leading up 
to the 3.7.0b1.  Thank you!  On PR 5273, Yury says that he believes the feature 
is ready to merge but would prefer an extension until 3.7.0b2 and that Guido 
has agreed.  I'll defer to Yury's judgement on this and somewhat reluctantly 
allow an extension: there's a lot going on here.  Let's try to get it in as 
soon as we can, please!

--
nosy: +ned.deily
priority: normal -> deferred blocker
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



[issue31333] Implement ABCMeta in C

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

> Let's try to get it in as soon as we can, please!

Thank you, Ned!  We'll get it merged in the next few days.

--

___
Python tracker 

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



[issue32251] Add asyncio.BufferedProtocol

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 631fd38dbf04dbf0127881f3977982e401a849e4 by Yury Selivanov in 
branch 'master':
bpo-32251: Implement asyncio.BufferedProtocol. (#4755)
https://github.com/python/cpython/commit/631fd38dbf04dbf0127881f3977982e401a849e4


--

___
Python tracker 

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



[issue17048] calendar should understand full- vs. half-width characters

2018-01-28 Thread Robert Booth

Robert Booth  added the comment:

There is similar misaligned output in Japanese and Korean:

Korean:
 1월2월3월
월  화  수  목  금  토  일   월  화  수  목  금  토  일   월  화  수  목  금  토  일
 1  2  3  4  5  6  71  2  3  41  2  3  4
 8  9 10 11 12 13 14   5  6  7  8  9 10 11   5  6  7  8  9 10 11

Japanese:
 1月2月3月
月  火  水  木  金  土  日   月  火  水  木  金  土  日   月  火  水  木  金  土  日
 1  2  3  4  5  6  71  2  3  41  2  3  4
 8  9 10 11 12 13 14   5  6  7  8  9 10 11   5  6  7  8  9 10 11

I came across this issue while using khal, a command-line calendar. That 
program also uses the calendar.LocaleTextCalendar class. I've raised an issue 
at https://github.com/pimutils/khal/issues/751

--
nosy: +ishigoya

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-28 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> Why did this fix go to 3.6?

The patch is trivially small and fixes an odd an unnecessary implementation 
quirk.  Backporting will help avoid confusing dissimilarity between 3.6 and 
3.7.  It also makes maintenance easier by keeping the versions in-sync (there 
are a number of precedents for this).

--

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

I don't have a strong opinion on this, but I worry a bit that while the change 
is trivial, it still might break something (doctests? some obscure code?) in 
the next 3.6 point release.

--

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-28 Thread Ned Deily

Ned Deily  added the comment:

While I appreciate the desirability of changing the behavior, it does introduce 
a behavior change in a 3.6.x maintenance release.  I don't have a good feel for 
the probability that current users or 3-party libraries are depending on the 
old behavior.  Anyone want to hazard a guess?  If there is a significantly 
non-zero probability, perhaps this should wait for 3.7.

--
nosy: +ned.deily

___
Python tracker 

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



  1   2   3   >