[issue21748] glob.glob does not sort its results

2015-11-13 Thread Dave Jones
Dave Jones added the comment: As suggested, doc patch attached to new issue 25615. -- ___ Python tracker ___

[issue25558] Use static asserts in C code

2015-11-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2015-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps will open a separate issue for more compact non-decimal message ID. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25601] test_cpickle failure on the ware-gentoo-x86 buildbot

2015-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you reproduce the failure by running tests with the same seed on these machines? -- ___ Python tracker ___

[issue25498] Python 3.4.3 core dump with simple sample code

2015-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Great! The patch LGTM. I left only two minor suggestions on Rietveld. -- stage: patch review -> commit review ___ Python tracker

[issue25605] fcntl doc: document exceptions raised on error for ioctl() and flock()

2015-11-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset d3d974e92e6f by Victor Stinner in branch '2.7': Issue #25605: Document exceptions raised by fcntl.ioctl() and fcntl.flock() https://hg.python.org/cpython/rev/d3d974e92e6f New changeset f82cd1ed659e by Victor Stinner in branch '3.4': Issue #25605:

[issue25605] fcntl doc: document exceptions raised on error for ioctl() and flock()

2015-11-13 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the review. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue25498] Python 3.4.3 regression in ctypes.frombuffer()

2015-11-13 Thread STINNER Victor
STINNER Victor added the comment: The change 1da9630e9b7f was first published in Python 3.4.3. -- nosy: +haypo title: Python 3.4.3 core dump with simple sample code -> Python 3.4.3 regression in ctypes.frombuffer() ___ Python tracker

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: AFAIK the filesystem either counts directory references, in this case st_nlink >= 2, and st_nlink == 2 only for empty directory. The exception is a root directory, but it is not relevant. Or it doesn't count directory references, in this case st_nlink == 1.

[issue21748] glob.glob does not sort its results

2015-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is nothing special with glob(). By default the ls command outputs sorted list of files, but os.listdir() doesn't. Python is just lower-level language than Posix shell. You always can call sort() on result. It is easy to just add sort() after calling

[issue14061] Misc fixes and cleanups in archiving code in shutil and test_shutil

2015-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, I were going to left this for other issue, but now I agree that it is better to left zip in unarhiving registry unconditionally. In 2.7 the support of bztar is not conditional. -- ___ Python tracker

[issue25610] Add typing.Awaitable

2015-11-13 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-11-13 Thread Florin Papa
Florin Papa added the comment: Hi all, We have set up a Skylake buildbot, which could be used for MPX builds. The errors that appear when running regrtest are proxy related and we are looking into a solution for that. There is no problem for tests that do not access network resources. The

[issue25618] gdk attribute error

