[issue4865] system wide site-packages dir not used on Mac OS X

2016-12-02 Thread Ned Deily
Ned Deily added the comment: Update: this change has been reverted in Python 2.7.13. See Issue #28440 for details. -- nosy: +ned.deily stage: -> resolved ___ Python tracker

[issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x

2016-12-02 Thread Ned Deily
Ned Deily added the comment: I've pushed the change to revert Issue4865 for the 2.7 branch for release with 2.7.13. I am leaving this open to push similar changes for 3.x branches in anticipation of Apple someday supplying system Python 3.x. It would also be good to see if the post-install

[issue28829] Tkinter messagebox cx_freeze Python 3.4

2016-12-02 Thread Parviz Karimli
Parviz Karimli added the comment: Thanks, mr. Reedy for your response! I have already solved the issue. Actually I had encountered this before and figured out the problem, but unfortunately forgot when I encountered it again. I should have deleted this issue from Python Bug community, but I

[issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x

2016-12-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset a8a342b3fbc7 by Ned Deily in branch '2.7': Issue #28440: No longer add /Library/Python/site-packages, the Apple-supplied https://hg.python.org/cpython/rev/a8a342b3fbc7 -- nosy: +python-dev ___ Python

[issue4865] system wide site-packages dir not used on Mac OS X

2016-12-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset a8a342b3fbc7 by Ned Deily in branch '2.7': Issue #28440: No longer add /Library/Python/site-packages, the Apple-supplied https://hg.python.org/cpython/rev/a8a342b3fbc7 -- nosy: +python-dev ___ Python

[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Martin for pointing on this. Now buildbots are green. -- ___ Python tracker ___

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-12-02 Thread Nick Coghlan
Nick Coghlan added the comment: Attached patch is some new test cases for an approach that I figured out *won't work*. The problem I hit is that "__classcell__" is only injected into the class body execution namespace when there is at least one method implementation that needs it. In any

[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb4a892e9b66 by Serhiy Storchaka in branch '2.7': Try to fix test.test_support.rmtree() on Windows for fixing issue28847 tests. https://hg.python.org/cpython/rev/cb4a892e9b66 -- ___ Python tracker

RE: Can json.dumps create multiple lines

2016-12-02 Thread Joaquin Alzola
On Thu, Dec 1, 2016 at 10:30 AM, Cecil Westerhof wrote: > I would prefer when it would generate: > '[ > "An array", > "with several strings", > "as a demo" > ]' > > Is this possible, or do I have to code this myself? >

[issue27172] Undeprecate inspect.getfullargspec()

2016-12-02 Thread Nick Coghlan
Nick Coghlan added the comment: Thank you Serhiy! That leaves this just as a pending update for 3.5.3 to bring it into line with 3.6.0. I've reverted the stage to "needs patch" and removed the patch keyword, as the 3.5 patch will be slightly different: - using 3.5.3 in the versionchanged

[issue17546] Document the circumstances where the locals() dict get updated

2016-12-02 Thread Martin Panter
Martin Panter added the comment: Some minor tweaks to my earlier patch: * list comprehension → comprehension * time it is called → time of the call -- versions: +Python 3.6, Python 3.7 -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file45735/locals_doc.04.patch

[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Martin Panter
Martin Panter added the comment: http://buildbot.python.org/all/builders/AMD64%20Windows8%202.7/builds/9/steps/test/logs/stdio == ERROR: test_readonly_files (test.test_dumbdbm.DumbDBMTestCase)

[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc7c86de9e13 by Martin Panter in branch '2.7': Issue #28847: Fix spelling https://hg.python.org/cpython/rev/dc7c86de9e13 -- ___ Python tracker

[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Martin Panter
Martin Panter added the comment: Serhiy: The Windows buildbots are having trouble removing read-only files. Maybe restore the write mode for the end of the test, or fix support.rmtree()? See . -- nosy: +martin.panter

[issue26363] __builtins__ propagation is misleading described in exec and eval documentation

2016-12-02 Thread Martin Panter
Martin Panter added the comment: Xavier, you are welcome to propose your own version of the text, or build on Julien’s. See also Issue 22057, about copying all globals vs builtins. -- nosy: +martin.panter stage: -> patch review versions: +Python 2.7, Python 3.6, Python 3.7

[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2016-12-02 Thread Martin Panter
Martin Panter added the comment: “the current mapping of '__builtins__' is copied into *globals* ” That sounds like we insert each individual builtin name, i.e. globals.update(builtins_mapping). But my understanding is that it is the __builtins__ global variable that is affected:

[issue28853] locals() and free variables

2016-12-02 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +terry.reedy ___ Python tracker ___ ___

[issue28852] sorted(range(1000)) is slower in Python 3.7 than in 3.5

2016-12-02 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: sorted(range(1000)) is slower in Python 3.7 compared to Python 3.5 -> sorted(range(1000)) is slower in Python 3.7 than in 3.5 ___ Python tracker

[issue28829] Tkinter messagebox cx_freeze Python 3.4

2016-12-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: You code is buggy and will not run in Python because it does import messagebox. Add from tkinter import messagebox If you only tested with IDLE before freezing, you might have missed the bug in your program because of a bug in IDLE, now fixed in 2.7 and

[issue28853] locals() and free variables

2016-12-02 Thread Martin Panter
Martin Panter added the comment: Marco, your patch removes the description for class blocks. Is that your intent, or just an accident? See r53954. My understanding is “function block” is there to distinguish these three modes: def foo(): # Function block print(locals()) class Bar:

Re: compile error when using override

2016-12-02 Thread Ho Yeung Lee
from __future__ import division from sympy import * x, y, z, t = symbols('x y z t') k, m, n = symbols('k m n', integer=True) f, g, h = symbols('f g h', cls=Function) class AA(object): @staticmethod def __additionFunction__(a1, a2): return a1*a2 #Put what you want instead

[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses some Victor's comments. But I disagree that this bugfix needs a versionchanged directive. -- Added file: http://bugs.python.org/file45734/PyUnicode_CompareWithASCIIString-no-errors-2.patch

[issue28860] Fixed all the doctest failures in Doc/library/configparser.rst

2016-12-02 Thread Marco Buttu
New submission from Marco Buttu: With Python 3.7.0a0 and sphinx-build 1.4.9, this was the result before applying the patch: Doctest summary === 80 tests 8 failures in tests 0 failures in setup code 0 failures in cleanup code build finished with problems, 139

[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2016-12-02 Thread Martin Panter
Changes by Martin Panter : -- title: os.path.mount sometimes raises FileNotFoundError on Windows -> os.path.ismount sometimes raises FileNotFoundError on Windows ___ Python tracker

[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2016-12-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5b40d81e8883 by Serhiy Storchaka in branch '2.7': Issue #21818: Fixed references to classes that have names matching with module https://hg.python.org/cpython/rev/5b40d81e8883 New changeset d64e37b9204e by Serhiy Storchaka in branch '3.5': Issue

[issue19795] Formatting of True/False/None in docs

2016-12-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27172] Undeprecate inspect.getfullargspec()

2016-12-02 Thread Ned Deily
Ned Deily added the comment: It looks like Serhiy took care of the merge to default in dd4c420b8e66. -- nosy: +serhiy.storchaka ___ Python tracker ___

Re: What do you think: good idea to launch a marketplace on python+django?

2016-12-02 Thread codewizard
On Friday, December 2, 2016 at 2:01:57 AM UTC-5, Gus_G wrote: > Hello, what do you think about building a marketplace website on connection > of python+django? End effect-side should look and work similar to these: > https://zoptamo.com/uk/s-abs-c-uk, https://www.ownerdirect.com/ . What are >

[issue28853] locals() and free variables

2016-12-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: FWIW the definition of free variables can be found in the Language Reference at section 4.2.1. "Binding of names" [1]. The list of the free variables of a user defined function can be accessed through the __closure__ function attribute, a tuple. The function

[issue23224] LZMADecompressor object is only initialized in __init__

2016-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is not the only issue. Calling __init__ multiple times causes leaking locks, bz2/lzma internal buffers, etc. It looks to me that the most straightforward way is using __new__ instead of __init__. -- versions: +Python 3.6, Python 3.7 -Python

[issue26876] Extend MSVCCompiler class to respect environment variables

2016-12-02 Thread Rohit Jamuar
Rohit Jamuar added the comment: Bump! The changes, that Steve was asking for, have been incorporated. If something was missed, please inform. Otherwise, could this be merged? -- ___ Python tracker

Re: correct way to catch exception with Python 'with' statement

2016-12-02 Thread Grant Edwards
On 2016-12-02, Marko Rauhamaa wrote: > Grant Edwards : >> In general CISC processors like x86, AMD64, 68K have read-modify-write >> instructions that allow you to increment a memory location or >> set/clear a bit in memory with a single instruction: >>

[issue28858] Fastcall uses more C stack

2016-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, that is why I asked you to revert your changes. In additional, they introduced compiler warnings. -- ___ Python tracker

Re: Request Help With Byte/String Problem

2016-12-02 Thread Grant Edwards
On 2016-12-02, Wildman via Python-list wrote: > On Fri, 02 Dec 2016 15:11:18 +, Grant Edwards wrote: > >> I don't know what the "addr" array contains, but if addr is a byte >> string, then the "int()" call is not needed, in Pythong 3, a byte is >> already an integer:

Re: correct way to catch exception with Python 'with' statement

2016-12-02 Thread Marko Rauhamaa
Grant Edwards : > In general CISC processors like x86, AMD64, 68K have read-modify-write > instructions that allow you to increment a memory location or > set/clear a bit in memory with a single instruction: > > INC.W [R0]# increment memory word whose addr is in

[issue28781] On Installation of 3.5 Python get error message

2016-12-02 Thread Steve Dower
Steve Dower added the comment: > installed 3.4 afterwards Did you mean 3.5 here? If you're going to change versions, I'd at least suggest grabbing the 3.6 beta - it's *much* better than 3.4, and we've had very little trouble with the most recent version (RC is coming in a week or two).

[issue28794] inspect.isasyncgen and inspect.isasyncgenfunction aren't documented

2016-12-02 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Can anyone review this please? :) Thanks. -- ___ Python tracker ___ ___

Re: correct way to catch exception with Python 'with' statement

2016-12-02 Thread Michael Torrie
On 12/01/2016 08:39 PM, Ned Batchelder wrote: > On Thursday, December 1, 2016 at 7:26:18 PM UTC-5, DFS wrote: >> How is it possible that the 'if' portion runs, then 44/100,000ths of a >> second later my process yields to another process which deletes the >> file, then my process continues. > >

Re: Request Help With Byte/String Problem

2016-12-02 Thread Wildman via Python-list
On Fri, 02 Dec 2016 15:11:18 +, Grant Edwards wrote: > I don't know what the "addr" array contains, but if addr is a byte > string, then the "int()" call is not needed, in Pythong 3, a byte is > already an integer: > > def format_ip(a): >return '.'.join(str(b) for b in a) > >

[issue28781] On Installation of 3.5 Python get error message

2016-12-02 Thread Mark Harris
Mark Harris added the comment: No worries Steve, I've managed to fix it. I uninstalled, went through regedit & removed all mentions of python. I then installed python 2.7, installed 3.4 afterwards, uninstalled python 2.7 and for some reason that worked, it is working correctly now! Thanks

[issue28859] os.path.mount sometimes raises FileNotFoundError on Windows

2016-12-02 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- nosy: +wolma ___ Python tracker ___

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-12-02 Thread Tim Graham
Tim Graham added the comment: Thanks Nick. Your suggestion does fix the issue for Django: https://github.com/django/django/pull/7653. -- ___ Python tracker

[issue28858] Fastcall uses more C stack

2016-12-02 Thread STINNER Victor
STINNER Victor added the comment: Oh, I didn't understand that the regression was introduced by the revision b9c9691c72c5. The purpose of this revision was to *reduce* the memory usage of the C stack!? It seems like _PyObject_CallArg1() uses more stack memory than

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-12-02 Thread Nick Coghlan
Nick Coghlan added the comment: This step here is likely to be causing you problems: https://github.com/django/django/blob/6d1394182d8c4c02598e0cf47f42a5e86706411f/django/db/models/base.py#L90 Because the original class namespace isn't being passed up to type.__new__, it isn't seeing the

[issue28781] On Installation of 3.5 Python get error message

2016-12-02 Thread Steve Dower
Steve Dower added the comment: Sorry, I got caught up in work stuff yesterday and didn't get a chance to go through these. I'll try and find time today. -- ___ Python tracker

Re: correct way to catch exception with Python 'with' statement

2016-12-02 Thread Grant Edwards
On 2016-12-02, Steve D'Aprano wrote: > I'm not an expert on the low-level hardware details, so I welcome > correction, but I think that you can probably expect that the OS can > interrupt code execution between any two CPU instructions. Yep, mostly. Some CPUs have

[issue28853] locals() and free variables

2016-12-02 Thread R. David Murray
R. David Murray added the comment: To answer the parenthetical question (I haven't looked at the doc issue itself), we don't doctest the examples because most of them were written before sphinx grew a doctest extension, so a lot of them don't pass for reasons that have nothing to do with code

Re: Request Help With Byte/String Problem

2016-12-02 Thread Grant Edwards
On 2016-12-02, Wildman via Python-list wrote: > On Wed, 30 Nov 2016 14:39:02 +0200, Anssi Saari wrote: > >> There'll be a couple more issues with the printing but they should be >> easy enough. > > I finally figured it out, I think. I'm not sure if my changes are > what

[issue28857] SyncManager and Main Process fail to communicate after reboot or stoping with Ctrl - C

2016-12-02 Thread R. David Murray
R. David Murray added the comment: There doesn't appear to be enough information here to determine what part of Python you are trying to report a bug in. It reads more like you are asking for help debugging your program :) Maybe you could ask for help on the python-list mailing list to help

[issue28853] locals() and free variables

2016-12-02 Thread Marco Buttu
Marco Buttu added the comment: Yes, it is the same. "Free variables belonging to the enclosing local namespaces" are "non-global free variables". In order for the reader to better contextualize the sentence, I think it is worth keeping the code example in the patch. --

Re: Asyncio -- delayed calculation

2016-12-02 Thread Chris Angelico
On Sat, Dec 3, 2016 at 1:26 AM, Frank Millman wrote: > Then Twisted made a strong case for an asynchronous approach. One of their > claims (which I have no reason to doubt) was that, because each user > 'session' spends most of its time waiting for something - keyboard input,

Re: Asyncio -- delayed calculation

2016-12-02 Thread Marko Rauhamaa
"Frank Millman" : > Then Twisted made a strong case for an asynchronous approach. One of > their claims (which I have no reason to doubt) was that, because each > user 'session' spends most of its time waiting for something - > keyboard input, reply from database, etc - their

[issue28859] os.path.mount sometimes raises FileNotFoundError on Windows

2016-12-02 Thread Christoph Reiter
New submission from Christoph Reiter: It returns True for drives which don't exist and raises for paths starting with drives which don't exist. >>> os.path.exists("C:\\") True >>> os.path.ismount("C:\\") True >>> os.path.ismount("C:\\doesnotexist") False >>> os.path.exists("F:\\") False >>>

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-12-02 Thread Tim Graham
Tim Graham added the comment: Hi, this causes a regression in Django and I'm not sure if Django or cpython is at fault. For a simple model that uses super() rather than super(Model self) in save(): from django.db import models class Model(models.Model): def save(self, *args, **kwargs):

Re: Asyncio -- delayed calculation

2016-12-02 Thread Frank Millman
"Steve D'Aprano" wrote in message news:58417e2d$0$1612$c3e8da3$54964...@news.astraweb.com... My first impressions on this is that we have a couple of good models for preemptive parallelism, threads and processes, both of which can do everything that concurrency can do, and more, and both of

[issue28853] locals() and free variables

2016-12-02 Thread Julien Palard
Julien Palard added the comment: Hi, thanks for reporting, Variables are defined in python docs¹ by: > If a name is bound in a block, it is a local variable of that block, unless > declared as nonlocal or global. If a name is bound at the module level, it is > a global variable. (The

Re: Asyncio -- delayed calculation

2016-12-02 Thread Marko Rauhamaa
Steve D'Aprano : > py> await x > File "", line 1 > await x > ^ > SyntaxError: invalid syntax "await" is only allowed inside a coroutine. > So why do we need asyncio? What is it actually good for? Asyncio is a form of cooperative multitasking. It

Re: Asyncio -- delayed calculation

2016-12-02 Thread Steve D'Aprano
On Thu, 1 Dec 2016 06:53 pm, Christian Gollwitzer wrote: > well that works - but I think it it is possible to explain it, without > actually understanding what it does behind the scences: > > x = foo() > # schedule foo for execution, i.e. put it on a TODO list > > await x > # run the TODO list

[issue26861] shutil.copyfile() doesn't close the opened files

2016-12-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: You're going to need to provide a real repro; your description is effectively useless. For the record, Python is not precisely pass by reference (it's roughly equivalent to passing a pointer in C, binding the local name to the same pointer, so if you reassign

[issue28855] Compiler warnings in _PyObject_CallArg1()

2016-12-02 Thread STINNER Victor
STINNER Victor added the comment: No problem, thanks for the fix Benjamin! -- ___ Python tracker ___ ___

[issue28853] locals() and free variables

2016-12-02 Thread Marco Buttu
Marco Buttu added the comment: In addition, also if here "function blocks" means nested function, the sentence "Free variables are returned by locals() when it is called in function blocks" I think is wrong. It is true only in case of free variables belonging to the local enclosing scope. For

[issue28856] %b format for bytes does not support objects that follow the buffer protocol

2016-12-02 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue27172] Undeprecate inspect.getfullargspec()

2016-12-02 Thread Nick Coghlan
Nick Coghlan added the comment: I've pushed the change for 3.6.0rc1 based on Yury and Martin's review, but wasn't able to forward merge it to default due to merge conflicts on Misc/NEWS that I wasn't sure how to resolve. -- priority: release blocker -> deferred blocker stage: needs

[issue27172] Undeprecate inspect.getfullargspec()

2016-12-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 14c2d93ffcb3 by Nick Coghlan in branch '3.6': Issue #27172: Undeprecate inspect.getfullargspec() https://hg.python.org/cpython/rev/14c2d93ffcb3 -- nosy: +python-dev ___ Python tracker

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2016-12-02 Thread Michael Felt
Michael Felt added the comment: Considering that python-2.7.13 is posed for a release - I ask again, considering that python-2.7.12 (and I expect a few earlier ones) can load "AIX" .a type shared libraries - if you know how to supply the name - that my patch be included in python-2.7.13.

[issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore

2016-12-02 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang stage: -> needs patch versions: +Python 3.7 -Python 3.3, Python 3.4 ___ Python tracker

[issue26861] shutil.copyfile() doesn't close the opened files

2016-12-02 Thread Vukasin Felbab
Vukasin Felbab added the comment: Okay, so the problem is that I have a command library instance which is containing a connection to a server and functions can be called to execute some queries. As I pass this instance as a parameter in a recursive chain, after a while the open files limit is

[issue28781] On Installation of 3.5 Python get error message

2016-12-02 Thread Mark Harris
Mark Harris added the comment: Hi All, Just wanted to check if there is any progress on the below? I understand it's a bit of a mess, however I use python in my day job(this is on my work pc) so any help getting it sorted would be great. Thanks again, Mark --