[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2016-08-18 Thread Xiang Zhang
Xiang Zhang added the comment: David, issue2466_ismount_py2.7_port.patch does the py2.7 port. I also back port other ismount test cases not existing in py2.7. -- nosy: +xiang.zhang Added file: http://bugs.python.org/file44145/issue2466_ismount_py2.7_port.patch

[issue22021] shutil.make_archive() root_dir do not work

2016-08-18 Thread bananaapple
bananaapple added the comment: Hello Berker Peksag, 1. For now, I realize the comment of David. This is not a bug of make_archive() implementation. However, I think documentation is not clear to understand at the first time reading it. Maybe it should be rephrased. 2. Actually, what I am

[issue22021] shutil.make_archive() root_dir do not work

2016-08-18 Thread Berker Peksag
Changes by Berker Peksag : -- versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___

[issue27598] Add SizedIterable to collections.abc and typing

2016-08-18 Thread Neil Girdhar
Neil Girdhar added the comment: Great patch. Shouldn't Sequence be a "Reversible, Collection"? -- ___ Python tracker ___

[issue22021] shutil.make_archive() root_dir do not work

2016-08-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agree with David, this is working as designed (and matching the behavior of say "tar -C"). But the documentation is not clear if not confusing. -- nosy: +serhiy.storchaka ___ Python tracker

[issue22021] shutil.make_archive() root_dir do not work

2016-08-18 Thread Berker Peksag
Berker Peksag added the comment: Hi bananaapple, there are two things that need to be addressed: 1. We need to decide whether this is a bug in make_archive() implementation or not. See msg223572 and msg223668 for details. I personally agree with David's analysis in msg223668. We can rephrase

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-18 Thread Vedran Čačić
Vedran Čačić added the comment: I don't think the problem is with (Auto)Enum at all. Problem is in a different place, and this is just a symptom. Problem is that people make too many assumptions about `class` suite. Yes, type is default metaclass. But not every class should be constructed by

[issue27598] Add SizedIterable to collections.abc and typing

2016-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: LGTM, but I'm on vacation through Monday. -- ___ Python tracker ___ ___

[issue22021] shutil.make_archive() root_dir do not work

2016-08-18 Thread bananaapple
bananaapple added the comment: Or, Is there anything I could help? I am glad to help fixing this issue. -- ___ Python tracker ___

[issue22021] shutil.make_archive() root_dir do not work

2016-08-18 Thread bananaapple
bananaapple added the comment: Sorry to bother. But This patch is still not accepted. I still suffer this issue. Is anyone willing to review this patch? Thanks -- nosy: +bananaapple ___ Python tracker

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

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

[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2016-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset dd0f1fa809c5 by R David Murray in branch 'default': Rewrap long lines in Misc/NEWS. https://hg.python.org/cpython/rev/dd0f1fa809c5 -- ___ Python tracker

[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2016-08-18 Thread R. David Murray
R. David Murray added the comment: Thanks, Robin. The patch doesn't apply on 2.7. I'll leave this open to see if anyone wants to do the 2.7 port. -- nosy: +r.david.murray stage: commit review -> needs patch versions: -Python 3.5, Python 3.6 ___

[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2016-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset cbc78ca21977 by R David Murray in branch '3.5': #2466: ismount now recognizes mount points user can't access. https://hg.python.org/cpython/rev/cbc78ca21977 New changeset db9126139969 by R David Murray in branch 'default': Merge: #2466: ismount now

[issue27598] Add SizedIterable to collections.abc and typing

2016-08-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I submit a simple solution in line with __subclasshook__ of other ABCs. I added several tests, it looks like it is doing everything right. Please review. -- keywords: +patch Added file: http://bugs.python.org/file44144/collection.diff

[issue26944] android: test_posix fails

2016-08-18 Thread R. David Murray
Changes by R. David Murray : -- stage: commit review -> patch review ___ Python tracker ___

[issue26944] android: test_posix fails

2016-08-18 Thread R. David Murray
R. David Murray added the comment: Haypo: we are testing that our function wrapper (getgroups) returns something that we can parse as matching the results from the 'id' command. This gives us a much more meaningful test than just testing that getgroups returns *something*. That is, we are

[issue27731] Opt-out of MAX_PATH on Windows 10

2016-08-18 Thread Eryk Sun
Eryk Sun added the comment: > anything running under the python.exe will get it for free. py.exe may as well get the manifest setting, but it's not critical. It isn't common to store scripts in deeply nested paths. The same goes for the distlib launchers that pip uses for entry points since

[issue12713] argparse: allow abbreviation of sub commands by users

2016-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 97b28115bd08 by Vinay Sajip in branch 'default': Closes #12713: Allowed abbreviation of subcommands in argparse. https://hg.python.org/cpython/rev/97b28115bd08 -- nosy: +python-dev resolution: -> fixed stage: test needed -> resolved

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-18 Thread John Hagen
John Hagen added the comment: Ethan, thank you so much for all of your work. Looking forward to any future collaboration. -- ___ Python tracker ___

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-18 Thread Ethan Furman
Ethan Furman added the comment: Thank you, Raymond, David, Barry, John, etc. for your feedback. While I really like AutoEnum I can see that that much magic doesn't need to exist in the stdlib. Unfortunately, the alternatives aren't very pretty, so I'll leave the AutoNumberEnum as a recipe in

[issue27796] Expose DirEntry constructor

2016-08-18 Thread Brendan Moloney
New submission from Brendan Moloney: As per a discussion on python-ideas [1], the consensus is that we should allow users to create a DirEntry object themselves. This would just take a path and call stat on it and cache the result of that stat call. Nick Coghlan mentioned possibly allowing a

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-18 Thread Sylvain Corlay
Sylvain Corlay added the comment: Any chance to get this in for 3.6? -- ___ Python tracker ___ ___

[issue27731] Opt-out of MAX_PATH on Windows 10

2016-08-18 Thread Steve Dower
Steve Dower added the comment: > Will it apply to third-party C extensions loaded into Python? Yes, anything running under the python.exe will get it for free. (Non-standard entry points will need to add the flag themselves.) -- ___ Python tracker

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-08-18 Thread Guido van Rossum
Changes by Guido van Rossum : -- stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue27731] Opt-out of MAX_PATH on Windows 10

2016-08-18 Thread STINNER Victor
STINNER Victor added the comment: Steve Dower added the comment: > No, the flag that we add to the binary is backwards compatible. Earlier versions will just ignore it. Cool. -- ___ Python tracker

[issue26488] hashlib command line interface

2016-08-18 Thread STINNER Victor
STINNER Victor added the comment: > There are so many existing tools that already do this I don't really see why Python needs to become yet another one. What is the value in doing this? Portability. You described UNIX. There is no such tool by default on Windows for example (as Avid said).

[issue13516] Gzip old log files in rotating handlers

2016-08-18 Thread Mark Grandi
Mark Grandi added the comment: While I will say that is slightly easier than subclassing, it still requires a function, or a variation of that to be present in every project that wants to have a RotatingHandler + compression, and extra lines if you use logging.config.dictConfig, as you will

[issue26984] int() can return not exact int instance

2016-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: > Could you please make a review Mark? Sorry, Serhiy. I missed this. I've got some time off coming up, so I plan to look at this in the next few days. -- ___ Python tracker

[issue26488] hashlib command line interface

2016-08-18 Thread Aviv Palivoda
Aviv Palivoda added the comment: The use case that made me think about this feature was when I was working on a Windows PC and needed to calculate an md5 of a file. I agree that in a unix environment there are existing tools but on windows you usually don't have them. --

[issue26488] hashlib command line interface

2016-08-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: There are so many existing tools that already do this I don't really see why Python needs to become yet another one. What is the value in doing this? Just use the openssl command. "openssl sha256 myfile" Or any of the md5sum, sha1sum and other plethora

[issue27731] Opt-out of MAX_PATH on Windows 10

2016-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is great! Will it apply to third-party C extensions loaded into Python? -- nosy: +pitrou ___ Python tracker ___

[issue25785] TimedRotatingFileHandler missing rotations

2016-08-18 Thread Vinay Sajip
Changes by Vinay Sajip : -- stage: -> resolved status: pending -> closed ___ Python tracker ___

[issue26488] hashlib command line interface

2016-08-18 Thread Aviv Palivoda
Aviv Palivoda added the comment: Hi, is there anything more I need to do on this patch? If not do you think this can be added in 3.6? -- ___ Python tracker

[issue24905] Allow incremental I/O to blobs in sqlite3

2016-08-18 Thread Aviv Palivoda
Aviv Palivoda added the comment: Thanks for the review Serhiy. Attached is the updated patch after the changes. -- Added file: http://bugs.python.org/file44142/blob2.patch ___ Python tracker

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-08-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: On my machine 8 tests are always skipped: test_devpoll test_kqueue test_msilib test_ossaudiodev test_startfile test_winreg test_winsound test_zipfile64 All others tests pass OK. The main part of the work is by Andrew Barnert, I only introduced small

[issue13516] Gzip old log files in rotating handlers

2016-08-18 Thread Vinay Sajip
Vinay Sajip added the comment: You don't need a subclass - you can specify your own function to do it, as in the cookbook example: https://docs.python.org/3/howto/logging-cookbook.html#using-a-rotator-and-namer-to-customize-log-rotation-processing --

[issue13516] Gzip old log files in rotating handlers

2016-08-18 Thread Mark Grandi
Mark Grandi added the comment: I just ran into this myself, and would challenge the notion that just because few people complain about the fact that built in compression isn't built in for logging handlers (such as TimedRotatingFileHandler), that it isn't a needed feature. This is such a

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: Pushed, let's see what the buildbots say. -- resolution: -> fixed stage: patch review -> commit review ___ Python tracker

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 72b9f195569c by Guido van Rossum in branch 'default': Anti-registration of various ABC methods. https://hg.python.org/cpython/rev/72b9f195569c -- nosy: +python-dev ___ Python tracker

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-18 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-18 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your work too! ;) I agree to close. -- ___ Python tracker ___ ___

[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-18 Thread STINNER Victor
STINNER Victor added the comment: issue27587_pystate_addmodule_v2.diff LGTM. -- ___ Python tracker ___ ___

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-18 Thread STINNER Victor
STINNER Victor added the comment: Thanks Xiang Zhang. The fix is obvious and simple, but it wasn't easy to identify it ;-) I pushed the fix to Python 3.5 and default (3.6). Python 2.7 doesn't crash, the bare "raise" statement raises the exception: TypeError('exceptions must be old-style

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset ba45fbb16499 by Victor Stinner in branch '3.5': Fix SystemError in "raise" statement https://hg.python.org/cpython/rev/ba45fbb16499 -- nosy: +python-dev ___ Python tracker

[issue27792] bool % int has inconsistent return type.

2016-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: FWIW, I'd suggest not changing this in 3.5; only in 3.6. It's a fairly harmless bug that's been with us throughout the 3.x series so far (and even back into 2.x, if you start looking at behaviour with subclasses of `long`). --

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: The patch LGTM. Do all the tests pass? Who should be attributed in the commit message and the Misc/NEWS item? -- ___ Python tracker

[issue27792] bool % int has inconsistent return type.

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

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Ethan, the suggestion has come up several times about using a dummy value such as the empty tuple to do autonumbering, thus looking more Pythonic. I'm not a huge fan of the empty tuple, and I'm still not sure whether we need this, but I wonder if it would

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Temporarily, marking this as open so that more people can see the new comments. For John, I'm not sure what I can say that will help you. The goal of the standard libraries modules is to provide tools the use language we have, not to invent a new language

[issue27598] Add SizedIterable to collections.abc and typing

2016-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: I thought about this some more. It won't work because when a class method is called via super(), 'cls' is still set to the derived class (and in general for class methods that's the right thing to do, just as it is for regular methods that self is still the

[issue27598] Add SizedIterable to collections.abc and typing

2016-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: Why don't you give it a try? I'd be happy to review a patch from you. -- ___ Python tracker ___

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2016-08-18 Thread Antti Haapala
Antti Haapala added the comment: Unfortunately it seems that it is not that straightforward. The descriptor object doesn't know the name of the property. The error is raised in `property_descr_set`. However the error itself can be propagated from setting another property. --

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2016-08-18 Thread Emanuel Barry
Emanuel Barry added the comment: The approach I'd take would be to change how {get,set,del}attr handle AttributeError; possibly by automatically filling in the information and giving a nicer error message. This would fix this as a side-effect (somewhat; some bits of code would need to

[issue27795] Cygwin compile errors

2016-08-18 Thread R. David Murray
R. David Murray added the comment: Yes, we know :( There are a lot of issues in this tracker about mingw and cygwin. If you can help review them, that would be fantastic. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2016-08-18 Thread R. David Murray
R. David Murray added the comment: If someone submits a patch in time, we'd probably accept it. -- nosy: +r.david.murray ___ Python tracker ___

[issue27793] Double underscore variables in module are mangled when used in class

2016-08-18 Thread R. David Murray
R. David Murray added the comment: This is working as designed (https://docs.python.org/3/tutorial/classes.html#private-variables): "This mangling is done without regard to the syntactic position of the identifier, as long as it occurs within the definition of a class." If you want to

[issue27795] Cygwin compile errors

2016-08-18 Thread Kaeptm Blaubaer
New submission from Kaeptm Blaubaer: If I try to compile Python 3.5 with Cygwin, I get a lot of errors. -- components: Build, Windows messages: 273031 nosy: Kaeptm Blaubaer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Cygwin

[issue27792] bool % int has inconsistent return type.

2016-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, it looks as though this is already fixed in master, and it's probably not worth fixing for 3.5. Closing. -- status: open -> closed ___ Python tracker

[issue27792] bool % int has inconsistent return type.

2016-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: Whoops; no, it's not fixed. 3.6 introduced a fast path that has the side-effect of fixing this issue for the `True % 2` case, but not for all cases: >>> False % 2 False >>> True % 2 1 >>> class MyInt(int): pass ... >>> type(MyInt(0) % 6) >>> type(MyInt(1) %

[issue27727] Update Tools/freeze to use .vcxproj files

2016-08-18 Thread Kaeptm Blaubaer
Kaeptm Blaubaer added the comment: That's right, in checkextensions_win32.py a .vcxproj parsing algorithm must be added, and in extensions_win32.ini the values must be updated, for example the builtin extensions from .dsp to .vcxproj -- versions: +Python 3.4, Python 3.5

[issue27792] bool % int has inconsistent return type.

2016-08-18 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> out of date ___ Python tracker ___ ___

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2016-08-18 Thread Antti Haapala
New submission from Antti Haapala: Today we had an internal server error in production. I went to see the sentry logs for the error, and was dismayed: the error was `AttributeError: can't set attribute`, and the faulting line was `setattr(obj, attr, value)` that happens in a for-loop that

[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-18 Thread Berker Peksag
Berker Peksag added the comment: Here is an updated patch. -- Added file: http://bugs.python.org/file44141/issue27587_pystate_addmodule_v2.diff ___ Python tracker

[issue27776] PEP 524: Make os.urandom() blocking on Linux

2016-08-18 Thread Nick Coghlan
Nick Coghlan added the comment: I have a few requests for clarification and confirmation as review comments, but overall +1 from me. (I'd still like a warning when we need to block in order to make life easier for system administrators attempting to debug any apparent system hangs, but as

[issue27793] Double underscore variables in module are mangled when used in class

2016-08-18 Thread avraf
New submission from avraf: import re __no_spaces_pattern = r'\S+' __match_chars_until_space = re.compile(__no_spaces_pattern).match __match_chars_from_last_space = re.compile(__no_spaces_pattern + '$').match def __get_chars_until_space(name): return

[issue27778] PEP 524: Add os.getrandom()

2016-08-18 Thread Nick Coghlan
Nick Coghlan added the comment: Given docs (with the Linux-only platform support disclaimer), +1 for this as an initial implementation. Providing it on Solaris as well can be a separate patch, but it's less important there (since /dev/urandom and os.urandom() are already blocking APIs)

[issue27573] code.interact() should print an exit message

2016-08-18 Thread Armin Rigo
Armin Rigo added the comment: ...ah, upon closer inspection, we don't use the ``interact()`` method anyway. We already copied and tweaked this method: one problem was that it gives no way to run without printing at least one '\n' of banner at the beginning. Then a more important tweak was

[issue27573] code.interact() should print an exit message

2016-08-18 Thread Armin Rigo
Armin Rigo added the comment: I'm fine with `exitmsg`. I guess it would be a flag (not `None` as you wrote), defaulting to `True`? -- ___ Python tracker

[issue27792] bool % int has inconsistent return type.

2016-08-18 Thread Mark Dickinson
New submission from Mark Dickinson: Seen on reddit [1]: >>> True % 1 0 >>> True % 2 True I believe that we should be returning an int in both these cases; this looks like a longobject.c fast path gone wrong. [1]

[issue26984] int() can return not exact int instance

2016-08-18 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___

[issue27573] code.interact() should print an exit message

2016-08-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Thu, Aug 18, 2016 at 08:19:25AM +, Armin Rigo wrote: > Can we make the exit message optional? Sure. What API do you prefer? I'm thinking to just give interact() an optional "exitmsg" argument, similar to banner: def interact(banner=None,

[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-08-18 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your review, Victor. I have addressed most of your remarks. * algset() is now called sendmsg_afalg(). It behaves more like a specialized version of sendmsg() and can optionally handle an array of iovec. * I had to add another variant of

[issue27746] ResourceWarnings in test_asyncio

2016-08-18 Thread Xiang Zhang
Xiang Zhang added the comment: >From my observations, this is due to transport is forgotten to close in >test_connect_accepted_socket. Upload a patch to add the close function. -- keywords: +patch nosy: +xiang.zhang Added file: http://bugs.python.org/file44139/issue27746.patch

[issue27573] code.interact() should print an exit message

2016-08-18 Thread Armin Rigo
Armin Rigo added the comment: Can we make the exit message optional? Otherwise PyPy will need to patch code.py to add the option to not display this message when used as the normal REPL (yes, PyPy uses the plain code.py as its built-in REPL). -- nosy: +arigo

[issue27749] multprocessing errors on Windows: WriteFile() argument 1 must be int, not None; OSError: handle is closed

2016-08-18 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list

[issue16764] Make zlib accept keyword-arguments

2016-08-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Serhiy, the message added in Misc/NEWS should be in Library section not Core > and Builtins section. Done. And addressed Victor's reasonable comment. Thanks! -- ___ Python tracker

[issue27506] make bytes/bytearray translate's delete a keyword argument

2016-08-18 Thread Xiang Zhang
Xiang Zhang added the comment: Martin, I write the v3 patch to apply the comments. It preserves *table* as mandatory and move the test_translate to BaseBytesTest to remove duplicates. -- title: make bytes/bytearray delete a keyword argument -> make bytes/bytearray translate's delete a

[issue16764] Make zlib accept keyword-arguments

2016-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset ab0039b8a80e by Serhiy Storchaka in branch 'default': Issue #16764: Move NEWS entry to correct section and remove too strict test. https://hg.python.org/cpython/rev/ab0039b8a80e -- ___ Python tracker

[issue27598] Add SizedIterable to collections.abc and typing

2016-08-18 Thread Neil Girdhar
Neil Girdhar added the comment: @gvanrossum is there any reason that subclasshook is implemented by overriding instead of cooperation? E.g.,: class Sized(metaclass=ABCMeta): @classmethod def __subclasshook__(cls, C): return (super().__subclasshook__(C) and