[issue13824] argparse.FileType opens a file and never closes it

2013-09-15 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue11708] argparse: suggestion for formatting optional positional args

2013-09-15 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue19015] Too long command returns 32512

2013-09-15 Thread Sworddragon
Sworddragon added the comment: I have figured out that system() in C can only take up to 65533 arguments after a command (so it is a 16 bit issue). Giving one more argument will result in the return code 32512 (which implies the exit code 127). -- resolution: -> invalid status: open -

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-15 Thread Nick Coghlan
Nick Coghlan added the comment: types is the OO equivalent to functools these days, in addition to its original role of exposing the internal type objects that aren't builtins. However, it seems to me that the fix for issue 1785 is simply *wrong*: it eliminated the exceptions at the expense of

[issue19029] tix.py uses StringType

2013-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I guess this code executed only when wantobjects is false. -- ___ Python tracker ___ ___ Python-bu

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > My vote is no separators. But I'm just one vote :) Seconded. -- ___ Python tracker ___ ___ Pyt

[issue19025] Deleting attribute of Enum gives misleading error message

2013-09-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch containing unit test only to confirm existing behaviour. So people can learn what to expect when they delete Enum attributes. Even if we *decide* to change the behaviour of "del MyPet.CUTE_CAT" (assuming CUTE_CAT is an Enum member), I sense tha

[issue19030] Make inspect.getmembers and inspect.classify_class_attrs Enum aware

2013-09-15 Thread Ethan Furman
Ethan Furman added the comment: Here's a crazy idea. :) The only reason the patch is tied to Enum is because of Enum's use of the _RouteClassAttributeToGetattr descriptor. If we had a module similar to functools, say classtools, we could flesh out _RouteClassAttributeToGetattr, rename it to

[issue18844] allow weights in random.choice

2013-09-15 Thread Madison May
Madison May added the comment: > I think Storchaka's solution is more transparent and I agree with him on the > point that the choice generator should be exposed. Valid point -- transparency should be priority #1 -- ___ Python tracker

[issue18844] allow weights in random.choice

2013-09-15 Thread Westley Martínez
Westley Martínez added the comment: I think Storchaka's solution is more transparent and I agree with him on the point that the choice generator should be exposed. -- ___ Python tracker ___

[issue19033] Python 3 won't go on PC-BSD 9.1

2013-09-15 Thread Robert M. Koretsky
New submission from Robert M. Koretsky: I use the instructions in the README file that gets unzipped with Python-3.0.tgz to install on PC-BSD 9.1 ./configure, make, make test, sudo make install and it does not work! Error messages too verbose to include here. My path includes the directory that

[issue19024] Document asterisk (*), splat or star operator

2013-09-15 Thread Madison May
Madison May added the comment: http://docs.python.org/3/tutorial/controlflow.html#arbitrary-argument-lists http://docs.python.org/3/tutorial/controlflow.html#unpacking-argument-lists The above links do a so-so of explaining the splat operator, although I agree that the docs for '*' could be im

[issue18844] allow weights in random.choice

2013-09-15 Thread Madison May
Madison May added the comment: Serhiy, from a technical standpoint, your latest patch looks like a solid solution. From an module design standpoint we still have a few options to think through, though. What if random.weighted_choice_generator was moved to random.choice_generator and refactore

[issue19024] Document asterisk (*), splat or star operator

2013-09-15 Thread Georg Brandl
Changes by Georg Brandl : -- Removed message: http://bugs.python.org/msg197774 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue19030] Make inspect.getmembers and inspect.classify_class_attrs Enum aware

2013-09-15 Thread Ethan Furman
Ethan Furman added the comment: I do not see one. I did post to PyDev asking about dir -- perhaps I should have given it a different title. -- ___ Python tracker ___ __

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-09-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for catching the mistake at _randbelow. Updated patch to fix that and removed the explanation in the docstring. Not sure if _randbelow should changed (fully) or not at all. Leaving the change only with _int. Will wait for Raymond's review. -- A

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-09-15 Thread Georg Brandl
Georg Brandl added the comment: I wouldn't add info about the optimization in the docstring. In _randbelow() I think you missed a call to int(). For _randbelow(), all arguments after "int" are non-public ones. (_randbelow as a private function wouldn't necessarily need the change, but it's good

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-15 Thread R. David Murray
R. David Murray added the comment: My vote is no separators. But I'm just one vote :) -- ___ Python tracker ___ ___ Python-bugs-list

