[issue25177] OverflowError in statistics.mean when summing large floats

2015-10-20 Thread Mark Dickinson
Mark Dickinson added the comment: > I strongly suspect that moving from float to Fraction-based ratios is going > to kill performance in the common case The existing code already converts each of the input items to Fraction; the only difference is that the old code converts the sum of those

Re: unsupported operand type(s) python v2.7

2015-10-20 Thread Wolfgang Maier
On 20.10.2015 10:44, ngangsia akumbo wrote: def n(): 34 * 2 def g(): 4 + 2 Your n and g functions do not have an explicit return so, after doing their calculations and throwing the result away, they return None. def ng(): return n() + g() ng()

Re: unsupported operand type(s) python v2.7

2015-10-20 Thread ngangsia akumbo
On Tuesday, October 20, 2015 at 10:01:44 AM UTC+1, Wolfgang Maier wrote: > On 20.10.2015 10:44, ngangsia akumbo wrote: > def n(): > > 34 * 2 > > > > > def g(): > > 4 + 2 > > > > Your n and g functions do not have an explicit return so, after doing > their calculations and

unsupported operand type(s) python v2.7

2015-10-20 Thread ngangsia akumbo
>>> def n(): 34 * 2 >>> def g(): 4 + 2 >>> def ng(): return n() + g() >>> ng() Traceback (most recent call last): File "", line 1, in ng() File "", line 2, in ng return n() + g() TypeError: unsupported operand type(s) for +:

Re: unsupported operand type(s) python v2.7

2015-10-20 Thread ngangsia akumbo
On Tuesday, October 20, 2015 at 10:08:51 AM UTC+1, ngangsia akumbo wrote: > On Tuesday, October 20, 2015 at 10:01:44 AM UTC+1, Wolfgang Maier wrote: > > On 20.10.2015 10:44, ngangsia akumbo wrote: > > def n(): > > > 34 * 2 > > > > > > > > def g(): > > > 4 + 2 > > > > > > > Your n

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-20 Thread STINNER Victor
STINNER Victor added the comment: I knew the subtle difference between reading from /dev/urandom and getrandom() syscall: the syscall hangs until /dev/urandom is feeded with enough entropy. It should be documented in Whats New, os.urandom and maybe also random doc. Not only python 3.5 was

Re: variable scope of class objects

2015-10-20 Thread Luca Menegotto
Il 19/10/2015 20:39, JonRob ha scritto: I (think) I understand that in the below case, the word self could be replaced with "BME280" to explicitly call out a variable. But even still I don't know how explicit call out effects the scope of a variable. These two statements make me think you

[issue25445] type xterm in python

2015-10-20 Thread Reema
New submission from Reema: python xterm give output /usr/bin/xterm when used in unix shell script. Need to get same output in python for: type xterm similarly for type textedit When trying to do it with subprocess.Popen, i am getting an error: type object 'type' has no attribute 'rfind' or

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: There are two 'width=250' settings, which I tried changing to 150, with no effect, so there is something else making the dialog wider than before. -- ___ Python tracker

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-20 Thread Марк Коренберг
Марк Коренберг added the comment: Man getrandom() As of Linux 3.19, the following bug exists: * Depending on CPU load, getrandom() does not react to interrupts before reading all bytes requested. So, is it goot to use this syscall now? --

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8953a42c2ac4 by Terry Jan Reedy in branch '2.7': Issue #24782: Don't try to run now-removed extension dialog test. https://hg.python.org/cpython/rev/8953a42c2ac4 New changeset 4bf862fc10a5 by Terry Jan Reedy in branch '3.4': Issue #24782: Don't try

1 million new Python 3 users (next spring)

2015-10-20 Thread Terry Reedy
From a PSF mailing list, this announcement. http://ntoll.org/article/story-micropython-on-microbit Contributions invited. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Defamation

2015-10-20 Thread Ralf Hildebrandt
* Laura Creighton : > Actually, this one was part of a huge set of defaming articles sent a > year ago we were requested to remove, and did. European Law may > require us to do so. I checked, and this article wasn't one on > our list, which is why we missed this one. Note that

RE: Re: Re: Installing pywin32.

