[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-09 Thread Łukasz Langa
Łukasz Langa added the comment: I have a pretty minimal repro. You'll have to download both `mod1.py` and `mod2.py` and execute `python3.6 mod1.py`. You'll see: Exception ignored in: .remove at 0x7fcb56b09400> Traceback (most recent call last): File

[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-09 Thread Łukasz Langa
Changes by Łukasz Langa : Added file: http://bugs.python.org/file46618/mod2.py ___ Python tracker ___

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-09 Thread Jim DeLaHunt
New submission from Jim DeLaHunt: When I build the documentation on the current CPython code, there is a deprecation warning on the console. = (beginning of output) % make html sphinx-build -b html -d build/doctrees -D latex_elements.papersize= . build/html Running Sphinx v1.5.2

[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2017-02-09 Thread Eryk Sun
Eryk Sun added the comment: Unless someone has a better (more automated) way to handle the Winsock IPPROTO enum, I suggest we either special-case the individual tests for MS_WINDOWS when we know that Winsock defines the value; or just define macros for the values in the enum: #ifdef

Re: gmail api

2017-02-09 Thread Kelvid Pang
On Tuesday, 7 February 2017 14:22:32 UTC+8, Kelvid Pang wrote: > hi, > > I am trying to gmail api with reference to this URL: > https://developers.google.com/gmail/api/quickstart/python > > But I couldn't find the 'gmail-python-quickstart.json' file. Any one can > help? thanks. First of

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: > I'm not sure about the change on PyObject_CallMethod*() only for empty format > string. There are many place using _PyObject_CallMethodId() to call method without args. Maybe, we should recommend to use _PyObject_CallMethodIdObjArgs() when no arguments, and

[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-09 Thread Łukasz Langa
New submission from Łukasz Langa: Antoine, #28427 introduces a regression. When used with multiprocessing, the WeakValueDictionary in `multiprocessing.util._afterfork_registry` causes the `remove()` to be invoked during `atexit` and then `sys.meta_path` is None, lots of things is None,

[issue29518] 'for' loop not automatically breaking (index error on line of loop header)

2017-02-09 Thread Josh Rosenberg
Josh Rosenberg added the comment: You're going to need to actually provide the source file here. This makes no sense as is. -- nosy: +josh.r ___ Python tracker

[issue29518] 'for' loop not automatically breaking (index error on line of loop header)

2017-02-09 Thread Justin McNiel
New submission from Justin McNiel: All for loops are refusing to break (Python 2.7.13) on win32 - only on execution of '.py' file an example would be:" for x in range(5): #Line 1 of main.py print x#Line 2 of main.py " and the resulting error would be:" File

Re: int vs. float

2017-02-09 Thread Chris Angelico
On Fri, Feb 10, 2017 at 1:33 PM, wrote: > I understand that because I am starting out by assigning my > number_purchases_str to be an int, when the user enters a float that is a > conflict and will crash. > > My professor apparently believes there is a way to accomplish

int vs. float

2017-02-09 Thread adam14711993
Hello, My computer programming professor challenged me to figure out a way to manipulate my program to display one error message if the user input is a zero or a negative number, and a separate error message if the user input is a decimal number. My program starts out: number_purchases_str =

Re: subprocess problem

2017-02-09 Thread Cameron Simpson
On 10Feb2017 00:03, eryk sun wrote: On Thu, Feb 9, 2017 at 10:50 PM, Cameron Simpson wrote: This is why I suggested the check_returncode() method, which examines the error code. You must be thinking of the returncode attribute, which isn't a method.

[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2017-02-09 Thread Eryk Sun
Eryk Sun added the comment: The macro is defined but not defined. If I insert the following line before the #ifdef check: #define IPPROTO_IPV6 IPPROTO_IPV6 then the constant gets added: >>> import _socket >>> _socket.IPPROTO_IPV6 41 The same applies to IPPROTO_IPV4 and

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

2017-02-09 Thread R. David Murray
Changes by R. David Murray : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

Re: subprocess problem

2017-02-09 Thread eryk sun
On Fri, Feb 10, 2017 at 12:05 AM, Wildman via Python-list wrote: > > Corrected code: > > def which(target) > for p in pathlist: > fullpath = p + "/" + target > if os.path.isfile(fullpath) and os.access(fullpath, os.X_OK): > return fullpath,

Re: subprocess problem

2017-02-09 Thread MRAB
On 2017-02-10 00:05, Wildman via Python-list wrote: On Fri, 10 Feb 2017 09:53:32 +1100, Cameron Simpson wrote: On 09Feb2017 11:59, Wildman wrote: Here is a method I frequently use to replace the which command. (air code) import os pathlist = os.environ["PATH"].split(":")

Re: subprocess problem

2017-02-09 Thread Wildman via Python-list
On Fri, 10 Feb 2017 09:53:32 +1100, Cameron Simpson wrote: > On 09Feb2017 11:59, Wildman wrote: >>Here is a method I frequently use to replace the which >>command. (air code) >> >>import os >>pathlist = os.environ["PATH"].split(":") >> >>def which(target) >>for p in

Re: subprocess problem

2017-02-09 Thread eryk sun
On Thu, Feb 9, 2017 at 10:50 PM, Cameron Simpson wrote: > This is why I suggested the check_returncode() method, which examines the > error code. You must be thinking of the returncode attribute, which isn't a method. check_returncode() is a method of the CompletedProcess object

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset b1dc6b6d5fa20f63f9651df2e7986a066c88ff7d by Victor Stinner in branch 'master': Issue #29507: Fix _PyObject_CallFunctionVa() https://github.com/python/cpython/commit/b1dc6b6d5fa20f63f9651df2e7986a066c88ff7d --

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: callmethod2.patch: I like that change on object_vacall(), I'm not sure about the change on PyObject_CallMethod*() only for empty format string. I suggest to split your patch into two parts, and first focus on object_vacall(). Do you have a benchmark for this

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset e5cd74868dfc by Victor Stinner in branch 'default': Issue #29507: Fix _PyObject_CallFunctionVa() https://hg.python.org/cpython/rev/e5cd74868dfc -- ___ Python tracker

The Dominion

2017-02-09 Thread Terry Reedy
A video ad for Anaconda from its maker (satirizing a well know data-related film). I found it amusing, in a good way. https://www.youtube.com/watch?v=0XDqc5wTve0 PS. I don't use Anaconda and I am not posting this to promote it, nor do I necessarily agree with everything said, but I do

Re: Decorator

2017-02-09 Thread Chris Angelico
On Fri, Feb 10, 2017 at 10:18 AM, Terry Reedy wrote: > Perhaps "There are also cases in which evaluating 'fi(arg)' before rather > than after the def statement makes a difference." should be added. Perhaps not. The word "roughly" covers the odd edge cases, and Python has a

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: Thanks for finishing my draft patch, Victor. callmetohd2.patch is same trick for PyObject_CallMethod* APIs in abstract.c. It fixes segv in callmethod.patch. And APIs receiving format string can do same trick when format is empty too. As I grepping

Re: Decorator

2017-02-09 Thread Terry Reedy
On 2/9/2017 2:03 AM, ast wrote: Hi In python courses I read, it is explained that @decor def f(): pass is equivalent to: def f(): pass f = decor(f) But that's not always true. See this code Which is why the official docs now say 'roughly equivalent' ''' For example, the following

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: I checked typeobject.c: there is a single case where we use the result of lookup_maybe_method()/lookup_method() for something else than calling the unbound method: slot_tp_finalize() calls PyErr_WriteUnraisable(del), the case discussed in my previous message

[issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4

2017-02-09 Thread Maximilian Hils
Maximilian Hils added the comment: Thanks for the insanely quick feedback. I still think this is a bug, so I filed https://bugs.python.org/issue29515 with additional details. Let's continue there. -- ___ Python tracker

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: Oh, I was too lazy to run the full test suite, I only ran a subset and I was bitten by buildbots :-) test_unraisable() of test_exceptions fails. IHMO the BrokenRepr subtest on this test function is really implementation specific. To fix buildbots, I removed

Re: subprocess problem

2017-02-09 Thread Cameron Simpson
On 09Feb2017 11:59, Wildman wrote: Here is a method I frequently use to replace the which command. (air code) import os pathlist = os.environ["PATH"].split(":") def which(target) for p in pathlist: fullpath = p + "/" + target if os.path.isfile(fullpath):

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset be663c9a9e24 by Victor Stinner in branch 'default': Issue #29507: Update test_exceptions https://hg.python.org/cpython/rev/be663c9a9e24 -- ___ Python tracker

Re: subprocess problem

2017-02-09 Thread Cameron Simpson
On 09Feb2017 11:16, Andreas Paeffgen wrote: I guess which does not return an error code. If it does not find anything, the return is just blank. If it finds something, the path is returned. So the change of code did not help, because there is just no error message. Could

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Yury Selivanov
Yury Selivanov added the comment: patch looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: Naoki: "method_fastcall4.patch looks clean enough, and performance benefit seems nice." Ok, I pushed the patch with minor changes: * replace "variants:" with "Variants:" * rename lookup_maybe_unbound() to lookup_maybe_method() * rename lookup_method_unbound()

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: Raymond Hettinger: "+1 Though this is a rather large and impactful patch, I think it is a great idea. It will be one of the highest payoff applications of FASTCALL, broadly benefitting a lot of code." In my experience, avoiding temporary tuple to pass

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7b8df4a5d81d by Victor Stinner in branch 'default': Optimize slots: avoid temporary PyMethodObject https://hg.python.org/cpython/rev/7b8df4a5d81d -- nosy: +python-dev ___ Python tracker

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

2017-02-09 Thread DAVID ALEJANDRO Pineda
New submission from DAVID ALEJANDRO Pineda: Hello. I'm working in a real time data collector project. I'm using asyncio and multiprocessing (run_in_executor). In python 3.5 worked fine but in python 3.6 not, gave to me this error: "Traceback (most recent call last): File

[issue29476] Simplify set_add_entry()

2017-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't downvote, no. I am just unsure. I don't have enough information to say that the net benefit is positive neither that it is negative. In the face of hesitance the status quo wins. But it looks to me that in dominant cases set_add_entry() is used with

[issue29034] Fix memory leak and use-after-free in path_converter

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: Does the latest commit fixes a regression introduced by the first fix? Too bad that we missed the refleak in an issue fixing a memory leak :-/ -- ___ Python tracker

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the quick fix Serhiy! I was working on patch and I like to check for refleaks. Sadly, it wasn't noticed before. At least my test was pass :-) -- ___ Python tracker

[issue29516] shutil.copytree(symlinks=True) fails when copying symlinks cross-device and there is no alternative

2017-02-09 Thread Darko Poljak
New submission from Darko Poljak: shutil.copytree() always calls copystat() for symlinks. Copying symlink to another volume fails if some attributes cannot be set. And there is no alternative to bypass this as it can be done for files and directories using copy_function. By default

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: I have set up a global gitignore, and it works for me. % git config --global core.excludesfile ~/.gitignore_global (Amusingly, I had _already- set a global gitignore, but I had forgotten it existed, and it didn't ignore these IDE files.) I agree that we should

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 Though this is a rather large and impactful patch, I think it is a great idea. It will be one of the highest payoff applications of FASTCALL, broadly benefitting a lot of code. Let's be sure to be extra careful with this one because it is touching

[issue29034] Fix memory leak and use-after-free in path_converter

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset be85fd4ef41979dbe68262938da12328fb6cfb8c by Serhiy Storchaka in branch '3.6': Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034. https://github.com/python/cpython/commit/be85fd4ef41979dbe68262938da12328fb6cfb8c

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset be85fd4ef41979dbe68262938da12328fb6cfb8c by Serhiy Storchaka in branch '3.6': Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034. https://github.com/python/cpython/commit/be85fd4ef41979dbe68262938da12328fb6cfb8c

Re: subprocess problem

2017-02-09 Thread Günther Dietrich
Am 09.02.17 um 18:16 schrieb Andreas Paeffgen: > I guess which does not return an error code. In fact, id does return a return code. Here an example: | honk:~ gdie$ which bash; echo $? | /bin/bash | 0 | honk:~ gdie$ which wzlbrmpf; echo $? | 1 It is 0 on success, 1 for a failure. Exactly the

[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-02-09 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Uploaded a new version of the patch. Changelog of this patch (compared to v3): * Fixed reliability issue of existing pty tests. * pty.fork() should now also work on systems without os.forkpty(). Added code to test this backup path of pty.fork(). *

[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2017-02-09 Thread Maximilian Hils
New submission from Maximilian Hils: The latest Windows builds for Python 3.5.3/3.6.0 do not export socket.IPPROTO_IPV6, even though e.g. socket.IPV6_V6ONLY is exported. This seems to be wrong to me as IPV6_V6ONLY requires the corresponding socket option level IPPROTO_IPV6 to be actually

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > turn my "we should do this" idea into a change we've actually made :) Looking forward to being able to do this more on GitHub as I am more familiar with git. Good luck for the transition, I'm pretty sure there will be some hard time in the next few

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4e3a16bdadae by Serhiy Storchaka in branch '3.6': Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034. https://hg.python.org/cpython/rev/4e3a16bdadae New changeset a3f8c5d172b4 by Serhiy Storchaka in branch 'default': Issue

[issue29034] Fix memory leak and use-after-free in path_converter

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4e3a16bdadae by Serhiy Storchaka in branch '3.6': Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034. https://hg.python.org/cpython/rev/4e3a16bdadae -- ___ Python tracker

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Nick Coghlan
Nick Coghlan added the comment: Matthias - thanks for figuring out how to turn my "we should do this" idea into a change we've actually made :) -- ___ Python tracker

[issue1353344] python.desktop

2017-02-09 Thread Nick Coghlan
Nick Coghlan added the comment: >From a downstream redistributor point of view, the key pieces it would be >handy to consolidate upstream are the desktop file itself (with all the >translations) and the preferred icon. It wouldn't really help much to have it >integrated into "make install"

Re: subprocess problem

2017-02-09 Thread Wildman via Python-list
On Thu, 09 Feb 2017 11:16:18 -0600, Andreas Paeffgen wrote: > I guess which does not return an error code. If it does not find > anything, the return is just blank. If it finds something, the path is > returned. > > So the change of code did not help, because there is just no error message. >

[issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4

2017-02-09 Thread Christian Heimes
Christian Heimes added the comment: The constants are defined on Linux. That means Windows does not define the constants and therefore the socket module can't export them. This ticket is closed. If you still think it's a bug, please open a new ticket and reference this ticket. --

[issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4

2017-02-09 Thread Maximilian Hils
Maximilian Hils added the comment: This still seems to be an issue with the offical Python 3.6 builds on Windows 10: Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32 >>> import socket >>> socket.IPPROTO_IPV6 Traceback (most recent call last):

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > OK, I'm marking this as closed, since it's as resolved as we can make it > through a *CPython* change. Thanks you Nick, I appreciate the time you took to do that. ANd thank you Berker for the review. -- ___

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: method_fastcall4.patch benchmark results. It's not the first time that I notice that fannkuch and nbody benchmarks become slower. I guess that it's effect of changing code placement because of unrelated change in the C code. Results don't seem significant on

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: method_fastcall4.patch looks clean enough, and performance benefit seems nice. I don't know current test suite covers unusual special methods. Maybe, we can extend test_class to cover !unbound (e.g. @classmethod) case. --

[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2017-02-09 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon, christian.heimes ___ Python tracker ___

[issue29503] Make embedded-Python detectable

2017-02-09 Thread Steve Dower
Steve Dower added the comment: You can also use the nuget packages (search on nuget.org for Python). These are intended to be used is scripted standalone setups, such as CI systems. I've been using them as part of most of my build systems recently. They support distutils and pip (not venv in

Re: subprocess problem

2017-02-09 Thread Andreas Paeffgen
I guess which does not return an error code. If it does not find anything, the return is just blank. If it finds something, the path is returned. So the change of code did not help, because there is just no error message. Could there be a $path problem in the subprocess started inside the

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset e8455e7137b9bd63d4c0183558161dba6ea00d32 by Nick Coghlan in branch '2.7': Issue #26355: Specify canonical URLs in docs pages https://github.com/python/cpython/commit/e8455e7137b9bd63d4c0183558161dba6ea00d32 --

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file46612/bench.py ___ Python tracker ___

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: method_fastcall4.patch: Based on method_fastcall3.patch, I just added call_unbound() and call_unbound_noarg() helper functions to factorize code. I also modified mro_invoke() to be able to remove lookup_method(). I confirm the speedup with attached bench.py:

[issue29449] clear() should return prior state in threading.Event

2017-02-09 Thread Jyotirmoy Bhattacharya
Jyotirmoy Bhattacharya added the comment: Thanks for the comments above. I'm going to rethink my design. Closing this bug. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue29476] Simplify set_add_entry()

2017-02-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: The problem with posting an idea here on the tracker while it is still in the research phase is that it will be prematurely downvoted without have fully thought it through. What I'm working on now is that opposite question. Was it ever worthwhile to add

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Nick Coghlan
Nick Coghlan added the comment: OK, I'm marking this as closed, since it's as resolved as we can make it through a *CPython* change. Since the old branches aren't autobuilt anymore, adding a canonical URL reference to them would presumably be a matter of running a script over the built docs.

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset a47e20b636d2a5559e5831c6805df3cba1ddb2a1 by Nick Coghlan in branch '3.5': Issue #26355: Specify canonical URLs in docs pages https://github.com/python/cpython/commit/a47e20b636d2a5559e5831c6805df3cba1ddb2a1 --

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset b07d454e45a2 by Nick Coghlan in branch '2.7': Issue #26355: Specify canonical URLs in docs pages https://hg.python.org/cpython/rev/b07d454e45a2 -- ___ Python tracker

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset a47e20b636d2a5559e5831c6805df3cba1ddb2a1 by Nick Coghlan in branch 'master': Issue #26355: Specify canonical URLs in docs pages https://github.com/python/cpython/commit/a47e20b636d2a5559e5831c6805df3cba1ddb2a1 New changeset

[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-09 Thread Petr Viktorin
Petr Viktorin added the comment: For the record, the magic number was changed in issue27286 -- ___ Python tracker ___

[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-09 Thread Nick Coghlan
New submission from Nick Coghlan: The magic number change in 3.5.3 broke the world when Fedora attempted to rebase from 3.5.2, but upstream CPython developers don't currently get an automated notification that it isn't permitted to change the magic number in a maintenance release - instead,

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread Marco Buttu
Marco Buttu added the comment: Serhiy is right about "deep copy" instead of "deepcopy", but IMO the Steven's proposal (with the "deep copy" correction) is much clearer than the current doc. -- ___ Python tracker

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Current documentation looks correct to me. What is the problem with it? Steven's formulation says about "deepcopy", but current documentation says about common issues of "deep copy" and describes how copy.deepcopy() solves them. -- nosy:

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset c63b09833141 by Nick Coghlan in branch '3.5': Issue #26355: Specify canonical URLs in docs pages https://hg.python.org/cpython/rev/c63b09833141 New changeset 80970cf56048 by Nick Coghlan in branch '3.6': Merge issue #26355 fix from Python 3.5

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Xiang Zhang
Xiang Zhang added the comment: > If PyObject_New(ScandirIterator, ) fails the path should > be cleaned up by Argument Clinic. Ohh yes. My stupid. Then both LGTM. -- stage: patch review -> commit review ___ Python tracker

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: scandir-refleak-3.6.patch LGTM. The following removed Py_CLEAR() is just redundant, so it's ok to remove it. -Py_CLEAR(iterator->path.object); -- ___ Python tracker

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If PyObject_New(ScandirIterator, ) fails the path should be cleaned up by Argument Clinic. -- assignee: -> serhiy.storchaka ___ Python tracker

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread R. David Murray
R. David Murray added the comment: I prefer Steven's formulation. The parenthetical is more distracting than clarifying, I think. I agree that 'administrative' is confusing and unnecessary. -- nosy: +r.david.murray ___ Python tracker

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Xiang Zhang
Xiang Zhang added the comment: 3.6 LGTM. 3.7 is technically right to me. But it looks to me AC shouldn't call path_cleanup in .c.h. It always do nothing. -- ___ Python tracker

Re: subprocess problem

2017-02-09 Thread Andreas Paeffgen
Maybe i could use another trick to circumvent the problems in the frozen app? The frozen apps can be downloaded here: https://sourceforge.net/projects/panconvert/files/Newest/ @Cameron: 1. I use PyQT5 for a creating a gui app. To run the app on other systems, where no QT5 and PyQT5 is

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Nick Coghlan
Nick Coghlan added the comment: Looks good to me, so I'll apply these right now :) -- ___ Python tracker ___

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: docs@python -> ncoghlan stage: patch review -> commit review ___ Python tracker ___

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: method_fastcall3.patch implement the trick in more general way. (I haven't ran test yet since it's midnight. I'll post result later.) -- Added file: http://bugs.python.org/file46610/method_fastcall3.patch ___ Python

[issue29212] Python 3.6 logging thread name regression with concurrent.future threads

2017-02-09 Thread desbma
desbma added the comment: Ping, so that this has a chance for the 3.6.1 release. -- ___ Python tracker ___

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 3.7 doesn't leak, but contains outdated comment and code. -- versions: +Python 3.7 Added file: http://bugs.python.org/file46609/scandir-refleak-3.7.patch ___ Python tracker

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The owning of references in the path_t structure was changed in issue29034, but some code still directly manipulates reference counters of path_t fields. Proposed patch should fix the leak. -- keywords: +patch nosy: +xiang.zhang stage: -> patch

Re: Rename file without overwriting existing files

2017-02-09 Thread eryk sun
On Thu, Feb 9, 2017 at 11:46 AM, Steve D'Aprano wrote: > > So to summarise, os.rename(source, destination): > > - is atomic on POSIX systems, if source and destination are both on the > same file system; > - may not be atomic on Windows? > - may over-write an

Re: Rename file without overwriting existing files

2017-02-09 Thread Jussi Piitulainen
Steve D'Aprano writes: > On Mon, 30 Jan 2017 09:39 pm, Peter Otten wrote: > > def rename(source, dest): >> ... os.link(source, dest) >> ... os.unlink(source) >> ... > rename("foo", "baz") > os.listdir() >> ['bar', 'baz'] > rename("bar", "baz") >> Traceback (most recent

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread Pedro
Pedro added the comment: "Because deepcopy copies everything it may copy too much, such as data which is intended to be shared (instead of duplicated) between copies." A bit more explicit? -- ___ Python tracker

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +yselivanov ___ Python tracker ___ ___

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: > method_fastcall2.patch is tuning same function (call_method() in > typeobject.c), and uses trick to bypass temporary method object (same to > _PyObject_GetMethod()). Oh, great idea! That's why I put you in the nosy list ;-) You know better than me this

[issue29306] Check usage of Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() in new FASTCALL functions

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: I tested check_recursion_depth.py: Python 2.7, 3.5 and 3.6 have the bug. Python 3.7 is already fixed. -- versions: +Python 2.7, Python 3.5 ___ Python tracker

[issue29306] Check usage of Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() in new FASTCALL functions

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: check_recursion_depth.py: script using Python functions and C function (functools.partial) to check the recursion depth. Example with Python 3.6: haypo@selma$ ./python check_recursion_depth.py # unpatched got: 148, expected: 100 haypo@selma$ ./python

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: I'm sorry, callmethod.patch is tuned other place, and causing SEGV. method_fastcall2.patch is tuning same function (call_method() in typeobject.c), and uses trick to bypass temporary method object (same to _PyObject_GetMethod()). $ ./python -m perf timeit

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread STINNER Victor
New submission from STINNER Victor: The following code leaks one reference on Python 3.6: def test_attributes(self): d = dict((entry.name, entry) for entry in os.scandir('.')) Or try the command: ./python -m test -R 3:3 test_os -v -m test_attributes -- components:

[issue11726] clarify that linecache only works on files that can be decoded successfully

2017-02-09 Thread Antti Haapala
Antti Haapala added the comment: Every now and then there are new questions and answers regarding the use of `linecache` module on Stack Overflow for doing random access to text files, even though the documentation states that it is meant for Python source code files. One problem is that the

[issue29480] Mac OSX Installer SSL Roots

2017-02-09 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___

[issue29504] blake2: compile error with -march=bdver2

2017-02-09 Thread Christian Heimes
Christian Heimes added the comment: I don't have time to fix the issue right away. Python's copy of blake2 needs some manual massaging and tweaking. -- assignee: -> christian.heimes nosy: +ned.deily priority: normal -> release blocker stage: -> needs patch type: -> compile error

  1   2   >