[issue19030] Make inspect.getmembers and inspect.classify_class_attrs Enum aware

2013-09-15 Thread R. David Murray
R. David Murray added the comment: So the real problem is that inspect depends on dir? Isn't there already a bug open for that issue? -- ___ Python tracker ___

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-09-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: Attaching a patch after changing int=int to _int = int and improving the docstring. Please review the changes to the docstring and see if it will be helpful. -- status: closed -> pending Added file: http://bugs.python.org/file31788/14927.diff ___

[issue19030] Make inspect.getmembers and inspect.classify_class_attrs Enum aware

2013-09-15 Thread Ethan Furman
Ethan Furman added the comment: R David Murray said: > >Special casing Enum in inspect has a code smell to it. I agree, and I'm certainly open to other options. The flow at this point is: help() --> inspect.classify_class_attrs --> dir() --> Enum.__dir__ Because inspect relies on dir and En

[issue19030] Make inspect.getmembers and inspect.classify_class_attrs Enum aware

2013-09-15 Thread Ethan Furman
Ethan Furman added the comment: Attached patch yields these results: === Help on class Test in module __main__: class Test(enum.Enum) | Method resolution order: | Test | enum.Enum | builtins.

[issue19030] Make inspect.getmembers and inspect.classify_class_attrs Enum aware

2013-09-15 Thread R. David Murray
R. David Murray added the comment: Special casing Enum in inspect has a code smell to it. There may not be a better option, but it sure feels ugly. -- nosy: +r.david.murray ___ Python tracker

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-15 Thread Jakub Stasiak
Jakub Stasiak added the comment: Antoine: I agree that it does look weird to have thousands separators at one place and not at the other but IMO it's still slightly better - the number formatted with separators is simply more readable that separator-less one. R. David Murray: what's the accept

[issue18857] urlencode of a None value uses the string 'None'

2013-09-15 Thread R. David Murray
R. David Murray added the comment: Thank you for working on the patches, Claudiu, but... The backward compatibility concern is valid. Furthermore, I did a bunch of googling looking for examples. I did not turn up any examples of APIs that were documented to use parameters without '='...all t

[issue19032] __reduce_ex__ on lock object

2013-09-15 Thread Ram Rachum
New submission from Ram Rachum: >>> import threading >>> l = threading.Lock() >>> l.__reduce_ex__(3) (, (,), None, None, None) Isn't it a bug that `__reduce_ex__` works on the non-pickleable lock object? -- components: Library (Lib) messages: 197850 nosy:

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-09-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: Tim Peters added the comment: > ..., _fast=slow, ... > > in an argument list means we endure the slow lookup (of `slow`) only > once, when the function is first defined. When the function is > _called_, that binding is available via the local (much faster

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-09-15 Thread Tim Peters
Tim Peters added the comment: [Senthil Kumaran] > I am unaware of the optimization technique you refer to as > well, it will helpful if you could point to any resource. It's an old trick since the very first Pythons: global lookups are much slower than local lookups (the difference between the

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-09-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: > Georg Brandl added the comment: > > I would propose a leading underscore for these methods; they should make it > clear to the user that the parameter is meant to be "private". +1 to this proposal. This style is present with randrange, randbelow and shuffle.

[issue18693] help() not helpful with enum

2013-09-15 Thread Ethan Furman
Ethan Furman added the comment: Tracking inspect in issue19030. Tracking help in issue19031. -- ___ Python tracker ___ ___ Python-bug

[issue19031] Make help() enum aware

2013-09-15 Thread Ethan Furman
New submission from Ethan Furman: Currently, if help() is called on an Enum member, it displays help for the class. While this is usually what one wants, it is not for Enums. -- messages: 197845 nosy: barry, eli.bendersky, ethan.furman priority: normal severity: normal status: open tit

[issue19030] Make inspect.getmembers and inspect.classify_class_attrs Enum aware

2013-09-15 Thread Ethan Furman
New submission from Ethan Furman: Due to the odd nature of Enum classes and instances, the normal methods used by inspect.getmembers and inspect.classify_class_attrs are insufficient. By special casing Enum inside those two functions the correct information can be returned. Here is an example

[issue18693] help() not helpful with enum

2013-09-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 353ced6ae182 by Ethan Furman in branch 'default': Close #18693: Enum is now more help() friendly. http://hg.python.org/cpython/rev/353ced6ae182 -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed __

[issue18693] help() not helpful with enum

2013-09-15 Thread Ethan Furman
Ethan Furman added the comment: Two issues still remain: - custom behavior, as well as value and name, don't show in help - value and name, if defined as enum members, show up as data descriptors in help ==

[issue18307] Relative path in co_filename for zipped modules

2013-09-15 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue19029] tix.py uses StringType

