[issue28975] os.walk generator giving inconsistent results

2016-12-20 Thread Eric V. Smith
Changes by Eric V. Smith : -- stage: -> resolved ___ Python tracker ___ ___

[issue29025] random.seed() relation to hash() function and its determinism is vague

2016-12-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: In Python 3.5 and Python 3.6, this is already fixed (decoupled from PYTHONHASHSEED). In Python 2.7, I could backport the fix, add a note to the docs, or just let it be (since seeding is turned off by default). The other versions of Python are already

[issue29011] No entry Deque in typing.py

2016-12-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- components: +Library (Lib) keywords: +patch nosy: +ned.deily stage: -> patch review type: -> enhancement versions: +Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45979/Deque.diff

[issue28988] Switch dict and set structures to PyVarObject

2016-12-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please leave the set object patch for me. I would like to do it a bit differently. -- ___ Python tracker ___

[issue13643] 'ascii' is a bad filesystem default encoding

2016-12-20 Thread Nick Coghlan
Nick Coghlan added the comment: Also see http://bugs.python.org/issue28180 for a more recent proposal to tackle this by coercing the C locale to the C.UTF-8 locale -- nosy: +ncoghlan ___ Python tracker

[issue19846] Python 3 raises Unicode errors with the C locale

2016-12-20 Thread Nick Coghlan
Nick Coghlan added the comment: Also see http://bugs.python.org/issue28180 for a more recent proposal to tackle this by coercing the C locale to the C.UTF-8 locale -- ___ Python tracker

[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-20 Thread David
David added the comment: So I tried changing it to py.exe, and it doesn't load the IDLE: instead, it opens up the run command for the program in command prompt. That's not what I want it to do. Also, there still is no Edit With IDLE option. And I tried doing the ProgID stuff, but none of it

[issue23903] Generate PC/python3.def by scraping headers

2016-12-20 Thread Steve Dower
Steve Dower added the comment: I just ran into this because PyModule_AddFunctions() was added to the stable ABI in 3.5, but was not added to python3.dll. This is blatantly a compilation error. We _need_ python3.def and the stable ABI to be in sync. I've rerun the script against Python 3.6

[issue29030] argparse: choices override metavar

2016-12-20 Thread R. David Murray
R. David Murray added the comment: metavar is, I believe, the intended way to change the default behavior. Whether or not this needs better documentation is a separate question :) -- nosy: +r.david.murray ___ Python tracker

[issue29030] argparse: choices override metavar

2016-12-20 Thread Cyker Way
New submission from Cyker Way: Using `choices` option in `argparse` module caused unwanted behavior. # Without `choices` parser = argparse.ArgumentParser() parser.add_argument('length') parser.print_help() ## Output usage: demo.py [-h] length positional arguments:

[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-20 Thread eryk sun
eryk sun added the comment: > There's no reason to for IDLE to be a system-level association if > the user has not chosen the association Ok, to clarify, SystemFileAssociations can be defined in either the system or user hive. It's fine if the IDLE menu is added this way when it's done just

[issue28932] Fail compile Python 3.6.0rc1 on OpenBSD 6.0

2016-12-20 Thread Ned Deily
Changes by Ned Deily : -- priority: release blocker -> ___ Python tracker ___ ___

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2016-12-20 Thread Ned Deily
Changes by Ned Deily : -- nosy: +ghaering ___ Python tracker ___ ___ Python-bugs-list

[issue29029] Faster positional arguments parsing in PyArg_ParseTupleAndKeywords

2016-12-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch speeds up parsing positional arguments in PyArg_ParseTupleAndKeywords(). $ ./python -m perf timeit "1 .to_bytes(1, 'little', signed=False)" Unpatched: Median +- std dev: 2.01 us +- 0.09 us Patched:Median +- std dev: 1.23 us +- 0.03 us

[issue24672] shutil.rmtree fails on non ascii filenames

2016-12-20 Thread Steve Dower
Steve Dower added the comment: Lib/posixpath.py needs a huge amount of work to behave correctly for either bytes or Unicode paths. I don't know why Lib/ntpath.py is okay here, but the code is different so I suspect it just happens to not need the same conversion. Switching for each platform

[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-20 Thread Steve Dower
Steve Dower added the comment: > Steve, you could move the "Edit with IDLE" menu out of the Python.File ProgId > to an entry defined in SystemFileAssociations. I could, but I don't want to. I'd rather figure out adding an "Open With" entry for IDLE. There's no reason to for IDLE to be a

[issue28997] test_readline.test_nonascii fails on Android

2016-12-20 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- stage: needs patch -> patch review ___ Python tracker ___

[issue28997] test_readline.test_nonascii fails on Android

2016-12-20 Thread Xavier de Gaye
Xavier de Gaye added the comment: The test is ok on Android when LANG=en_US.UTF-8. When LANG is not set, the check made by the first statement in test_nonascii() should skip the test but fails to skip it on Android as Py_EncodeLocale() always encode to utf8 whatever the locale (same as with

[issue24672] shutil.rmtree fails on non ascii filenames

2016-12-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm afraid I need to re-open this issue. Although passing unicode names to rmtree fixes the issue on Windows systems, it causes problems on Linux systems where LC_ALL=C. Consider this script: # # encoding: utf-8 from

[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-20 Thread eryk sun
eryk sun added the comment: When you change the association for executing scripts (either via Default Programs or the Open with => Choose another app menu), do not "look for another app on this PC". Manually associating files with an executable such as py.exe creates a ProgId that's only

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-12-20 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Victor and Serhiy! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread R. David Murray
R. David Murray added the comment: The RFC compliance battle in email was lost long ago. We have to do our best to process what we get, and to produce only RFC correct output (unless retransmitting without change). That is Postel's law, and you can't successfully process Internet email

[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread Eric Lafontaine
Eric Lafontaine added the comment: N.B., I've tried to do the keyword parameter on the get_param inside the get_boundary as well as I though it was a good Idea as well, but it was breaking some test cases (multiple ones). So I didn't pursue. N.B. I'm guessing (guessing) unquote must've been

[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi all, I hate this proposition. I feel it's a "victory" for the people who don't want to follow RFC standard and allow "triple"-quoting on things that aren't supposed to... Now that my opinion is said, I made 2 test case that should be added to the

[issue29027] 3.5.2 compile error from ssl related.

2016-12-20 Thread Christian Heimes
Christian Heimes added the comment: What is your platform, compiler and OpenSSL version? -- ___ Python tracker ___

[issue29028] Use-After-Free in PyString_FromStringAndSize() of stringobject.c

2016-12-20 Thread dyjakan
New submission from dyjakan: Recently I started doing some research related to language interpreters and I've stumbled upon a bug in current Python 2.7. I already contacted PSRT and we concluded that this doesn't have security implications. Repro file looks like this: ``` class Index(object):

[issue29027] 3.5.2 compile error from ssl related.

2016-12-20 Thread kevin
New submission from kevin: Download the python version 3.5.2 source code from official web site. Compile the python code by the following steps: sudo ./configure sudo make sudo make install but from make, I get the following errors: /home/boot/tools/Python-3.5.2/Modules/_ssl.c:2582:46: error:

[issue29026] time.time() documentation should mention UTC timezone

2016-12-20 Thread STINNER Victor
STINNER Victor added the comment: > time.time() is not quite UTC on Unix Handling time is a complex task, so we should enhance the doc to help users. If there are multiple cases, we can list them: "time.time() uses UTC timezone with or without leap seconds". Maybe with a link to

[issue29010] Incorrect description about scope related with inheritance

2016-12-20 Thread woo yoo
woo yoo added the comment: As for me, i prefer the new description, which is clear and easy to understand. -- ___ Python tracker ___

[issue29026] time.time() documentation should mention UTC timezone

2016-12-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: time.time() is not quite UTC on Unix: it usually (*) doesn't include leap seconds, which UTC does. The Wikipedia page has a good definition and explanation: https://en.wikipedia.org/wiki/Unix_time (*) "usually" because POSIX defines time() to not include

[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread R. David Murray
R. David Murray added the comment: I'm pretty sure you are correct in your guess that the utility is used by other code that depends on the <> unquoting. The new email policies (that is, the new header parsing code) probably do a better job of this, but get_param and friends haven't been

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-12-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset ce6a6cc3765d by Xiang Zhang in branch 'default': Issue #28822: Adjust indices handling of PyUnicode_FindChar(). https://hg.python.org/cpython/rev/ce6a6cc3765d -- nosy: +python-dev ___ Python tracker

[issue29010] Incorrect description about scope related with inheritance

2016-12-20 Thread Brendan Donegan
Brendan Donegan added the comment: Worth putting them side by side I think: "The name BaseClassName must be defined in a scope containing the derived class definition" vs. "BaseClassName must be defined in a namespace accessible from the scope containing the derived class definition"

[issue28968] xml rpc server fails with connection reset by peer error no 104

2016-12-20 Thread R. David Murray
R. David Murray added the comment: I'm sorry, I don't have time to dig in to this right now. Hopefully someone else can pick it up. You might try posting on the python-list mailing list, there are several core devs who hang out there and might be interested in the problem. -- nosy:

[issue29010] Incorrect description about scope related with inheritance

2016-12-20 Thread R. David Murray
R. David Murray added the comment: Would it make it clearer if we said "BaseClassName must be defined in a namespace accessible from the scope containing the dervied class definition" ? -- ___ Python tracker

[issue29026] time.time() documentation should mention UTC timezone

2016-12-20 Thread STINNER Victor
New submission from STINNER Victor: The documentation of the time.time() mentions "epoch" which it doesn't define epoch. If I recall correctly, it's January 1st, 1970 on most OS and most implementations of Python, except of IronPython which uses a different epoch.

[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-20 Thread Steve Dower
Steve Dower added the comment: C:\Windows\py.exe (probably. If you changed from the default options it may be elsewhere, but if you Open With on a .py file it should be there) -- ___ Python tracker

[issue29025] random.seed() relation to hash() function and its determinism is vague

2016-12-20 Thread Jakub Mateusz Kowalski
New submission from Jakub Mateusz Kowalski: 2.7 (https://docs.python.org/2/library/random.html#random.seed) - warning about PYTHONHASHSEED (environmental variable) voiding determinism - no warning on -R interpreter switch - relation to hash() function omitted 2.6

[issue24165] Free list for single-digits ints

2016-12-20 Thread INADA Naoki
INADA Naoki added the comment: Performance version: 0.5.0 Python version: 3.7.0a0 (64-bit) revision 31df7d9863f3+ Report on Linux-4.8.0-30-generic-x86_64-with-debian-stretch-sid Slower (13): - nbody: 232 ms +- 3 ms -> 241 ms +- 6 ms: 1.04x slower - unpack_sequence: 118 ns +- 3 ns -> 121 ns +- 0

[issue29024] Add Kivy entry to Graphic User Interface FAQ

2016-12-20 Thread Alexander Taylor
Changes by Alexander Taylor : -- type: enhancement -> ___ Python tracker ___

[issue29024] Add Kivy entry to Graphic User Interface FAQ

2016-12-20 Thread Alexander Taylor
Changes by Alexander Taylor : -- assignee: docs@python components: Documentation files: gui_faq_kivy.patch keywords: patch nosy: docs@python, inclement priority: normal severity: normal status: open title: Add Kivy entry to Graphic User Interface FAQ type:

[issue29023] Results of random.seed() call with integer argument should be claimed deterministic.

2016-12-20 Thread Jakub Mateusz Kowalski
New submission from Jakub Mateusz Kowalski: In https://docs.python.org/2/library/random.html#random.seed I can find that "If a hashable object is given, deterministic results are only assured when PYTHONHASHSEED is disabled." Both int and long are hashable. However, tests on the random module

[issue29022] Aritmetic error

2016-12-20 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, but it works as expected. Please see https://docs.python.org/2/tutorial/floatingpoint.html for more information. -- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> closed

[issue29022] Aritmetic error

2016-12-20 Thread Jacopo
New submission from Jacopo: $ python Python 2.7.3 (default, Jun 21 2016, 18:38:19) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 69.90 + 2.90 72.81 -- components: Interpreter Core messages: 283684 nosy: r00ta priority:

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-20 Thread Martin Panter
Martin Panter added the comment: I will try to come up with something in a few days -- ___ Python tracker ___

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-12-20 Thread STINNER Victor
STINNER Victor added the comment: Ignore my request about special direction values. It's not worth it to writ tests for that. PyUnicode_FindChar-v2.patch LGTM. -- ___ Python tracker

[issue28158] Implement LOAD_GLOBAL opcode cache

2016-12-20 Thread INADA Naoki
INADA Naoki added the comment: memo: http://bugs.python.org/issue26219 may be relating to this. -- ___ Python tracker ___

[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread bpoaugust
bpoaugust added the comment: According to RFC822, a quoted-string should only be wrapped in double-quotes. So I'm not sure why unquote treats <> as quotes. If it did not, then again this issue would not arise. However maybe utils.unquote is needed by other code that uses <>, so it cannot

[issue28988] Switch dict and set structures to PyVarObject

2016-12-20 Thread INADA Naoki
INADA Naoki added the comment: LGTM -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread bpoaugust
bpoaugust added the comment: It looks like a simpler alternative is to just change boundary = self.get_param('boundary', missing) to boundary = self.get_param('boundary', missing, unquote=False) and let collapse_rfc2231_value do the unquoting --

[issue28932] Fail compile Python 3.6.0rc1 on OpenBSD 6.0

2016-12-20 Thread STINNER Victor
STINNER Victor added the comment: Thanks Benjamin! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28999] Use Py_RETURN_NONE and like

2016-12-20 Thread INADA Naoki
INADA Naoki added the comment: LGTM -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29006] 2.7.13 _sqlite more prone to "database table is locked"

2016-12-20 Thread Armin Rigo
Armin Rigo added the comment: Tried that, but reverted because on Windows CheckTypeMapUsage() would fail with SQLITE_MISUSE ("ProgrammingError: database table is locked"). For now PyPy will not implement this 2.7.13 change. I really suspect you can get the same problems on CPython in some

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2016-12-20 Thread Ingo Ruhnke
New submission from Ingo Ruhnke: When a sqlite database contains invalid UTF-8 code in a TEXT column, Python can query that data normally when .text_factory is set appropriately. However when a custom function is created with .create_function() and applied to that column the custom function