2015-11-13 Thread mrudula
New submission from mrudula: I am porting application from python 2 to python 3. Unable to import rati modules and local modules. gdk is not getting imported and unable to access many module. AttributeError: 'gi.repository.Gtk' object has no attribute 'gdk' -- components: 2to3 (2.x to

[issue25620] Bytes Issue

2015-11-13 Thread Marios Kourtesis
New submission from Marios Kourtesis: Hello, Executing the following code in a Python2 interpreter the result is True while running the same code in Python3 is False. I tested this in Python version 2.7.10 and 3.4.2. a = b'a' b = b'b' c = a+b c[1] == b'b' When I call type(c[1]) in Python2 I

[issue25618] gdk attribute error

2015-11-13 Thread R. David Murray
R. David Murray added the comment: Your report does not indicate a bug in python or its standard library, which is what this tracker is for. You are more likely to find help with your issues on the python-list mailing list. -- nosy: +r.david.murray resolution: -> third party stage:

[issue25619] Exception AttributeError: "'NoneType'.... thrown on exit

2015-11-13 Thread R. David Murray
R. David Murray added the comment: Yes, python2 shutdown has this problem: modules and their attributes are set to None during interpreter shutdown. Things are much better in python3. If you want to avoid the error messages, finalize the objects explicitly (making sure to break gc cycles)

[issue25594] enum instance attribute access possible

2015-11-13 Thread Ethan Furman
Ethan Furman added the comment: Thanks for tracking that down. After more research I'm inclined to leave the code as it is and revamp the docs to clarify that while it may work, the results may not be what you want: -- 8< --- class Color(Enum): red = 1 blue = 2

[issue25619] Exception AttributeError: "'NoneType'.... thrown on exit

2015-11-13 Thread R. David Murray
R. David Murray added the comment: Best practice, by the way, is to be explicit about the scope of any resource and clean it up before program end...this is often done by using the context manager protocol. -- ___ Python tracker

[issue25580] async and await missing from token list

2015-11-13 Thread SilentGhost
SilentGhost added the comment: Here is the updated wording. I'm not familiar with other such cases in the stdlib, if any one knows of another similar case, I'd be glad to correct the language to match previous usage. -- Added file: http://bugs.python.org/file41031/issue25580_2.diff

[issue25619] Exception AttributeError: "'NoneType'.... thrown on exit

2015-11-13 Thread terry
New submission from terry: The attached code generates this output: init called finished init init called finished init init called finished init initPorts done alldone destroying /sys/class/gpio/gpio16/ destroying /sys/class/gpio/gpio6/ Exception AttributeError: "'NoneType' object has no

[issue25620] Bytes Issue

2015-11-13 Thread SilentGhost
SilentGhost added the comment: Yes. It follows from definition of bytes in python3 https://docs.python.org/3/library/functions.html#bytes Some useful information is also available in 3.0 release notes: https://docs.python.org/3/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit

[issue25580] async and await missing from token list

2015-11-13 Thread Yury Selivanov
Yury Selivanov added the comment: > Are you suggesting that the note should state that these two are temporary? Yes, that would be great. > Or is this information available somewhere else, in What's new, for example? Not directly, I think. It was detailed to some extent in PEP 492. In

[issue25621] ast.literal_eval() fails on docstrings

2015-11-13 Thread R. David Murray
R. David Murray added the comment: Yes, literal_eval only evaluates a single literal, as is documented. -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue25622] Enable ctypes.test.test_values.Win_ValuesTestCase for non-Windows

2015-11-13 Thread Martin Panter
New submission from Martin Panter: In /Lib/ctypes/test/test_values.py, three out of the five test cases are only run on Windows. There is a comment saying “This test only works when python itself is a dll/shared library”, and the tests run fine on Linux. So I propose to remove the

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-13 Thread Martin Panter
Martin Panter added the comment: Seems to have broken the SSL module. Looks like you typoed “dps” as “dsp” in some conditional code. http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.4/builds/1326/steps/compile/logs/stdio building '_ssl' extension gcc -fno-strict-aliasing -g -O0

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: st_nlink is not related to the number of messages in a folder. It is a number of hard links. If the filesystem supports hard links counting for directories, every directory (except /) has at least two links: one from its parent directory, and one from

[issue13940] imaplib: Mailbox names are not quoted

2015-11-13 Thread Maciej Szulik
Maciej Szulik added the comment: >From imaplib.IMAP4 class description we're stating to quote parameters if >necessary. This patch adds that capability according to >https://tools.ietf.org/html/rfc3501#section-5.1 -- keywords: +patch Added file:

[issue25621] ast.literal_eval() fails on docstrings