2015-10-20 Thread ashwath
Hi Is it possible to pause and restart the file upload process to S3 AWS ? I ll be happy if you get me a solution for this, I have an account in the S3, so please help with this. Thanking you in advance. I tried with boto3 module but I couldn't do it . Thanks & Regards Ashwath B H

aiosmtpd 1.0a1 - asyncio-based implementations of SMTP/LMTP

2015-10-20 Thread Barry Warsaw
I'm very happy to announce the first alpha release of aiosmtpd, an asyncio-based implementation of SMTP and LMTP. http://aiosmtpd.readthedocs.org/en/latest/ https://pypi.python.org/pypi/aiosmtpd/1.0a1 This library can be used as a standalone server, or as a testing framework for applications

[issue25445] type xterm in python

2015-10-20 Thread R. David Murray
R. David Murray added the comment: For programming help you should post to the python-tutor or python-list mailing lists. This issue tracker is for reporting bugs. -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed

[issue25442] Shelve consistency issues

2015-10-20 Thread R. David Murray
R. David Murray added the comment: Yeah, if we had an sqlite backend I think we'd make it the default if sqlite was available. There's a proof of concept implementation in the open issue 3783. I'm not sure what remains to be done (other than docs)...I didn't read through the issue and

Re: variable scope of class objects

2015-10-20 Thread Luca Menegotto
Il 20/10/2015 08:38, Nagy László Zsolt ha scritto: When you say "they have nothing to do", it is almost true but not 100%. I know it, but when it comes to eradicate an idea that comes directly from C++-like languages, you must be drastic. Nuances come after... -- Ciao! Luca --

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-20 Thread STINNER Victor
STINNER Victor added the comment: Hi, Марк Коренберг added the comment: > Man getrandom() > > As of Linux 3.19, the following bug exists: > >* Depending on CPU load, getrandom() does not react to interrupts > before reading all bytes requested. > > So, is it goot to use this

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2015-10-20 Thread STINNER Victor
STINNER Victor added the comment: > Suppose conditions: > - Old linux kernel ignoring flag > - malicious hacker force use of PLAIN FILE instead of directory Is it a theorical bug, or are you able to reproduce it? Old Linux kernel ignores the 0o2000 bit but O_TMPFILE is 0o2000 |

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-20 Thread STINNER Victor
STINNER Victor added the comment: > The RNG is seeded from os.urandom, which as of python 3.5 uses the > potentially blocking getrandom() call. Here is a patch for os.urandom() documentation. What do you think? -- keywords: +patch Added file:

Re: variable scope of class objects

2015-10-20 Thread Nagy László Zsolt
> These two statements make me think you come from C++ or something > similar. > > In Python you can declare variables at class level, but this > declaration must NOT be interpreted in the same manner of a similar > declaration in C++: they remain at the abstract level of a class, and > they have

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue25410] Clean up and fix OrderedDict

2015-10-20 Thread Eric Snow
Eric Snow added the comment: both patches* LGTM * odict_type.patch and odict_add_new_node_leak.patch -- ___ Python tracker ___

Re: Defamation

2015-10-20 Thread Laura Creighton
In a message of Wed, 21 Oct 2015 00:09:18 +1100, "Steven D'Aprano" writes: >On Tue, 20 Oct 2015 03:28 am, Laura Creighton wrote: > >> Actually, this one was part of a huge set of defaming articles sent a >> year ago we were requested to remove, and did. European Law may >> require us to do so. I

[issue25410] Clean up and fix OrderedDict

2015-10-20 Thread Eric Snow
Eric Snow added the comment: Since the python-dev discussion about __class__, leaving the Python implementation alone is fine with me. -- stage: patch review -> commit review ___ Python tracker

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-10-20 Thread R. David Murray
R. David Murray added the comment: Can you explain more about the failure you are seeing? -- ___ Python tracker ___

[issue25410] Clean up and fix OrderedDict

2015-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your reviews and discussions (and for your appreciated C acceleration of OrderedDict of course) Eric. I just want to make the code a little cleaner and reliable. As for odict_type.patch, I would prefer to commit only C part of the patch and

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-10-20 Thread R. David Murray
R. David Murray added the comment: Sorry, I misremenbered and thought that fix didn't make it in to 3.5, but in fact you are talking about the behavior of that fix. -- ___ Python tracker

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-10-20 Thread R. David Murray
R. David Murray added the comment: Does the fix at the end of issue 15014 address your concern? -- ___ Python tracker ___