2013-09-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am slightly surprised no one has complained about a NameError. I guess tix is untested and not used too much, or at least not the two methods, tixCommand.tix_configure and TixWidget.config_all. Anyway, do it. --

[issue12558] Locale-dependent exception for float width argument to Tkinter widget constructor

2013-09-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Perhaps we can fix it on the Python side. When self.tk is called with a configuration cnf, cnf is often (always?) first passed to Misc._options, as in BaseWidget.__init__: self.tk.call( (widgetName, self._w) + extra + self._options(cnf)) Mi

[issue18857] urlencode of a None value uses the string 'None'

2013-09-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: The patch looks good, but I have doubt in the claim that, this new behavior is actually a right thing to do. RDM wrote: Now, that said, it seems to me that while it is not (apparently) RFC compliant, query strings do have a natural way to support null values

[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2013-09-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 100606ef02cf by Andrew Kuchling in branch 'default': #1565525: Add traceback.clear_frames() helper function to clear locals ref'd by a traceback http://hg.python.org/cpython/rev/100606ef02cf -- nosy: +python-dev ___

[issue18771] Reduce the cost of hash collisions for set objects

2013-09-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9353c611f897 by Raymond Hettinger in branch 'default': Issue 18771: Make it possible to set the number linear probes at compile-time. http://hg.python.org/cpython/rev/9353c611f897 -- ___ Python tracker <

[issue18515] zipfile._ZipDecryptor generates wasteful crc32 table on import

2013-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I meant my pure Python patch in issue10030. Binding crctable to local variable is one of microoptimizations. Not the largest one however. So in general I not objects. Your patch LGTM. Only one nitpick -- instead "not _ZipDecrypter.crctable" use "_ZipDecrypte

[issue18857] urlencode of a None value uses the string 'None'

2013-09-15 Thread Claudiu.Popa
Claudiu.Popa added the comment: Added patch for parse_qsl as well. -- Added file: http://bugs.python.org/file31785/urllib_null_value.patch ___ Python tracker ___

[issue19029] tix.py uses StringType

2013-09-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Lib/tkinter/tix.py uses the StringType name which is not defined. This is a remnant from 2.x where the StringType type was imported from the types module. In 3.x it gone and was replaced by str in Lib/tkinter/__init__.py. The proposed patch fixes it also i

[issue19028] tkinter.tkapp.merge() fails on non-strings

2013-09-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: tkinter.tkapp.merge() recursively merge Python data into Tcl string. When a subitem neither tuple, string or byte string, it calls str() on it. But then it use PyBytes_AsString() which always fails because accepts bytes instead of str. The proposed patch f

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread R. David Murray
R. David Murray added the comment: Yes, you did :) I was using "permissions check" to cover both tests, since as you say, if the file is owned by someone other than the user running the processes, a user other than the one running the process has permission to modify it. posix->POSIX fixed i

[issue18857] urlencode of a None value uses the string 'None'

2013-09-15 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hello. I attached a simple patch for the urlencode case. I'll try to make one for parse_qs(l) as well. -- keywords: +patch nosy: +Claudiu.Popa Added file: http://bugs.python.org/file31782/urllib.patch ___ Python tracke

[issue18307] Relative path in co_filename for zipped modules

