[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2017-02-15 Thread Zero Piraeus
Changes by Zero Piraeus : -- nosy: +zero.piraeus ___ Python tracker ___ ___ Python-bugs-list

[issue29562] test_getgroups of test_posix fails (on OS X 10.10)

2017-02-15 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: The Mac OS 10.10 man page for initgroups(3) says: "Processes should not use the group ID numbers from getgroups(2) to determine a user's group membership. The list obtained from getgroups() may only be a partial list of a user's group membership. Membership

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Jerry Dimitrov
Jerry Dimitrov added the comment: Thanks for the documentation reference. Can we at least add this link reference [1] as a note or something like that into those documentation sections: [2] https://docs.python.org/2/library/stdtypes.html#string-formatting and [3]

[issue29562] test_getgroups of test_posix fails (on OS X 10.10)

2017-02-15 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: I guess I didn't state the things I find odd about what the new test_getgroups results. 1. `os.getgroups()` used to return group (395, 'com.apple.access_ftp'), but no longer does. I don't see a reason why. 2. `os.getgroups()` is returning 2 fewer group id's

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2017-02-15 Thread Ethan Furman
Ethan Furman added the comment: To get the above code snippet to fail properly: - remove the @classattr line - prepend from enum import Enum, Flag, IntFlag, auto -- ___ Python tracker

[issue29347] Python could crash while creating weakref for a given object

2017-02-15 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +90 ___ Python tracker ___ ___ Python-bugs-list

[issue29470] ssl: SNI callbacks should not modify context objects

2017-02-15 Thread David Ford (FirefighterBlu3)
David Ford (FirefighterBlu3) added the comment: yes, after i've modified my tool and ensured i know the correct way of doing it. one of the problems i'm dealing with is not carting around a global variable holding prebuilt contexts. i find it unappealing. --

[issue29347] Python could crash while creating weakref for a given object

2017-02-15 Thread Xiang Zhang
Xiang Zhang added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28806] Improve the netrc library

2017-02-15 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +89 ___ Python tracker ___ ___ Python-bugs-list

[issue29562] test_getgroups of test_posix fails (on OS X 10.10)

2017-02-15 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: Some diagnosis. Group `com.apple.sharepoint.group.1` appears to be related to a certain kind of file sharing, but I don't have hard evidence. Its only member was a test user I created as part of screen sharing with Apple Support. ``` % dscacheutil -q group

[issue22807] uuid.uuid1() should use uuid_generate_time_safe() if available

2017-02-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- assignee: -> barry ___ Python tracker ___ ___

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2017-02-15 Thread Ethan Furman
New submission from Ethan Furman: Consider: class AllEnum(Enum): @classattr def ALL(cls): members = list(cls) all_value = None if members: all_value = members[0] for member in members[1:]: all_value |= member

[issue29576] Improve some deprecations in the importlib

2017-02-15 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29576] Improve some deprecations in the importlib

2017-02-15 Thread Brett Cannon
Brett Cannon added the comment: New changeset 1d4601c2c6952d03fc4dda2b041be9aa8713c0bc by Brett Cannon in branch 'master': bpo-29576: add explicit deprecation for importlib.abc.find_loader() and find_module() (GH-32)

[issue29576] Improve some deprecations in the importlib

2017-02-15 Thread Matthias Bussonnier
New submission from Matthias Bussonnier: A couple of function in importlib are marked as deprecated in the documentation but do not raise deprecation warnings. As the same time it would be great to improve some deprecation warnings and docstring to include the version since when this is

[issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs

2017-02-15 Thread INADA Naoki
INADA Naoki added the comment: New changeset 72dccde884d89586b0cafd990675b7e21720a81f by GitHub in branch 'master': bpo-29548: Fix some inefficient call API usage (GH-97) https://github.com/python/cpython/commit/72dccde884d89586b0cafd990675b7e21720a81f --

[issue29470] ssl: SNI callbacks should not modify context objects

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: David Ford: would you mind to directly propose a doc patch? -- ___ Python tracker ___

[issue29533] urllib2 works slowly with proxy on windows

2017-02-15 Thread Julia Dolgova
Julia Dolgova added the comment: Surely noone is concerned that programms written on python could work better when addressing to "python.org"? -- ___ Python tracker

[issue29521] Minor warning messages when compiling documentation

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset b300c660d34d2027d443098ea605a8e0eb51d383 by GitHub in branch '3.6': Backport36 doc fixes: PR#68 and PR#124 (#125) https://github.com/python/cpython/commit/b300c660d34d2027d443098ea605a8e0eb51d383 --

[issue29563] Update Devguide about building documentation.

2017-02-15 Thread Brett Cannon
Brett Cannon added the comment: Thanks for moving the issue, Jim! -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue29566] binhex() creates files with mixed line endings

