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

Re: Crappy Python code of the day

2017-02-15 Thread Steven D'Aprano
On Thu, 16 Feb 2017 14:28:57 +1100, Chris Angelico wrote: > On Thu, Feb 16, 2017 at 1:25 PM, Steven D'Aprano > wrote: >> This has been in production for months, the writer of the code has left >> and the new maintainer has been asked to find out why it has been >> crashing

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

Re: Crappy Python code of the day

2017-02-15 Thread Chris Angelico
On Thu, Feb 16, 2017 at 1:25 PM, Steven D'Aprano wrote: > This has been in production for months, the writer of the code has left > and the new maintainer has been asked to find out why it has been > crashing with UnboundLocalError: > > > try: > result =

Re: Create ordering of points

2017-02-15 Thread Paul Rubin
spiess.benja...@googlemail.com writes: > Does somebody know a good technique for this problem? or can even give > a hint to a existing python procedure? You're asking about nearest neighbor search, which is the topic of a huge literature: https://en.wikipedia.org/wiki/Nearest_neighbor_search --

Re: WANT: bad code in python (for refactoring example)

2017-02-15 Thread Paul Rubin
Antoon Pardon writes: > On reason to use this is for some easy "logging" I think it's better to use the actual logging module. I generally start a new program with print statements but convert them to logging after there's enough code to want to be more organized

Crappy Python code of the day

2017-02-15 Thread Steven D'Aprano
This has been in production for months, the writer of the code has left and the new maintainer has been asked to find out why it has been crashing with UnboundLocalError: try: result = future.result() except requests.exceptions.ConnectionError as e: pass resp =

[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

Re: PTH files: Abs paths not working as expected. Symlinks needed?

2017-02-15 Thread Ned Batchelder
On Wednesday, February 15, 2017 at 8:34:45 AM UTC-5, Wolfgang Maier wrote: > On 15.02.2017 13:42, poseidon wrote: > > On 15/02/17 12:16, Wolfgang Maier wrote: > >> On 15.02.2017 10:33, poseidon wrote: > >>> In /usr/lib/python3.6/site-packages I wrote a file tau4.pth. It contains > >>> the line >

[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

Re: WANT: bad code in python (for refactoring example)

2017-02-15 Thread Erik
On 15/02/17 21:53, Erik wrote: process(data) Before I get jumped on by a pack of rabid wolves, I of course meant: process(d) E. -- https://mail.python.org/mailman/listinfo/python-list

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

Re: WANT: bad code in python (for refactoring example)

2017-02-15 Thread Erik
Hi, On 15/02/17 09:36, Makoto Kuwata wrote: I'm sorry that my explanation is not enough. I'm looking for bad python code, not refactoring examples. I think you need to explain what you mean by "bad". Do you mean something like: i = 0 data = ["bad", "example", "of", "python", "code"] while

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

Re: WANT: bad code in python (for refactoring example)

2017-02-15 Thread Dotan Cohen
I think that we can help each other! This is my own code, back when I was writing Python like PHP: https://github.com/dotancohen/burton It is badly in need of a Pythonic refactor! Have at it, and I'll be happy to accept any pull requests. On Wed, Feb 15, 2017 at 12:44 AM, Makoto Kuwata

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

Re: subprocess problem

2017-02-15 Thread Andreas Paeffgen
On 2017-02-11 02:23:12 +, Cameron Simpson said: def your_function(...): with open('/path/to/your/logfile.txt', 'a') as logfp: print("PATH=".os.environ['PATH'], file=logfp) p=Popen(...) p.communicate(...) print("p.returncode=%r" % (p.returncode)) and

[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

Re: WANT: bad code in python (for refactoring example)

2017-02-15 Thread jladasky
On Wednesday, February 15, 2017 at 2:52:55 AM UTC-8, Antoon Pardon wrote: > Op 15-02-17 om 07:28 schreef Steven D'Aprano: > > E.g. http://code.activestate.com/recipes/580750 > > > > does nothing more that define > > > > echo = sys.stdout.write > > > > Why not use sys.stdout.write directly? Or

[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

Re: WANT: bad code in python (for refactoring example)

2017-02-15 Thread Chris Angelico
On Thu, Feb 16, 2017 at 12:37 AM, Antoon Pardon wrote: >> But a better way, in my opinion, is to >> use your editor to search for: >> >> print( >> >> and replace with: >> >> #print( > > You don't seem to understand, I don't want to disable all printing, only the >

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

Re: PTH files: Abs paths not working as expected. Symlinks needed?

2017-02-15 Thread gst
Le mercredi 15 février 2017 10:34:42 UTC-5, Steve D'Aprano a écrit : > On Wed, 15 Feb 2017 11:42 pm, poseidon wrote: > > > Yes, removed it (symlink still there) and it still works. But then, what > > are pth files for? > > > Good question. I don't actually know anyone that uses pth files, so

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

Re: Create ordering of points

2017-02-15 Thread Pavol Lisy
On 2/15/17, spiess.benjamin--- via Python-list wrote: > Hello !:) > I've got a problem which I would really like to solve. > I got a cloud of points (in the simplest example its a 2-dimensional cloud > of points). > First, I want to set one of the points as the initial (or

[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

Re: Create ordering of points

2017-02-15 Thread Ben Bacarisse
spiess.benja...@googlemail.com writes: > I've got a problem which I would really like to solve. > I got a cloud of points (in the simplest example its a 2-dimensional > cloud of points). > First, I want to set one of the points as the initial (or middle) > point. Starting from there, the next

[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

Re: PTH files: Abs paths not working as expected. Symlinks needed?

2017-02-15 Thread Steve D'Aprano
On Wed, 15 Feb 2017 11:42 pm, poseidon wrote: > Yes, removed it (symlink still there) and it still works. But then, what > are pth files for? Good question. I don't actually know anyone that uses pth files, so perhaps they're unnecessary. But the principle behind them is that they can be used

Re: PTH files: Abs paths not working as expected. Symlinks needed?

2017-02-15 Thread poseidon
On 15/02/17 14:34, Wolfgang Maier wrote: On 15.02.2017 13:42, poseidon wrote: On 15/02/17 12:16, Wolfgang Maier wrote: On 15.02.2017 10:33, poseidon wrote: In /usr/lib/python3.6/site-packages I wrote a file tau4.pth. It contains the line /home/poseidon/tau4/swr/py3/src In

[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} '

Re: Create ordering of points

2017-02-15 Thread duncan smith
On 15/02/17 13:27, spiess.benja...@googlemail.com wrote: > Hello !:) > I've got a problem which I would really like to solve. > I got a cloud of points (in the simplest example its a 2-dimensional cloud of > points). > First, I want to set one of the points as the initial (or middle) point. >

[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

  1   2   >