2013-09-15 Thread Vitaly Murashev
Vitaly Murashev added the comment: patch suggested (over 3.3.0 code base). Without patch test fails, with patch - passed -- components: -Library (Lib) keywords: +patch Added file: http://bugs.python.org/file31781/zipimport.diff ___ Python tracker

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread R. David Murray
Changes by R. David Murray : Added file: http://bugs.python.org/file31780/netrc-2.6.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread R. David Murray
Changes by R. David Murray : Removed file: http://bugs.python.org/file31779/netrc-2.6.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: @RDM: In netrc.rst, s/posix/POSIX/ It also looks like you're keeping the ownership test. Did I misunderstand msg197815? I thought you were only going to keep the permission test? -- ___ Python tracker

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread R. David Murray
R. David Murray added the comment: Here is an updated patch, with docs and test. Turns out it actually wasn't necessary to move the check to the password, but I'm leaving it that way anyway. The reason it wasn't necessary is that we don't actually parse the .netrc file correctly: we require t

[issue16038] ftplib: unlimited readline() from connection

2013-09-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: == FAIL: test_retrlines_too_long (__main__.TestFTPClass) -- Traceback (most recent call last): File "Lib/test/test_ftplib.py

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2013-09-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fix backported to 3.1, closing. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2013-09-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset c39f42f46a05 by Georg Brandl in branch '3.1': Fix tkinter regression introduced by the security fix in #16248. http://hg.python.org/cpython/rev/c39f42f46a05 -- ___ Python tracker

[issue18515] zipfile._ZipDecryptor generates wasteful crc32 table on import

2013-09-15 Thread Daniel Holth
Daniel Holth added the comment: I am withdrawing zipfile-no-crc32.patch. It did not work correctly. zdlazy.patch should go in. It avoids creating the rarely-needed crc32 table until the first time it is needed, saving some memory and the majority of time needed to import the module. zdlazy.p

[issue16039] imaplib: unlimited readline() from connection

2013-09-15 Thread A.M. Kuchling
A.M. Kuchling added the comment: Updated version of the patch against 2.6 that adds a test. Thanks for the fix, Emil! -- nosy: +akuchling Added file: http://bugs.python.org/file31778/imaplib.txt ___ Python tracker

[issue16043] xmlrpc: gzip_decode has unlimited read()

2013-09-15 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- versions: +Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue16042] smtplib: unlimited readline() from connection

2013-09-15 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- versions: +Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mail

[issue16041] poplib: unlimited readline() from connection

2013-09-15 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +barry priority: critical -> release blocker versions: +Python 2.6, Python 3.1 ___ Python tracker ___ __

[issue16040] nntplib: unlimited readline() from connection

2013-09-15 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- versions: +Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mail

[issue16039] imaplib: unlimited readline() from connection

2013-09-15 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- versions: +Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mail

[issue16038] ftplib: unlimited readline() from connection

2013-09-15 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- versions: +Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mail

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: FWIW, the Ubuntu manpage netrc(5) says: password string Supply a password. If this token is present, the auto-login process will supply the specified string if the remote server requires a password as part of t

[issue16037] httplib: header parsing is not unlimited

2013-09-15 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- title: httplib: header parsing is not delimited -> httplib: header parsing is not unlimited versions: +Python 3.1 ___ Python tracker

[issue19027] undefined symbol: _PyParser_Grammar

2013-09-15 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue18989] reuse of enum names in class creation inconsistent

2013-09-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 54ddd1124df8 by Ethan Furman in branch 'default': Close #18989: enum members will no longer overwrite other attributes, nor be overwritten by them. http://hg.python.org/cpython/rev/54ddd1124df8 -- nosy: +python-dev resolution: -> fixed sta

[issue13888] test_builtin failure when run after test_tk

2013-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is due PyOS_InputHook. After commenting out EnableEventHook() tests are passed. -- nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- versions: +Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue18989] reuse of enum names in class creation inconsistent

2013-09-15 Thread Ethan Furman
Ethan Furman added the comment: As David noted, this was discussed somewhere in the megathreads that was the Enum PEP discussion. As Georg noted changes to such a thoroughly discussed API should not be taken lightly. As Antoine noted the Enum class is more restricted than normal classes by d