2017-02-15 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue29324] test_aead_aes_gcm fails on Kernel 4.9

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: @matejcik: would you mind to create a pull request for your patch? -- ___ Python tracker ___

[issue29470] ssl: SNI callbacks should not modify context objects

2017-02-15 Thread David Ford (FirefighterBlu3)
David Ford (FirefighterBlu3) added the comment: @Christian, that was years ago and there were few examples available of people that had tried to make an SNI capable server. in several cases, people were monkey patching to make a callback. .set_servername_callback() didn't formally show up in

[issue29556] Remove unused #include

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 72e81d00eee685cfe33aaddf2aa9feef2d07591f by Victor Stinner in branch 'master': bpo-29556: Remove unused #include (#98) https://github.com/python/cpython/commit/72e81d00eee685cfe33aaddf2aa9feef2d07591f --

[issue29521] Minor warning messages when compiling documentation

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 02e3357e089f37c23d0f3d1ebee9aa3d7a1492a9 by Victor Stinner in branch '3.6': bpo-29521 update Misc/ACKS (#110) https://github.com/python/cpython/commit/02e3357e089f37c23d0f3d1ebee9aa3d7a1492a9 -- ___

[issue29521] Minor warning messages when compiling documentation

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 85064db281545d587992df61154e76439138319f by Victor Stinner in branch 'master': bpo-29521 update Misc/ACKS (#106) https://github.com/python/cpython/commit/85064db281545d587992df61154e76439138319f --

[issue29521] Minor warning messages when compiling documentation

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset de553b8210882823d3df3f1ef6882eba3f8accf3 by Victor Stinner in branch '3.5': bpo-29521 update Misc/ACKS (#111) https://github.com/python/cpython/commit/de553b8210882823d3df3f1ef6882eba3f8accf3 -- ___

[issue29561] Interactive mode gives sys.ps2 not sys.ps1 after comment-only line

2017-02-15 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: Thank you for the analysis, Eryk Sun. You wrote, "the interpreter is correctly conveying that it's still tokenizing the input; it hasn't compiled or executed any code." I think one important question for this issue is, what meaning should the choice of prompt

[issue29531] Update Doc/README.txt to README.rst

2017-02-15 Thread Roger Sachan
Changes by Roger Sachan : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29575] doc 17.2.1: basic Pool example is too basic

2017-02-15 Thread Joachim
New submission from Joachim: The »basic example of data parallelism using Pool« is too basic. It demonstrates the syntax, but otherwise makes no sense, and therefore is potentially confusing. It is blatant nonsense to run 5 processes when there are only 3 data to be treated. Let me suggest

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

2017-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good point. The test used locale.getlocale() and it returned returned ('en_IN', 'ISO8859-1'). Following patch makes the test using locale.getpreferredencoding(False), the same encoding as was reported at the header of test report. -- keywords:

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

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: > Following patch ... Seriously? Not a GitHub pull request? ;-) (old habit?) -- ___ Python tracker ___

[issue29574] python-3.6.0.tgz permissions borked

2017-02-15 Thread Dave Anderson
Dave Anderson added the comment: Sorry, should have shown sudo ls -l output for 3.6: [vagrant@developer tmp]$ sudo ls -l Python-3.6.0 total 1016 -rw-r--r-- 1 caturra games 10910 Dec 22 18:21 aclocal.m4 -rwxr-xr-x 1 caturra games 42856 Dec 22 18:21 config.guess -rwxr-xr-x 1 caturra games

[issue29574] python-3.6.0.tgz permissions borked

2017-02-15 Thread Dave Anderson
New submission from Dave Anderson: Downloaded https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz Extracted on CentOS6 with sudo tar -xf Python-3.6.0.tgz Result: [vagrant@developer tmp]$ ls -l Python-3.6.0 ls: cannot access Python-3.6.0/Tools: Permission denied ls: cannot access

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch stage: -> patch review versions: -Python 2.7, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file46640/format-percent.patch ___ Python tracker

[issue27494] 2to3 parser failure caused by a comma after a generator expression

2017-02-15 Thread Jakub Stasiak
Changes by Jakub Stasiak : -- versions: +Python 3.6, Python 3.7 ___ Python tracker ___

[issue29563] Update Devguide about building documentation.

2017-02-15 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: Per request from Brett Cannon, I've moved this issue to https://github.com/python/devguide/issues/116 . Please continue the discussion there. -- ___ Python tracker

[issue27494] 2to3 parser failure caused by a comma after a generator expression

2017-02-15 Thread Jakub Stasiak
Changes by Jakub Stasiak : -- pull_requests: +87 ___ Python tracker ___ ___

[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-02-15 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted

2017-02-15 Thread Richard Xia
New submission from Richard Xia: Here is a very short program to demonstrate what I'm seeing: >>> import tempfile >>> import os >>> with tempfile.NamedTemporaryFile(delete=True) as fp: ... print(fp.name) ... os.system('rm {}'.format(fp.name)) /tmp/tmpomw0udc6 0 Traceback (most recent

[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-02-15 Thread DAVID ALEJANDRO Pineda
DAVID ALEJANDRO Pineda added the comment: Now I try again with different ways to run a method with args, without args works fine to insert in the executor. I find there are big differences with file functools betwen versions 3.5.1 to 3.6.0. Here a more simple example for test the functools:

[issue28334] netrc does not work if $HOME is not set

2017-02-15 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +86 ___ Python tracker ___ ___

[issue29481] 3.6.0 doc describes 3.6.1 feature - typing.Deque

2017-02-15 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Merged and backported to 3.5 and 3.6. Thanks all :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29481] 3.6.0 doc describes 3.6.1 feature - typing.Deque

2017-02-15 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset bb53a27a5d56a4f33c3fc8eebb486b34808c92b7 by GitHub in branch '3.5': [cherry-pick for 3.5] bpo-29481: add versionadded 3.5.4 to typing.Deque docs (#109) https://github.com/python/cpython/commit/bb53a27a5d56a4f33c3fc8eebb486b34808c92b7

[issue29481] 3.6.0 doc describes 3.6.1 feature - typing.Deque

2017-02-15 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 7224a049b88ed37c510861528147e0db54911bb7 by GitHub in branch '3.6': bpo-29481: add versionadded 3.6.1 to typing.Deque docs (#108) https://github.com/python/cpython/commit/7224a049b88ed37c510861528147e0db54911bb7 --

[issue29481] 3.6.0 doc describes 3.6.1 feature - typing.Deque

2017-02-15 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 36da1c3589e1bc4246cccf6bd0094a110416a43a by GitHub in branch 'master': bpo-29481: add versionadded 3.6.1 to typing.Deque docs (#107) https://github.com/python/cpython/commit/36da1c3589e1bc4246cccf6bd0094a110416a43a --

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

2017-02-15 Thread Matthew Barnett
Matthew Barnett added the comment: The report says "== encodings: locale=UTF-8, FS=utf-8". It says that "test_locale_caching" was skipped, but also that "test_locale_flag" failed. -- ___ Python tracker

[issue22273] abort when passing certain structs by value using ctypes

2017-02-15 Thread Eryk Sun
Eryk Sun added the comment: ctypes defines arrays as a pointer FFI type because they degenerate as pointers in C calls. But it's generally wrong to set a pointer FFI type for an array in the `elements` of a struct's FFI type. An integer array in a struct that's 16 bytes or less should be

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

2017-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Locale encoding is ISO8859-1. This test is skipped on non 8-bit locale. This is a problem with tests, not with the re module. I don't have a solution. -- components: +Tests versions: +Python 3.5, Python 3.6 ___

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

2017-02-15 Thread Matthew Barnett
Matthew Barnett added the comment: I'm just wondering whether the problem is just due to the locale's encoding being UTF-8. The locale support in re really only works with encodings that use 1 byte/character. -- ___ Python tracker

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-15 Thread Eryk Sun
Eryk Sun added the comment: Our support of passing structs and unions by value is really bad. Passing this particular struct by value is also broken on 64-bit Unix, but instead because it's small. It crashes Python due to an abort(). See issue 22273. -- nosy: +eryksun priority: normal

[issue22273] abort when passing certain structs by value using ctypes

2017-02-15 Thread Eryk Sun
Changes by Eryk Sun : -- stage: -> needs patch ___ Python tracker ___ ___

[issue22273] abort when passing certain structs by value using ctypes

2017-02-15 Thread Eryk Sun
Changes by Eryk Sun : -- priority: normal -> high versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue28837] 2to3 does not wrap zip correctly

2017-02-15 Thread Stuart Berg
Changes by Stuart Berg : -- pull_requests: +85 ___ Python tracker ___ ___

[issue29572] Upgrade installers to OpenSSL 1.0.2k

2017-02-15 Thread Zachary Ware
New submission from Zachary Ware: It's that time once again (as of a few weeks ago). This one doesn't seem to be a high severity update, though. Also, it seems that 1.1.0e is due tomorrow; I'm not sure if that means 1.0.2l will also come out tomorrow, so we'll want to hold off until at

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

2017-02-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka type: -> behavior ___ Python tracker

[issue29536] test_hashlib failure on Ubuntu 16.04

2017-02-15 Thread Christian Heimes
Christian Heimes added the comment: Yeah, somehow you ended up with a broken vector file. Your file contains HTTP with JavaScript redirect. Did you attempt to download test data from a hotel or airport wifi? You can safely remove Lib/test/data and start over. -- nosy:

[issue29470] ssl: SNI callbacks should not modify context objects

2017-02-15 Thread Christian Heimes
Christian Heimes added the comment: It's not a bug in Python's ssl module. If I understand David's approach correctly, then he is using the SNI callback the wrong way. By using it the wrong way he has discovered a threading bug in OpenSSL. There is some kind of race condition going on in

[issue29536] test_hashlib failure on Ubuntu 16.04

2017-02-15 Thread Sachin Kumar
Sachin Kumar added the comment: @Xiang I tried that command earlier but that returned around 8 failed test cases. I think it is due to a fault with my connection. Although I can replicate this error every time. I've tried over 5 times already. @Martin I compared the data. My file has been

[issue29563] Update Devguide about building documentation.

2017-02-15 Thread Brett Cannon
Brett Cannon added the comment: Would you mind moving this issue over to https://github.com/python/devguide/issues where we track devguide issues, Jim? -- nosy: +brett.cannon ___ Python tracker

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

2017-02-15 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Xiang Zhang
Xiang Zhang added the comment: Or even not fix it in develop branch. -- ___ Python tracker ___ ___

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Xiang Zhang
Xiang Zhang added the comment: The documentation[1] explicitly states using % to do string format could be error-prone and recommends using str.format(). So +1 on no change in maintenance branches. [1] https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting --

[issue29470] ssl: SNI callbacks should not modify context objects

2017-02-15 Thread STINNER Victor
Changes by STINNER Victor : -- title: [python] Error in `/usr/bin/python': free(): invalid size: 0x7f628400d0e0; ssl SNI callbacks should not modify context objects -> ssl: SNI callbacks should not modify context objects

[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: To be clear: warnings should only suggest to enable tracemalloc if tracemalloc.is_tracing() is False. It is possible to tracemalloc is tracing, but failed (for different reasons) to track where the memory of the resource was allocated. -- title:

[issue29564] ResourceWarning tracking is attaching incorrect file:position to unclosed socket

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: David Ford (FirefighterBlu3) added the comment: > @stinner your traceback suggestion was highly useful and much appreciated. i > have spent several dozen hours researching ResourceWarnings in the past and > tearing my hair out because the emitted warning was

[issue29557] binhex documentation claims unknown bug

2017-02-15 Thread Georg Brandl
Georg Brandl added the comment: I don't remember anything specific about this, sorry. -- ___ Python tracker ___

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

2017-02-15 Thread Jaysinh shukla
New submission from Jaysinh shukla: Description: A test case is failing while running `./python -m test -v test_re`. Traceback: $>./python -m test -v test_re == CPython 3.7.0a0 (default, Feb 15 2017, 22:28:32) [GCC 5.4.0 20160609] == Linux-4.4.0-62-generic-x86_64-with-debian-stretch-sid

[issue29470] [python] Error in `/usr/bin/python': free(): invalid size: 0x00007f628400d0e0; ssl SNI callbacks should not modify context objects

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: > Do you modify the SSLContext object in your SNI callback? That's the wrong > way to do it. You have to create a SSLContext object for each certificate/key > pair at startup and then change the socket's context attribute. Would it be possible to prevent

[issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: > # builtin min and max doesn't support FASTCALL > (...): 1.16x slower (+16%) Hum, the slowdown is not negligible, even if functools.reduce() is rarely used. Do you think that it would be insane to have two code paths instead? * New FASTCALL path if func

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it is what I want. Current behavior is just an artefact of the implementation. I have doubts that any other implementation of printf-like formatting has such behavior. Bytes formatting starves from the same issue. >>> b'% %' % {} b'%' But there are

[issue28814] Deprecation notice on inspect.getargvalues() is incorrect

2017-02-15 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- nosy: +mbussonn ___ Python tracker ___ ___

[issue29570] Windows Buildbot 2.7 is broken

2017-02-15 Thread STINNER Victor
New submission from STINNER Victor: Example of failure: http://buildbot.python.org/all/builders/AMD64%20Windows8%202.7/builds/67/steps/test/logs/stdio FAIL: test_incrementaldecoder (test.test_codecencodings_iso2022.Test_ISO2022_KR) => failure with newline, maybe caused by the migration to

[issue28814] Deprecation notice on inspect.getargvalues() is incorrect

2017-02-15 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +83 ___ Python tracker ___

[issue20438] inspect: Deprecate getfullargspec?

2017-02-15 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +84 ___ Python tracker ___

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread R. David Murray
R. David Murray added the comment: I don't think we should change the behavior in maintenance branches. I take it what you want to do is make it so that if the parser ends up thinking it is seeing '%%' but there is stuff between the two %s, that's an error? -- nosy: +r.david.murray

[issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs

2017-02-15 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +82 ___ Python tracker ___ ___

[issue29557] binhex documentation claims unknown bug

2017-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: File flags are saved in binhex format, therefore it is possible to distinguish text files from binary files. -- ___ Python tracker

[issue29557] binhex documentation claims unknown bug

2017-02-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: I think the comment about needing translation on non-mac systems is incorrect. Binhex is (or rather was) a textual encoding for binary files used on classic MacOS. The encoded file is more likely to be binary data than a text file and replacing b'\r' by the

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In this example characters between percents are parsed as for any conversion specifier but ignored and '%(a) %' is formatted to '%'. '(a)' specifies a mapping key, ' ' is a conversion flag, the second '%' is a conversion type. >>> '%(a) d' % {'a': 123} '

[issue29569] threading.Timer class: Continue periodical execution till action returns True

2017-02-15 Thread slytomcat
New submission from slytomcat: I think that functionality of threading.Timer class can be easily extended to generate the sequence of runs with specified period. The idea comes from the GLib.timeout_add function. Run method of threading.Timer should look like: def run(self):

[issue29569] threading.Timer class: Continue periodical execution till action returns True

2017-02-15 Thread slytomcat
Changes by slytomcat : -- pull_requests: +81 ___ Python tracker ___ ___ Python-bugs-list

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Jerry Dimitrov
New submission from Jerry Dimitrov: Hello everyone, This is my first bug report to the python project, so please excuse me if the metadata for this particular issue is not 100% accurate. Today I noticed (with the help from couple of people in IRC) a strange behavior in the python string

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-15 Thread Andrew Nester
Andrew Nester added the comment: Ive just added alternative PR that drops inner brackets. So we've got options to choose! -- ___ Python tracker ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-15 Thread Andrew Nester
Changes by Andrew Nester : -- pull_requests: +80 ___ Python tracker ___ ___

[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-15 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Aha the fix is simple => issue29567 -- ___ Python tracker ___ ___

[issue29567] Allow argparse to be used in setup.py

2017-02-15 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : -- pull_requests: +78 ___ Python tracker ___ ___

[issue29567] Allow argparse to be used in setup.py

2017-02-15 Thread Chi Hsuan Yen
New submission from Chi Hsuan Yen: When proposing a fix for issue29442, I got another issue - argparse can't be used in setup.py for native (non-cross) builds because argparse imports gettext and gettext imports struct. I'll propose a fix for that. -- components: Build messages:

[issue23109] French quotes in the documentation are often ungrammatical

2017-02-15 Thread A.M. Kuchling
A.M. Kuchling added the comment: It looks like there's nothing left to do for this ticket. -- nosy: +akuchling resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-15 Thread Brian Curtin
Brian Curtin added the comment: Dropping the inner brackets sounds like a better move to me. -- nosy: +bethard, brian.curtin ___ Python tracker ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-15 Thread Christoph Stahl
Christoph Stahl added the comment: Hi, I thought a bit about the problem and came up with the following: The | in the usage is de facto an XOR operator. Exactly one of the options can be used. The XOR operator has the associative property, meaning: (A XOR B) XOR C = A XOR (B XOR C) So

[issue29564] ResourceWarning tracking is attaching incorrect file:position to unclosed socket

2017-02-15 Thread Martin Panter
Martin Panter added the comment: The file position is often useful when the cleanup is deterministic. Example: def f1(): file1 = open("/dev/null") def f2(): file2 = open("/dev/null") del file2 # ResourceWarning f1() # ResourceWarning at function exit f2() In the these cases,

[issue29566] binhex() creates files with mixed line endings

2017-02-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: binhex.binhex() creates files with mixed line endings in Python 3. The header line '(This file must be converted with BinHex 4.0)' is separated from the data by LFs, but the data is split for lines by CRs. >>> import binhex >>> with open('inp', 'wb') as

[issue29470] [python] Error in `/usr/bin/python': free(): invalid size: 0x00007f628400d0e0; ssl SNI callbacks should not modify context objects

2017-02-15 Thread David Ford (FirefighterBlu3)
Changes by David Ford (FirefighterBlu3) : -- title: [python] Error in `/usr/bin/python': free(): invalid size: 0x7f628400d0e0 -> [python] Error in `/usr/bin/python': free(): invalid size: 0x7f628400d0e0; ssl SNI callbacks should not modify context

[issue29470] [python] Error in `/usr/bin/python': free(): invalid size: 0x00007f628400d0e0

2017-02-15 Thread David Ford (FirefighterBlu3)
David Ford (FirefighterBlu3) added the comment: yes, i create a context and then when a request comes in, i load the appropriate key. this is how most [all?] SNI capable python server examples show how to do it, or did, at the time I wrote this module a few years ago. from that time, ~py 3.2

[issue29558] Provide run_until_complete inside loop

2017-02-15 Thread Javier Domingo
Javier Domingo added the comment: Yes, indeed it is. Would it be possible to reconsider this functionality? It plays a key role when trying to rewrite full applications to async. Rewriting the full stack of libraries at once is impossible, but the patching can easily be done in many cases.

[issue29564] ResourceWarning tracking is attaching incorrect file:position to unclosed socket

2017-02-15 Thread David Ford (FirefighterBlu3)
David Ford (FirefighterBlu3) added the comment: @stinner your traceback suggestion was highly useful and much appreciated. i have spent several dozen hours researching ResourceWarnings in the past and tearing my hair out because the emitted warning was very much useless. i couldn't even make

[issue29470] [python] Error in `/usr/bin/python': free(): invalid size: 0x00007f628400d0e0

2017-02-15 Thread Christian Heimes
Christian Heimes added the comment: Do you modify the SSLContext object in your SNI callback? That's the wrong way to do it. You have to create a SSLContext object for each certificate/key pair at startup and then change the socket's context attribute. --

[issue29564] ResourceWarning tracking is attaching incorrect file:position to unclosed socket

2017-02-15 Thread David Ford (FirefighterBlu3)
David Ford (FirefighterBlu3) added the comment: i quite understand the way objects can be associated with reference counts by using a, a.b, c=a.b, d=a, etc etc, and how they increase/decrease and when the GC can prune the objects. yes, the root issue is the unclosed web socket and i've

[issue29564] ResourceWarning tracking is attaching incorrect file:position to unclosed socket

2017-02-15 Thread STINNER Victor
STINNER Victor added the comment: FYI the implementation of the ResourceWarning traceback was not as simple as I expected :-) I just wrote a blog post about, search for "ResourceWarning warnings now come with a traceback" in: https://haypo.github.io/contrib-cpython-2016q1.html --

  1   2   >