Re: teacher need help!

2015-10-20 Thread Michael Torrie
On 10/20/2015 10:25 AM, Storey, Geneva wrote: > FYI-We formatted the machines, reinstalling everything, including > Python. I works with no problems now. Confusing that this would > happen on 3 out of 13 machines. Just letting you know, all is well. > Thank you for your help! Geneva Wow that

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2015-10-20 Thread Марк Коренберг
Марк Коренберг added the comment: Okay, seemes it is not documented that os.open('.', os.O_RDWR |os.O_EXCL | os.O_DIRECTORY) Should return EISDIR I did not found that in Linux manpages. Using undocumented features is bad. Maybe I should report this to Michael Kerrisk to update manpage ?

[issue25448] Exception ABC doesn't work in Python 3 (but does in Python 2.7)

2015-10-20 Thread Medardo Rodriguez
New submission from Medardo Rodriguez: When I run the next code in all my installed versions of Python 3 (and the equivalent code for PyPy and CPython 2.7): - Runs OK in CPython 2.7 equivalent code (using `ABCMeta` as meta-class). - Fails in PyPy and all versions of Python 3. --

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2015-10-20 Thread STINNER Victor
STINNER Victor added the comment: 2015-10-20 20:02 GMT+02:00 Марк Коренберг : > Okay, seemes it is not documented that > > os.open('.', os.O_RDWR |os.O_EXCL | os.O_DIRECTORY) > > Should return EISDIR You cannot open a directory to write, only to read. --

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2015-10-20 Thread Марк Коренберг
Марк Коренберг added the comment: Well, it's not said explicit, that O_DIRECTORY cannot be combined with O_RDWR. So, everything is valid now, very hacky, but works without bugs. It will be nice, if someone comment that hacks in source code -- ___

Re: How to rearrange array using Python?

2015-10-20 Thread Martin Schöön
It has been a while. I have mastered solving Kenken and Sudoku using Python-constraint. I still have no clue on how to tell the solver how to constrain the number of occupants in rooms: I have made up an simple example with nine persons and three rooms. Wishes for room mates are mild in the

Re: How to rearrange array using Python?

2015-10-20 Thread Ian Kelly
On Tue, Oct 20, 2015 at 1:26 PM, Ian Kelly wrote: > def room_size_constraint(*v): > counter = Counter(v.values()) Sorry, this should just be Counter(v), since v here is a tuple, not a dict. -- https://mail.python.org/mailman/listinfo/python-list

[issue25395] SIGSEGV using json.tool: highly nested OrderedDict

2015-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a problem with odict-trashcan.v3.patch. PyDict_Type.tp_dealloc() can put the object to the freelist if it's type is dict. Since odict_dealloc() fakes object's type, it alows deallocated OrderedDict to be later used as dict. But the size of

[issue25447] TypeError invoking deepcopy on lru_cache

2015-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure that we can say that deepcopying was not supported for lru_cache. copy.deepcopy() returned the same object, as for immutable objects, but can we consider decorated with lru_cache() function immutable? The question is: if made

Re: How to rearrange array using Python?

2015-10-20 Thread Ian Kelly
On Tue, Oct 20, 2015 at 12:57 PM, Martin Schöön wrote: > It has been a while. > I have mastered solving Kenken and Sudoku using Python-constraint. > > I still have no clue on how to tell the solver how to constrain > the number of occupants in rooms: I have made up an

[issue25444] Py Launch Icon

2015-10-20 Thread Paul Moore
Paul Moore added the comment: It's a very personal choice, but I prefer the current icons. I'm -1 on this change. -- ___ Python tracker ___