[issue4636] bdist_wininst installer with install script raises exception

2013-09-15 Thread Dan Nicholson
Dan Nicholson added the comment: Right, that's what makes this difficult. If the stub exe of the target python was used, then it wouldn't need to care about compatibility. However, what you're running is the stub of the build python. So, when I distribute a bdist_wininst exe, it's running the

[issue16038] ftplib: unlimited readline() from connection

2013-09-15 Thread A.M. Kuchling
A.M. Kuchling added the comment: 2.6 version of the patch. Changes from Giampaolo's version of the patch: * 2.6 didn't have FTP over TLS, so the patch changes slightly to adapt. * Removed the LineTooLong exception class and just raise Error instead. (This repeats the message text for "Line t

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-09-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: After further contemplation and without objection from __ap__ and Crys on IRC, I am de-targeting this for 2.6. I won't apply it for 2.6.9. -- versions: -Python 2.6 ___ Python tracker

[issue18998] iter() not working in ElementTree

2013-09-15 Thread Eli Bendersky
Changes by Eli Bendersky : -- resolution: -> works for me stage: test needed -> committed/rejected status: open -> closed ___ Python tracker ___

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread R. David Murray
R. David Murray added the comment: Hmm. Answering the doc question caused me to run into something that calls the whole patch into question: http://www.unix.com/unix-dummies-questions-answers/11326-netrc-refuses-password.html. In that example, the ftp program only rejected reading the p

[issue18945] Name collision handling in tempfile is not covered by tests

2013-09-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa54069eb8c4 by Eli Bendersky in branch '2.7': Close #18945: Add tests for tempfile name collision handling. http://hg.python.org/cpython/rev/fa54069eb8c4 -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> clos

[issue19026] OrderedDict should not accept dict as parameter

2013-09-15 Thread anatoly techtonik
anatoly techtonik added the comment: On Sun, Sep 15, 2013 at 9:25 PM, Raymond Hettinger wrote: > > In general, it is not possible for a hypothetical StrictOrderedDict to know > whether its input was ordered or not. Right. That's why it should not accept input that can only be unordered (includ

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 15, 2013, at 06:51 PM, R. David Murray wrote: >I could write a 2.6 test for the permissions part, but not for the incorrect >owner part. Do you want one without the other? Yeah, I guess you can't mock os or stat in 2.6. ;) Let's test the permission pa

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread R. David Murray
R. David Murray added the comment: I could write a 2.6 test for the permissions part, but not for the incorrect owner part. Do you want one without the other? -- ___ Python tracker ___

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread R. David Murray
R. David Murray added the comment: Here is a 2.6 specific patch. I've hand tested this. -- keywords: +patch Added file: http://bugs.python.org/file31776/netrc-2.6.patch ___ Python tracker _

[issue16042] smtplib: unlimited readline() from connection

2013-09-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 15, 2013, at 05:34 PM, Serhiy Storchaka wrote: >Oh, right. The correct code should be as I proposed in msg173413 or... as >Andrew has committed. Good. Excellent. So we're good for this in 2.6. Thanks! -- _

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +benjamin.peterson, georg.brandl, larry priority: high -> release blocker ___ Python tracker ___ ___

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 15, 2013, at 06:05 PM, R. David Murray wrote: >For the security fix, the check should only be done if the file is the the >default .netrc. (Which would also make your error message >correct...otherwise it is not :) Also, it would make more sense for the

[issue18594] C accelerator for collections.Counter is slow

2013-09-15 Thread Anoop Thomas Mathew
Anoop Thomas Mathew added the comment: Performance comparison with and without patch applied. -- Added file: http://bugs.python.org/file31775/performance_comparision.csv ___ Python tracker _

[issue18594] C accelerator for collections.Counter is slow

2013-09-15 Thread Anoop Thomas Mathew
Anoop Thomas Mathew added the comment: 40% faster collections.Counter() . Removed C accelerator. Patch attached. Passes all tests. Results comparison follows. -- keywords: +patch nosy: +Anoop.Thomas.Mathew Added file: http://bugs.python.org/file31774/collections_Counter_without_C_accel

[issue19026] OrderedDict should not accept dict as parameter

2013-09-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: In general, it is not possible for a hypothetical StrictOrderedDict to know whether its input was ordered or not. For the specific case of dict, it is possible, but the general case is of course completely general (i.e. if the input has a keys() method, th

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread R. David Murray
R. David Murray added the comment: Note that I'll test it by hand before applying, and will write a test for 3.3 (where Mock is available to make testing practical). -- ___ Python tracker _

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-15 Thread R. David Murray
R. David Murray added the comment: For the security fix, the check should only be done if the file is the the default .netrc. (Which would also make your error message correct...otherwise it is not :) Also, it would make more sense for the 'prop =' to be inside the 'if posix'. Barry, with t

[issue19025] Deleting attribute of Enum gives misleading error message

2013-09-15 Thread Ethan Furman
Ethan Furman added the comment: As for the error messages (going in reverse order): == --> del cute_cat.name Traceback (most recent call last): ... AttributeError: can't delete attribute =

[issue19025] Deleting attribute of Enum gives misleading error message

2013-09-15 Thread Ethan Furman
Ethan Furman added the comment: Perhaps a section in the docs about the differences from typical Python classes is warranted: - Enum members are virtual - Enum members are singletons - new Enum members (aka instances of an Enum class) cannot be created - during class creation Enum membe

[issue19026] OrderedDict should not accept dict as parameter

2013-09-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue16042] smtplib: unlimited readline() from connection

2013-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Also, what do you mean by "readline(0) is blocked"? Do you mean this is a > blocking call or something else? Yes, I mean this is a blocking call. > Unless I'm missing something his replacement also has a bug, though: it won't > add the \n to the returned

[issue16042] smtplib: unlimited readline() from connection

2013-09-15 Thread A.M. Kuchling
A.M. Kuchling added the comment: I took Serhiy's suggestion and just moved up the 'if size' check in the loop. -- ___ Python tracker ___ _

[issue19026] OrderedDict should not accept dict as parameter

2013-09-15 Thread anatoly techtonik
anatoly techtonik added the comment: Is it possible to make strict OrderedDict an optional feature? Like `from features import strict_ordered_dict'? -- status: closed -> pending ___ Python tracker

[issue19027] undefined symbol: _PyParser_Grammar

2013-09-15 Thread Armin Rigo
New submission from Armin Rigo: It is possible to get the working copy of Python 2.7 in a state such that any attempt to do "make" ends with the error shown in the title. The working copy is perfectly valid; it is a matter of getting the wrong timestamps on the files. (Despite the error messa

[issue16042] smtplib: unlimited readline() from connection

2013-09-15 Thread R. David Murray
R. David Murray added the comment: I'm not sure what Serhiy means by "is blocked", but the second half makes sense: readline(0) on a file will return the empty string, but here it will read one character and return it. Like he says, it doesn't break anything in the context of this bug fix, bu

[issue19026] OrderedDict should not accept dict as parameter

2013-09-15 Thread anatoly techtonik
anatoly techtonik added the comment: I don't know if it is bug or feature. There are probably cases when order is not important and OrderedDict is used, but I don't remember any. Too bad Python doesn't have first class ordered mapping type, so that it could report error if unordered arguments

[issue16042] smtplib: unlimited readline() from connection

2013-09-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8a6def3add5b by Andrew Kuchling in branch '2.6': #16042: CVE-2013-1752: Limit amount of data read by limiting the call to readline(). http://hg.python.org/cpython/rev/8a6def3add5b -- nosy: +python-dev __

[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

2013-09-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm removing 2.6 from the Versions field since AFAIK we've resolved this issue for 2.6. This way it'll be easier to scan the blockers for 2.6.9. If anyone things we still have things to address for this issue in 2.6.9, please reassign it or follow up. -

[issue16042] smtplib: unlimited readline() from connection

2013-09-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 15, 2013, at 04:47 PM, Serhiy Storchaka wrote: >It is not important in the context of this issue, but readline(0) is blocked >and returns 1-character string. Move the length check above >self.sslobj.read(1). For readability you can also move the chr != "

  1   2   >