2015-11-13 Thread Maxime Chambreuil
New submission from Maxime Chambreuil: ast.literal_eval fails when there is docstrings in the file. I used the file attached and this code in our CI server: def is_installable_module(path): """return False if the path doesn't contain an installable odoo module, and the full path to the

[issue25621] ast.literal_eval() fails on docstrings

2015-11-13 Thread Maxime Chambreuil
Maxime Chambreuil added the comment: If I remove the docstrings on the first line, ast.literal_eval() does not fail. -- ___ Python tracker ___

[issue24821] The optimization of string search can cause pessimization

2015-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch makes the degenerate case less hard while preserves the optimization for common case. $ ./python -m timeit -s 's = "АБВГД"*10**5' -- 's.find("є")' 1000 loops, best of 3: 330 usec per loop $ ./python -m timeit -s 's = "АБВГД"*10**5' --

[issue25580] async and await missing from token list

2015-11-13 Thread Martin Panter
Martin Panter added the comment: Will they really be removed? What are the compatibility implications? Maybe it would be better to alias them to NAME, or keep them as unused values. -- ___ Python tracker

[issue25498] Python 3.4.3 regression in ctypes.frombuffer()

2015-11-13 Thread Martin Panter
Martin Panter added the comment: Thanks to the various people that helped report and solve this. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue25074] Bind logger and waninigs modules for asyncio __del__ methods

2015-11-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: Yes, the approach use hackery shadows for binding global variables on shutdown stage. The same I've found in subprocess module: see https://github.com/python/cpython/blob/master/Lib/subprocess.py#L1544 The problem is: I want to inform users about unclosed

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-13 Thread Martin Panter
Martin Panter added the comment: New patch with simpler test case and revised NEWS entry -- Added file: http://bugs.python.org/file41036/makedirs-exist.2.patch ___ Python tracker

[issue25621] ast.literal_eval() fails on docstrings

2015-11-13 Thread SilentGhost
SilentGhost added the comment: It doesn't seem docstring-specific, docstring is a regular Python object and ast.literal_eval would fail if you have more than one literals of any kind. Put two integers in your file and the literal_eval will fail. -- nosy: +SilentGhost,

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-13 Thread Martin Panter
Changes by Martin Panter : -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue25616] Extract OrderedDict tests into separate file

2015-11-13 Thread Eric Snow
Eric Snow added the comment: FWIW, I totally support this. I originally had a patch up that did so but Raymond indicated that he'd rather not split the tests out though I made exactly the same arguments that you have. Perhaps he's changed his mind in the intervening years (or I

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-13 Thread Neil Schemenauer
Neil Schemenauer added the comment: So what happens for the filesystems that doesn't count '.' and '..'? It looks to me like if there are exactly two messages in a folder then the revised code will return [] (i.e. it will think the folder is empty). Probably we should revise the unit test

[issue25498] Python 3.4.3 regression in ctypes.frombuffer()

2015-11-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9b23f7a94ba9 by Martin Panter in branch '3.4': Issue #25498: Fix GC crash due to ctypes objects wrapping a memoryview https://hg.python.org/cpython/rev/9b23f7a94ba9 New changeset 7445de785670 by Martin Panter in branch '3.5': Issue #25498: Merge

[issue25580] async and await missing from token list

2015-11-13 Thread Martin Panter
Martin Panter added the comment: My only background here is via the tokenize module, which seems to currently behave as described in : async and await are either NAME tokens (like ordinary identifiers and other reserved keywords)

[issue25615] Document unsorted behaviour of glob.glob

2015-11-13 Thread Martin Panter
Martin Panter added the comment: Looks good to me. Also worth applying to earlier versions I think. -- nosy: +martin.panter stage: -> patch review versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker

[issue25590] tab-completition on instances repeatedly accesses attribute/descriptors values

2015-11-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 92f989bfeca2 by Martin Panter in branch '3.4': Issue #25590: Make rlcompleter only call getattr() once per attribute https://hg.python.org/cpython/rev/92f989bfeca2 New changeset 808279e14700 by Martin Panter in branch '3.5': Issue #25590: Merge

[issue25619] Exception AttributeError: "'NoneType'.... thrown on exit

2015-11-13 Thread terry
terry added the comment: My real application (not this example code that also 'breaks') is a battery monitor that starts at boot time and only exits when the battery is near death. So there is effectively a while(batlevelgood) loop that polls the battery level and doesn't exit until near

[issue25612] nested try..excepts don't work correctly for generators

2015-11-13 Thread A. Jesse Jiryu Davis
Changes by A. Jesse Jiryu Davis : -- nosy: +emptysquare ___ Python tracker ___ ___

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-11-13 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue25590] tab-completition on instances repeatedly accesses attribute/descriptors values

2015-11-13 Thread Martin Panter
Martin Panter added the comment: I also ported the getattr patch to the 2.7 branch. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 2.7 ___ Python tracker

[issue25620] Bytes Issue

2015-11-13 Thread Martin Panter
Martin Panter added the comment: More up-to-date information about the differences might be . If you want code that works in both versions, I find it simpler to use slicing: c[1:2] == b'b'. -- nosy:

[issue25590] tab-completition on instances repeatedly accesses attribute/descriptors values

2015-11-13 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for taking care of this! -- ___ Python tracker ___ ___

[issue25590] tab-completition on instances repeatedly accesses attribute/descriptors values

2015-11-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 16d83e11675f by Martin Panter in branch '2.7': Issue #25590: Make rlcompleter only call getattr() once per attribute https://hg.python.org/cpython/rev/16d83e11675f -- ___ Python tracker

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-11-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7bc8f56ef1f3 by Martin Panter in branch '2.7': Issue #25017: Document that htmllib is superseded by module HTMLParser https://hg.python.org/cpython/rev/7bc8f56ef1f3 -- nosy: +python-dev ___ Python

[issue25615] Document unsorted behaviour of glob.glob

2015-11-13 Thread Dave Jones
New submission from Dave Jones: As suggested in issue 21748, this is a minor documentation change to make explicitly clear that glob.glob returns unsorted results (on the basis that the existing specification references shell behaviour which is always sorted). -- assignee: docs@python

[issue21748] glob.glob does not sort its results

2015-11-13 Thread David Jones
David Jones added the comment: The original bug report did not mention ls (note serhiy.storchaka). It is a red herring. I accept that the Python community doesn't care to have glob.glob sorted. But then I think you should distance yourself from the shell in the documentation. It currently

[issue19023] ctypes docs: Unimplemented and undocumented features

2015-11-13 Thread Sye van der Veen
Sye van der Veen added the comment: Signed and confirmed. :-) On Thu, Nov 12, 2015 at 11:28 PM Martin Panter wrote: > > Martin Panter added the comment: > > Sye van der Veen: can you sign a contributor agreement < > https://www.python.org/psf/contrib/contrib-form/>? I

[issue25617] Installing local installation of Python

2015-11-13 Thread Koustav Pal
New submission from Koustav Pal: The inherent behaviour of python installations (local or global) is such that it expects to source system wide modules from the global python installation. There is no non hacky way to solve this problem. The idea of local installations is that they should be

[issue25616] Extract OrderedDict tests into separate file

2015-11-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: OrderedDict tests now are about 1/3 of test_collections, and I think their volume will grow. I suggest to extract these tests into separate file test_ordereddict. There are precedences: test_deque (deque also is implemented in C), and test_userdict,

[issue25462] Avoid repeated hash calculation in C implementation of OrderedDict

2015-11-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 52ff0c00a404 by Serhiy Storchaka in branch '3.5': Issue #25462: The hash of the key now is calculated only once in most https://hg.python.org/cpython/rev/52ff0c00a404 New changeset 828c9b920532 by Serhiy Storchaka in branch 'default': Issue #25462:

[issue25462] Avoid repeated hash calculation in C implementation of OrderedDict

2015-11-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: commit review -> resolved ___ Python tracker ___

[issue25462] Avoid repeated hash calculation in C implementation of OrderedDict

2015-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Raymond and Eric. -- ___ Python tracker ___ ___

[issue25462] Avoid repeated hash calculation in C implementation of OrderedDict

2015-11-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed status: open -> closed ___ Python tracker ___