[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2015-10-20 Thread Berker Peksag
Changes by Berker Peksag : -- stage: test needed -> patch review type: crash -> behavior versions: +Python 3.6 ___ Python tracker

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-20 Thread jan matejek
jan matejek added the comment: let me reiterate that what I consider a bug is the fact that "import random" statement calls os.urandom (which per the proposed documentation may sometimes block) IOW, "import random" may sometimes block, even though it is not actually used at any point (could

[issue25444] Py Launch Icon

2015-10-20 Thread Nils Lindemann
Nils Lindemann added the comment: The icons are not intended to be used instead of the three default icons, please dont, these are just great. I am just targeting the current launcher symbol: * It contains a symbol of an instrument which can be used to kill people. * in the 16x16 icon it is

Jython 2.7.1 beta2 released!

2015-10-20 Thread fwierzbi...@gmail.com
On behalf of the Jython development team, I'm pleased to announce that Jython 2.7.1 beta2 is released! Thanks to Amobee for sponsoring my work on Jython, and thanks to the many contributors to Jython! Details are here: http://fwierzbicki.blogspot.com/2015/10/jython-271-beta2-released.html

[issue25410] Clean up and fix OrderedDict

2015-10-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 93f948120773 by Serhiy Storchaka in branch '3.5': Issue #25410: Fixed a memory leak in OrderedDict in the case when key's hash https://hg.python.org/cpython/rev/93f948120773 New changeset c3cec0f77eff by Serhiy Storchaka in branch 'default': Issue

[issue25444] Py Launch Icon

2015-10-20 Thread Nils Lindemann
Nils Lindemann added the comment: let me reformulate it: my main intention is to get rid of the launcher symbol, or at least have a nicer looking symbol, i dont care for the idle symbol. -- ___ Python tracker

Re: teacher need help!

2015-10-20 Thread Storey, Geneva
FYI-We formatted the machines, reinstalling everything, including Python. I works with no problems now. Confusing that this would happen on 3 out of 13 machines. Just letting you know, all is well. Thank you for your help! Geneva Geneva Storey Fulton High School Spanish, Mathematics

[issue25311] Add f-string support to tokenize.py

2015-10-20 Thread Eric V. Smith
Eric V. Smith added the comment: This patch cleans up string matching in tokenize.py, and adds f-string support. -- Added file: http://bugs.python.org/file40821/issue25311-1.diff ___ Python tracker

[issue25444] Py Launch Icon

2015-10-20 Thread Paul Moore
Changes by Paul Moore : -- nosy: -paul.moore ___ Python tracker ___ ___

[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2015-10-20 Thread Joe Jevnik
Joe Jevnik added the comment: bumping this issue -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25447] TypeError invoking deepcopy on lru_cache

2015-10-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: For some context into the error: $ python3.5 -m pdb cachecopy.py > /home/jaraco/cachecopy.py(1)() -> import copy (Pdb) c Traceback (most recent call last): File "/usr/lib/python3.5/pdb.py", line 1661, in main pdb._runscript(mainpyfile) File

[issue14373] C implementation of functools.lru_cache

2015-10-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: I suspect this change is implicated in issue25447. -- nosy: +jason.coombs status: pending -> open ___ Python tracker

[issue25444] Py Launch Icon

2015-10-20 Thread Nils Lindemann
Nils Lindemann added the comment: Here is also a zip containing the icons. -- Added file: http://bugs.python.org/file40818/icons.zip ___ Python tracker

[issue25444] Py Launch Icon

2015-10-20 Thread Tim Golden
Changes by Tim Golden : -- nosy: -tim.golden ___ Python tracker ___ ___

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-10-20 Thread Oliver Merkel
New submission from Oliver Merkel: class SMTP: def auth_login(self, challenge=None): The self.docmd should use cmd "AUTH" with parameter "LOGIN" + encoded login like (code, resp) = self.docmd("AUTH", "LOGIN " + encode_base64(self.user.encode('ascii'), eol='')) with

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I think Jan has a point there. An import should not cause the whole interpreter to hang. Wouldn't it be possible to have the getrandom() call be done lazily to avoid this and only have it block when the RNG from the random is actually being used ? Or

[issue4709] Mingw-w64 and python on windows x64

2015-10-20 Thread Stefano Taschini
Changes by Stefano Taschini : -- nosy: +taschini ___ Python tracker ___ ___

[issue25439] Add type checks to urllib.request.Request

2015-10-20 Thread Nan Wu
Nan Wu added the comment: Uploaded a patch. Also update the test. Seems there are at least two old test cases using empty dict as data param. has dict been supported before? -- keywords: +patch nosy: +Nan Wu Added file:

[issue25447] TypeError invoking deepcopy on lru_cache

2015-10-20 Thread Jason R. Coombs
New submission from Jason R. Coombs: Beginning with Python 3.5, an lru_cache no longer survives a deepcopy. ``` $ cat >> cache_copy.py import copy from functools import lru_cache foo = lru_cache()(lambda: None) copy.deepcopy(foo) $ python3.5 cache_copy.py Traceback (most recent call last):

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-20 Thread jan matejek
jan matejek added the comment: attaching a first draft of what i'd consider a solution? not sure if this is the right way to go, and i don't know how to write a test for an import statement -- Added file: http://bugs.python.org/file40820/random.patch

[issue25320] unittest loader.py TypeError when code directory contains a socket

2015-10-20 Thread Victor van den Elzen
Victor van den Elzen added the comment: Alternatively, patch-with-seperate-test.patch creates a seperate function to test for this issue. -- Added file: http://bugs.python.org/file40826/patch-with-seperate-test.patch ___ Python tracker

[issue22515] Implement partial order on Counter

2015-10-20 Thread Aaron Meurer
Aaron Meurer added the comment: I can't believe this issue was closed. Why can't Counter.__lt__(self, other) just be all(self[i] < other[i] for i in self)? Just because Counter supports weird stuff shouldn't bill it out. To follow that logic, we should also remove Counter.subtract >>>

[issue25439] Add type checks to urllib.request.Request

2015-10-20 Thread Martin Panter
Martin Panter added the comment: The iterable option is documented under the urlopen(data=...) parameter, albeit not under the Request.data attribute. IMO this isn’t right, because you need to use Request to add Content-Length, but that is a separate documentation issue. Technically, an empty

[issue25447] TypeError invoking deepcopy on lru_cache

2015-10-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: Indeed. I guess my point about "supported" related to not having tests capturing this requirement or docs stipulating it. My instinct on the latter question is this - an lru_cache-decorated function is a stateful function. It is mutable, much like a dict or

Re: variable scope of class objects

2015-10-20 Thread JonRob
Hello Luca, I very much appreciated your comments. And I understand the importance of "doing something right" (i.e. convention). This leads me to another question. Because I am interfacing with an I2C sensor I have many register definations to include (30 register addresses and 26

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2015-10-20 Thread STINNER Victor
STINNER Victor added the comment: > It will be nice, if someone comment that hacks in source code I don't understand why you keep calling this a hack. It's part of open() contract, and I'm quite sure that it was a deliberate choice to declare O_TMPFILE as O_DIRECTY|new_bit. See for example

[issue25449] Test OrderedDict subclass

2015-10-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: C implementation of OrderedDict often has two paths. One for exact OrderedDict and other for subclasses. But only one of the paths is tested. Proposed patch adds tests for a subclass of C implemented OrderedDict. test_issue24347 is failed with OrderedDict

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-10-20 Thread Oliver Merkel
Oliver Merkel added the comment: Sample session log output showing the error with smtp.set_debuglevel(1): send: 'ehlo \r\n' reply: b'250- Hello [myIP4address]\r\n' reply: b'250-SIZE 53248000\r\n' reply: b'250-PIPELINING\r\n' reply: b'250-DSN\r\n' reply: b'250-ENHANCEDSTATUSCODES\r\n' reply:

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2015-10-20 Thread Марк Коренберг
Марк Коренберг added the comment: Huge thanks for that patch. Now things are much cleaner. -- ___ Python tracker ___

[issue25320] unittest loader.py TypeError when code directory contains a socket

2015-10-20 Thread Victor van den Elzen
Victor van den Elzen added the comment: patch-with-test.patch is a patch against current tip (c3cec0f77eff+). It applies cleanly to 3.5. It seemed simplest to include the socket in test_find_tests. -- Added file: http://bugs.python.org/file40825/patch-with-test.patch

[issue25448] Exception ABC doesn't work in Python 3 (but does in Python 2.7)

2015-10-20 Thread R. David Murray
R. David Murray added the comment: What are you trying to accomplish that needs an abstract base class? APIError is not an Exception class, it is a meta-class, and thus it does not match the exception because it is not a *base* class of DriverError (it is DiverError's *meta* class). Now, it

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-10-20 Thread Oliver Merkel
Oliver Merkel added the comment: Let us assume you want to establish a smtp session with AUTH LOGIN as the supported authentication type. Sample code to send mail: Typical preparation steps like with SMTP( mailserver, 587 ) as smtp: # smtp.set_debuglevel(1) smtp.ehlo()

Re: How to rearrange array using Python?

2015-10-20 Thread Oscar Benjamin
On Tue, 20 Oct 2015 20:01 Martin Schöön wrote: It has been a while. I have mastered solving Kenken and Sudoku using Python-constraint. I still have no clue on how to tell the solver how to constrain the number of occupants in rooms: I have made up an simple example with

[issue25449] Test OrderedDict subclass

2015-10-20 Thread Eric Snow
Eric Snow added the comment: LGTM as long as you also add PurePythonOrderedDictSubclassTests to match CPythonOrderedDictSubclassTests (per PEP 399). -- nosy: +eric.snow stage: -> commit review ___ Python tracker

[issue25320] unittest loader.py TypeError when code directory contains a socket

2015-10-20 Thread Victor van den Elzen
Changes by Victor van den Elzen : Removed file: http://bugs.python.org/file40690/unittest_socket.diff ___ Python tracker ___

Re: variable scope of class objects

2015-10-20 Thread JonRob
Thanks to all who replied to my question. I received a lot of information and points of view that are very helpful. I realize some of you folks spent more that a few minutes. I really appreciate your time. Pardon me that i replied to random832's post and not the original but my original was

[issue25448] Exception ABC doesn't work in Python 3 (but does in Python 2.7)

2015-10-20 Thread R. David Murray
R. David Murray added the comment: Thinking about this some more my explanation isn't quite clear (because my thinking wasn't quite clear): the problem isn't that APIError isn't *capable* of being a base class; I was wrong when I said it is itself a metaclass. It is a class that has ABCMeta

[issue25450] Save path automatically choses C:\Windows\system32

2015-10-20 Thread Maja Tomic
New submission from Maja Tomic: I'm teaching kids to code in Python. Today we had two boys, one with Windows 8, the other one with Windows 10. In both cases Python 3.5 was installed and the automatic path where files are saved was C:\Windows\system32. This wasn't possible, since it cannot be

[issue25154] Drop the pyvenv script

2015-10-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Did you fix the "exeutable" typo? -- nosy: +pitrou ___ Python tracker ___

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2015-10-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc2deecb2346 by Victor Stinner in branch '3.5': Issue #21515: Elaborate tempfile.TemporaryFile() comment https://hg.python.org/cpython/rev/dc2deecb2346 -- ___ Python tracker

[issue25154] Drop the pyvenv script

2015-10-20 Thread Brett Cannon
Brett Cannon added the comment: Not yet. I will get to it no later than Friday (just a matter of either remembering to quickly fix it when I get home from work, bother setting up SSH keys at work, or simply doing it on Friday when I typically do all of my Python work). --

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2015-10-20 Thread STINNER Victor
STINNER Victor added the comment: > Huge thanks for that patch. Now things are much cleaner. I understand that the patch looks good to you, so I pushed it to Python 3.5 & 3.6. I close again the issue. Thanks for your analasys of tempfile.TemporaryFile() :-) -- resolution: -> fixed

[issue25439] Add type checks to urllib.request.Request

2015-10-20 Thread Nan Wu
Nan Wu added the comment: I see. Empty dict is considered as iterable of bytes makes good sense. I just left the old tests there. And explicitly give warnings when data field is of type str or type dict with non-bytes key. -- Added file:

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-10-20 Thread R. David Murray
R. David Murray added the comment: Ah, now I see what you are saying. How in the world did we miss that? Our unit tests must be broken too. -- keywords: +3.5regression priority: normal -> release blocker stage: -> needs patch versions: +Python 3.6

[issue25450] IDLE: Save path automatically choses C:\Windows\system32

2015-10-20 Thread Zachary Ware
Changes by Zachary Ware : -- components: +IDLE, Windows -Installation nosy: +kbk, paul.moore, roger.serwy, steve.dower, terry.reedy, tim.golden, zach.ware title: Save path automatically choses C:\Windows\system32 -> IDLE: Save path automatically choses

Re: 2.7.9: PhotoImage get/put

2015-10-20 Thread Emile van Sebille
On 10/20/2015 3:05 PM, Randy Day wrote: I'm writing a simple image manipulation on a PhotoImage (tkinter), and running into an odd problem. The code below works, except for one thing: As the image is scanned, I'd like to observe the pixels getting inverted on the image (as a kind of progress

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-10-20 Thread Oliver Merkel
Oliver Merkel added the comment: Change proposal attached as a unified diff / patch file. -- keywords: +patch Added file: http://bugs.python.org/file40829/smtplib-patch.issue25446.patch ___ Python tracker

2.7.9: PhotoImage get/put

2015-10-20 Thread Randy Day
I'm writing a simple image manipulation on a PhotoImage (tkinter), and running into an odd problem. The code below works, except for one thing: As the image is scanned, I'd like to observe the pixels getting inverted on the image (as a kind of progress bar). What happens is that the code

[issue25413] ctypes (libffi) fails to compile on Solaris X86

2015-10-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue25410] Clean up and fix OrderedDict

2015-10-20 Thread Eric Snow
Eric Snow added the comment: And thanks again, Serhiy, for taking the time on this. :) -- ___ Python tracker ___

[issue25395] SIGSEGV using json.tool: highly nested OrderedDict

2015-10-20 Thread Eric Snow
Eric Snow added the comment: Thanks for solving this! odict-trashcan.v3.patch LGTM -- stage: patch review -> commit review ___ Python tracker ___

Re: Defamation

2015-10-20 Thread Steven D'Aprano
On Wed, 21 Oct 2015 01:44 am, Laura Creighton wrote: > In a message of Wed, 21 Oct 2015 00:09:18 +1100, "Steven D'Aprano" writes: >>On Tue, 20 Oct 2015 03:28 am, Laura Creighton wrote: >> >>> Actually, this one was part of a huge set of defaming articles sent a >>> year ago we were requested to

[issue25448] Exception ABC doesn't work in Python 3 (but does in Python 2.7)

2015-10-20 Thread Medardo Rodriguez
Medardo Rodriguez added the comment: Thanks ~eryksun, you clarified me in where the error is located and possible patches for it. We are programming a framework where is very important to do mappings between (1) the API and (2) the drivers layers. We try to make our code available to both

What does it mean for Python to have “constants”? (was: variable scope of class objects)

2015-10-20 Thread Ben Finney
Dennis Lee Bieber writes: > (Python does not have anything that one might consider a true constant > -- other than the language defined singletons: None, and maybe by now > True and False). Python now deals with those by making the names keywords:: >>> True =

[issue25448] Exception ABC doesn't work in Python 3 (but does in Python 2.7)

2015-10-20 Thread eryksun
eryksun added the comment: In Python 2, PyErr_GivenExceptionMatches [1] calls PyObject_IsSubclass. To handle calling __subclasscheck__ in this case, 2.7 (but not 2.6) temporarily increases the recursion limit by 5. For example: class CMeta(type): def __subclasscheck__(self,

[issue25448] Exception ABC doesn't work in Python 3 (but does in Python 2.7)

2015-10-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: This looks like a duplicate of #12029. The delays on addressing that bug seem to indicate that initially there was a fairly substantial performance cost for all exception handling paths when ABC friendly checking was performed, but that was at least partially

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

2015-10-20 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch. I think we can move the Python 3 part of the patch to a new note directive (similar to the example in httplib documentation: https://docs.python.org/2/library/httplib.html) For example: .. deprecated:: 2.6 Use :mode:`HTMLParser`

Re: 2.7.9: PhotoImage get/put

2015-10-20 Thread C Smith
>> def process(): # Ordinarily this would be process(photo,wdth,hgt) >>global wdth # but I ran into problems calling it from a button If you want to pass arguments to a command called when a button is clicked, you have to use 'lambda' in tkinter. >>global hgt #command with parameters...

[issue12029] Catching virtual subclasses in except clauses

2015-10-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: Does this introduce a slowdown when the type doesn't match? That is, clearly George's example: try: {}["a"] except KeyError: pass won't be slowed because the fast path will get an immediate hit. But what about: try:

  1   2   >