[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2015-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What are your thoughts about the patch Terry? -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue23775] Fix pprint of OrderedDict

2015-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Berker. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue23776] Don't use assert for checking arguments in pprint

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: -Python 2.7, Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue23776] Don't use assert for checking arguments in pprint

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue23775] Fix pprint of OrderedDict

2015-03-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset afc21da5935f by Serhiy Storchaka in branch 'default': Issue #23775: pprint() of OrderedDict now outputs the same representation https://hg.python.org/cpython/rev/afc21da5935f -- nosy: +python-dev ___ Pyth

[issue23776] Don't use assert for checking arguments in pprint

2015-03-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset bf570ff87c60 by Serhiy Storchaka in branch 'default': Issue #23776: Removed asserts from pprint.PrettyPrinter constructor. https://hg.python.org/cpython/rev/bf570ff87c60 -- nosy: +python-dev ___ Python tr

[issue4944] os.fsync() doesn't work as expect in Windows

2015-03-25 Thread Emil Styrke
Emil Styrke added the comment: I have experienced this issue with Python 2.7.8 and 2.7.9. It is almost the same issue as the OP experiences as far as I can tell: spawn some Python threads that each create a file, flush, fsync, close, then start a subprocess which uses the file through the Win

[issue23765] Remove IsBadStringPtr calls in ctypes

2015-03-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 339d90983e29 by Steve Dower in branch 'default': Issue #23765: Removed IsBadStringPtr calls in ctypes https://hg.python.org/cpython/rev/339d90983e29 -- ___ Python tracker

[issue23765] Remove IsBadStringPtr calls in ctypes

2015-03-25 Thread Steve Dower
Steve Dower added the comment: Ah okay, I understand better what your suggestion was trying to achieve now. I agree, we should just show the address in repr - I'll make that change to both c_char_p and c_wchar_p. -- ___ Python tracker

[issue23159] argparse: Provide equivalent of optparse.OptionParser.{option_groups, option_list, get_option}

2015-03-25 Thread Eric McDonald
Eric McDonald added the comment: @paul.j3, thanks for the sample code for argparse extension. I agree that subclassing is a way to go for use in third-party projects. But, if someone ever wanted to add an abstraction layer in front of argparse.ArgumentParser and configparser.ConfigParser in th

[issue22931] cookies with square brackets in value

2015-03-25 Thread Demian Brecht
Demian Brecht added the comment: As I understand it, the change should also be applied to security releases as the regression manifested by a security related patch being applied. That said, there may be some debate as there apparently isn't much (if anything) in the way of precedence here.

[issue23743] Python crashes upon exit if importing g++ compiled mod after importing gcc compiled mod

2015-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: pypa.io hosts the internal dev docs for PyPA, I believe you meant packaging.python.org, and that would indeed be the right home. However, this kind of C/C++ linker related problem is way too advanced for the current state of the binary extension docs which basic

[issue23764] Reference inspect.Signature.bind from functools.wraps documentation

2015-03-25 Thread productivememberofsociety666
productivememberofsociety666 added the comment: Sorry, did not mean to change the Components and Versions thingies... -- components: +Documentation -Library (Lib) versions: +Python 3.4 ___ Python tracker __

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-25 Thread Martin Panter
Martin Panter added the comment: Josiah’s code now seems to handle the four special cases like this: * Reading a closed pipe raises BrokenPipeError. This is novel to me, and bends the current definition of the exception. But it appears to be the way Windows works at a lower level, and does mak

[issue23764] Reference inspect.Signature.bind from functools.wraps documentation

2015-03-25 Thread productivememberofsociety666
productivememberofsociety666 added the comment: Sounds good! I think the docs on functools.wraps already list precisely which data is updated, but maybe mentioning explicitly that it can not affect the argspec could indeed make it clearer. Either way, thank you for your help! -- compon

[issue23529] Limit decompressed data when reading from LZMAFile and BZ2File

2015-03-25 Thread Nikolaus Rath
Nikolaus Rath added the comment: Except for the pointless 'myfileobj' stuff in gzip.py, rev 8 of the patch looks good to me. (Btw, I'm not actually in favor of e.g. the seekable() change. The previous patch was intended as a proof-of-concept to see what would be necessary to inherit more from

[issue23764] Reference inspect.Signature.bind from functools.wraps documentation

2015-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, unfortunately, on closer inspection, even partial itself ends up suffering from the same problem as the current inspect.wraps - validation ultimately happens at the point of calling the original wrapper function, so if you don't actually call it, you won't g

[issue23764] Accept a separate "call_target" parameter to functools.partial

2015-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: Well, there's an expected keyboard shortcut (accidentally hitting Shift-Enter submits the page...) Anyway, the idea I came up with after looking at that is potentially adjusting functools.partial to accept a "call_target" parameter, which would allow it to *cla

[issue23764] Accept a separate "target

2015-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: Right, I started asking myself the same question, and then began poking around in the functools.partial implementation (https://hg.python.org/cpython/file/9be2405385ec/Modules/_functoolsmodule.c#l12) -- resolution: not a bug -> stage: resolved -> statu

[issue23764] functools.wraps should be able to change function argspec as well

2015-03-25 Thread productivememberofsociety666
productivememberofsociety666 added the comment: def wrapper(func): return functools.wraps(func)(functools.partial(func)) ^ doesn't that just return something that is completely equivalent to func itself? Where do I put the actual wrapper functionality, i.e. code that is executed with each

[issue23764] functools.wraps should be able to change function argspec as well

2015-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: Full example showing the functools.partial based implementation: >>> def wrapper(func): ... return functools.wraps(func)(functools.partial(func)) ... >>> def to_be_wrapped(x): ... pass ...

[issue23764] functools.wraps should be able to change function argspec as well

2015-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: Backport proposal: https://github.com/aliles/funcsigs/issues/12 -- ___ Python tracker ___ ___ Python-b

[issue23764] functools.wraps should be able to change function argspec as well

2015-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: Regarding the PyPI decorator module, the difference there is between using a "def f(*args, **kwargs)" wrapper (which requires following wrapper chains to read the signature correctly) and using functools.partial (which reports the correct surface signature direc

[issue23764] functools.wraps should be able to change function argspec as well

2015-03-25 Thread productivememberofsociety666
productivememberofsociety666 added the comment: You're probably right and it's next to impossible to implement what I want in a clean manner. I'll get back to that at the end, but first for completeness's sake two examples to illustrate what this issue is even about. import functools de

[issue23764] functools.wraps should be able to change function argspec as well

2015-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: I double checked the current behaviour, and rediscovered something I had forgotten: when inspect.getargspec and inspect.getfullargspec were converted to be based on the inspect.signature machinery, we had to decide whether or not to follow wrapper chains to repo

[issue23765] Remove IsBadStringPtr calls in ctypes

2015-03-25 Thread eryksun
eryksun added the comment: > So the repr that's there for c_char_p is currently:: >"%s(%s)" % (self.__class__.__name__, cast(self, c_void_p).value) I suggested switching to using from_buffer: c_void_p.from_buffer(self).value from_buffer is more efficient. cast() is imlemented as an FF

[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-03-25 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-03-25 Thread Eric V. Smith
Changes by Eric V. Smith : -- stage: -> test needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue2211] Cookie.Morsel interface needs update

2015-03-25 Thread Demian Brecht
Demian Brecht added the comment: Updated patch should address review comments. I did run with David's suggestion as I also noticed that my initial assessment was wrong (thanks for the note/review Berker). -- Added file: http://bugs.python.org/file38695/http_cookies_morsel_deprecated_s

[issue23775] Fix pprint of OrderedDict

2015-03-25 Thread Berker Peksag
Berker Peksag added the comment: LGTM. Added minor comments on Rietveld. -- nosy: +berker.peksag stage: patch review -> commit review ___ Python tracker ___ _

[issue23765] Remove IsBadStringPtr calls in ctypes

2015-03-25 Thread Steve Dower
Steve Dower added the comment: So the repr that's there for c_char_p is currently:: "%s(%s)" % (self.__class__.__name__, cast(self, c_void_p).value) But if I remove the override then it renders the value as b'abc'. Basically, we can have one of: >>> from ctypes import * >>> cast(create_st

[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-03-25 Thread Craig Holmquist
New submission from Craig Holmquist: If the authenticator object passed to the IMAP authenticate method tries to abort the handshake by returning None, TypeError is raised instead of sending the * line to the server. >>> import imaplib >>> imap = imaplib.IMAP4_SSL('imap.gmail.com') >>> imap.au

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-25 Thread STINNER Victor
STINNER Victor added the comment: Returning None for non blocking I/O is standard in Python. -- ___ Python tracker ___ ___ Python-bu

[issue433028] SRE: (?flag:...) is not supported

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file38693/re_scoped_flags_2.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue433028] SRE: (?flag:...) is not supported

2015-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated to the tip. Could anyone please help with documentation? -- ___ Python tracker ___ ___ P

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-25 Thread Akira Li
Akira Li added the comment: > I'm going to be honest; seeing None being returned from a pipe read feels > *really* broken to me. When I get None returned from an IO read operation, my > first instinct is "there can't be anything else coming, why else would it > return None?" It is how it is d

[issue22364] Improve some re error messages using regex for hints

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue22364] Improve some re error messages using regex for hints

2015-03-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 068365acbe73 by Serhiy Storchaka in branch 'default': Issue #22364: Improved some re error messages using regex for hints. https://hg.python.org/cpython/rev/068365acbe73 -- nosy: +python-dev ___ Python tr

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch for UserDict, that keep current behavior, but allows to pass keys "self" and "dict" if positional parameter dict is specified. >>> UserDict(self=42) {'self': 42} >>> UserDict({}, dict=42) {'dict': 42} >>> UserDict(dict={'a': 42}) {'a': 42} --

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-25 Thread Josiah Carlson
Josiah Carlson added the comment: I'm going to be honest; seeing None being returned from a pipe read feels *really* broken to me. When I get None returned from an IO read operation, my first instinct is "there can't be anything else coming, why else would it return None?" After changing writ

[issue17305] IDNA2008 encoding missing

2015-03-25 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list maili

[issue23546] Windows, 'Edit withIDLE', and multiple installed versions

2015-03-25 Thread Liam Marsh
Liam Marsh added the comment: thank you for all this hard work. really. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue8800] add threading.RWLock

2015-03-25 Thread Dan O'Reilly
Changes by Dan O'Reilly : -- nosy: +dan.oreilly ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue23487] argparse: add_subparsers 'action' broken

2015-03-25 Thread paul j3
paul j3 added the comment: As to the nature of the error when 'add_subparsers' is given an 'action' parameter: 'add_subparsers' does several things to 'kwargs' before it passes them to the relevant Action class. def add_subparsers(self, **kwargs): # adds 'parser_class' #

[issue23778] Add a visual distinction to multiline versionchanged blocks

2015-03-25 Thread Demian Brecht
Demian Brecht added the comment: Sounds good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue23778] Add a visual distinction to multiline versionchanged blocks

2015-03-25 Thread R. David Murray
R. David Murray added the comment: Yes, exactly, they are supposed to be terse. So I think we should reject this. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue2211] Cookie.Morsel interface needs update

2015-03-25 Thread Berker Peksag
Berker Peksag added the comment: I think David's suggestion in msg239260 was good enough for now :) You'll need to create a custom versionchanged directive to generate a valid and semantic markup for the usage in http_cookies_morsel_deprecated_set_2.patch. I also left a couple comments on Riet

[issue22931] cookies with square brackets in value

2015-03-25 Thread Tim Graham
Tim Graham added the comment: Will this regression be fixed in Python 2.7, 3.2, and 3.3? If not, Django may need to vendor Python's cookie class to workaround this bug to prevent users from losing sessions and/or being unable to login to Django powered sites as reported in https://code.djangop

[issue23487] argparse: add_subparsers 'action' broken

2015-03-25 Thread paul j3
Changes by paul j3 : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker ___ ___ Python-bugs

[issue23778] Add a visual distinction to multiline versionchanged blocks

2015-03-25 Thread Demian Brecht
Demian Brecht added the comment: I noted in #2211 that nested lists are supported by Sphinx, so that solves that specific issue. Perhaps it /may/ still be useful to have this though in order to support multiple paragraphs for more detailed change descriptions when needed? That said, I'm not su

[issue2211] Cookie.Morsel interface needs update

2015-03-25 Thread Demian Brecht
Demian Brecht added the comment: Problem (pretty much) solved. Nested unordered lists are supported. I've updated the versionchanged information to use the list. -- Added file: http://bugs.python.org/file38690/http_cookies_morsel_deprecated_set_2.patch

[issue23487] argparse: add_subparsers 'action' broken

2015-03-25 Thread paul j3
paul j3 added the comment: OK, so you are thinking about what happens to the subparsers `dest` when the user names a command. That isn't handled by the `store` action, but by the call of the subparsers action class _SubParsersAction(Action): def __call__

[issue21319] WindowsRegistryFinder never added to sys.meta_path

2015-03-25 Thread Tim Golden
Tim Golden added the comment: Adding Mark Hammond in case I'm wrong about the (lack of) impact on pywin32 -- nosy: +mhammond ___ Python tracker ___ __

[issue21319] WindowsRegistryFinder never added to sys.meta_path

2015-03-25 Thread Tim Golden
Tim Golden added the comment: I think they stopped using them a while back in favour of a pywin32.pth file. I don't think I even knew you could use the registry for sys.path. If no-one's shouted since the changes to importlib (which was 3.3?) I think we can quietly drop this and hope no-one not

[issue23743] Python crashes upon exit if importing g++ compiled mod after importing gcc compiled mod

2015-03-25 Thread Steve Dower
Steve Dower added the comment: I think these days as soon as a repro includes "import distutils" or "import setuptools" the docs go straight to http://pypa.io :) -- nosy: +ncoghlan ___ Python tracker _

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-25 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: No; you need the CPython tip. You can use https://github.com/python/cpython. Other than that, it's the configure+make thing. As I said before, the pyconfig.h changes aren't there yet. Trying to figure out how I want to approach those. -- _

[issue23778] Add a visual distinction to multiline versionchanged blocks

2015-03-25 Thread R. David Murray
R. David Murray added the comment: Heh, you clearly know more about docutils/css than I do. I don't think we want multiple blank delimited paragraphs under a versionchanged directive, though, from a style point of view. A compact unordered list would be best. -- nosy: +georg.brandl,

[issue2211] Cookie.Morsel interface needs update

2015-03-25 Thread Demian Brecht
Demian Brecht added the comment: FWIW, I created #23778 to address the indentation issue. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue23778] Add a visual distinction to multiline versionchanged blocks

2015-03-25 Thread Demian Brecht
New submission from Demian Brecht: This came up during #2211, where a multiline versionchanged entry was suggested. Currently, there is no visual distinction between any but the first line of the description and the rest of the body of the docs. The attached patch adds a consistent level of in

[issue2211] Cookie.Morsel interface needs update

2015-03-25 Thread R. David Murray
R. David Murray added the comment: The body of the versionchanged has to be a single paragraph (no blank lines). Usually we start each sentence on a newline in the source, but it comes out rendered as a single flowed paragraph. Perhaps eventually someone will add support to Sphinx for unorde

[issue2211] Cookie.Morsel interface needs update

2015-03-25 Thread Demian Brecht
Demian Brecht added the comment: > it would be better to consolidate the three adjacent versionchanged entries > into one I created the three versionchanged items because there's no visual distinction between the second and third lines and the rest of the doc tests in the rendered output. I'v

[issue23742] expandvars removes single quotes ( ' )

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue23742] expandvars removes single quotes ( ' )

2015-03-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f4d2bdced9c by Serhiy Storchaka in branch '2.7': Issue #23742: ntpath.expandvars() no longer loses unbalanced single quotes. https://hg.python.org/cpython/rev/9f4d2bdced9c New changeset 613c4bd1c29c by Serhiy Storchaka in branch '3.4': Issue #23742

[issue23774] Test failures when unable to write to install location

2015-03-25 Thread R. David Murray
R. David Murray added the comment: We need a buildbot that runs tests on an installed python. The general problem is not windows-only. -- nosy: +r.david.murray ___ Python tracker _

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-25 Thread Cyd Haselton
Cyd Haselton added the comment: Ryan, >From where do you want me to download Python for testing? I'm assuming I need to test by a) downloading an unpatched 3.4.2, b) applying patches, c) running ./configure && make && make install.. If this is not correct let me know -- __

[issue23743] Python crashes upon exit if importing g++ compiled mod after importing gcc compiled mod

2015-03-25 Thread R. David Murray
R. David Murray added the comment: Well, clearly you are the interested party that solved it :) Thanks. Unfortunately I don't know that we have a place where this could be documented, since currently mingw isn't a fully supported platform. Perhaps in the distutils docs somewhere? --

[issue23764] functools.wraps should be able to change function argspec as well

2015-03-25 Thread R. David Murray
R. David Murray added the comment: I think you need to explain exactly what it is you are looking for, because it doesn't seem to me that you can change the argspec of a function. What is it that decorator is doing that is helpful? -- ___ Python tr

[issue23766] json.dumps: solidus ("/") should be escaped

2015-03-25 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> json encoder does not support JSONP/JavaScript safe escaping ___ Python tracker _

[issue23712] Experiment: Assume that exact unicode hashes are perfect discriminators

2015-03-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I wouldn't make this the default, since the probability is small, but not zero. However, it may be worth exploring this as dict sub-type for applications to use which could benefit from it. For internal strings, we already use interning, so no win there. T

[issue23773] importlib does not properly remove frames when invoking external import hooks

2015-03-25 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue23712] Experiment: Assume that exact unicode hashes are perfect discriminators

2015-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In case of class or module dicts attribute names usually are interned. So no string comparison is needed if the key is found. It is needed only when the key is not found, but found a key with the same hash (with the chance 5e-28). The benefit of optimization

[issue23764] functools.wraps should be able to change function argspec as well

2015-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: Correctly processing a function's signature involves following the __wrapped__ chains to get to the underlying callable (or to a callable that defines an explicitly modified __signature__ value). inspect.signature follows these chains automatically, and in 3.4+

[issue23765] Remove IsBadStringPtr calls in ctypes

2015-03-25 Thread Steve Dower
Steve Dower added the comment: Thanks, I forgot to scan .py files. -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-li

[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2015-03-25 Thread Bob
Bob added the comment: What I see is that structs lager that 8 bytes are not passed correctly to a callback funtion. I've attached a patchfile that includes my fix and a test to demonstrate the problem. -- Added file: http://bugs.python.org/file38687/large_struct_callback.patch _

[issue23487] argparse: add_subparsers 'action' broken

2015-03-25 Thread SpaceOne
SpaceOne added the comment: In replay to msg238931 from paul j3 (paul.j3) * > And specifying something other than the default 'store' action class for the > arguments of the parsers doesn't make sense. Of course it makes sense. If you e.g. want the action to be 'append' so that the subparser-na

[issue23487] argparse: add_subparsers 'action' broken

2015-03-25 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag, spaceone ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue23777] argparse subcommand action can't be specified

2015-03-25 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. This is a duplicate of issue 23487. -- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> argparse: add_subparsers 'action' broken type: crash -> behavior _

[issue23777] argparse subcommand action can't be specified

2015-03-25 Thread SpaceOne
New submission from SpaceOne: parser.add_subparsers(dest='arguments', action='append') will raise the following exception: File "/usr/lib/python2.7/argparse.py", line 1675, in add_subparsers action = parsers_class(option_strings=[], **kwargs) TypeError: __init__() got an unexpected keyword

[issue23775] Fix pprint of OrderedDict

2015-03-25 Thread Alexei Romanov
Changes by Alexei Romanov : -- nosy: +alexei.romanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue23529] Limit decompressed data when reading from LZMAFile and BZ2File

2015-03-25 Thread Martin Panter
Martin Panter added the comment: Another behaviour change in v7 is the seekable() return value is now inherited from underlying file, instead of always being True. I mentioned on Reitveld why this could be a bad idea, but as it is undocumented and untested and will leave the new behaviour unle

[issue23776] Don't use assert for checking arguments in pprint

2015-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Similar issues are issue8361 and issue17840. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue23776] Don't use assert for checking arguments in pprint

2015-03-25 Thread Berker Peksag
Berker Peksag added the comment: Looks good. Two things: * I'd apply this only to the default branch. Changing exceptions from AssertionError to ValueError in bugfix releases may break third party code. I couldn't find a similar bug report in the tracker, so it's probably not worth to take th

[issue23712] Experiment: Assume that exact unicode hashes are perfect discriminators

2015-03-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Given interned strings can already be compared by pointer, I'd recommend people call sys.intern() on their strings if they want really fast equality comparisons. -- nosy: +pitrou, tim.peters ___ Python tracker

[issue23776] Don't use assert for checking arguments in pprint

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file38685/pprint_args_check.patch ___ Python tracker ___

[issue23776] Don't use assert for checking arguments in pprint

2015-03-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The assert statement should be used only for checking internal logic, and not for checking user data. These assertions should be either removed or converted into explicit raising ValueError. -- components: Library (Lib) messages: 239241 nosy: fdrak

[issue21319] WindowsRegistryFinder never added to sys.meta_path

2015-03-25 Thread Paul Moore
Paul Moore added the comment: I think the main (only?) user of having sys.path entries in the registry is pywin32. It might be worth asking them if they can switch to a more mainstream approach, and then maybe the whole registry finder thing can be removed completely. -- nosy: +paul.m

[issue23765] Remove IsBadStringPtr calls in ctypes

2015-03-25 Thread eryksun
eryksun added the comment: c_char_p.__repr__ (defined in __init__.py) also checks IsBadStringPtrA via FFI. Defining the repr differently on Windows is a wart, IMO. The following repr should be used on all platforms for c_char_p: "%s(%s)" % (self.__class__.__name__, c_void

[issue23769] valgrind reports leaks for test_zipimport

2015-03-25 Thread Robert Kuska
Robert Kuska added the comment: I tried leak2.py with valgrind, I've uncommented the lines you mentioned. > $ valgrind python3 leak2.py > >

[issue23774] Test failures when unable to write to install location

2015-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a guard for zipfile tests (requiresWriteAccess). The question is why it doesn't work for this test but works for other tests. -- nosy: +serhiy.storchaka ___ Python tracker

[issue20181] Derby #12: Convert 50 sites to Argument Clinic across 4 files

2015-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The only difference is in error message. For now: >>> unicodedata.name(123) Traceback (most recent call last): File "", line 1, in TypeError: must be str, not int >>> unicodedata.name('123') Traceback (most recent call last): File "", line 1, in TypeErr

[issue21717] Exclusive mode for ZipFile and TarFile

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue21717] Exclusive mode for ZipFile and TarFile

2015-03-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset b2a8c30d8ddb by Serhiy Storchaka in branch 'default': Issue #21717: The zipfile.ZipFile.open function now supports 'x' (exclusive https://hg.python.org/cpython/rev/b2a8c30d8ddb -- ___ Python tracker

[issue23775] Fix pprint of OrderedDict

2015-03-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently pprint prints the repr of OrderedDict if it fits in one line, and prints the repr of dict if it is wrapped. >>> import collections, pprint >>> pprint.pprint(collections.OrderedDict([(4, 3), (2, 1)])) OrderedDict([(4, 3), (2, 1)]) >>> pprint.pprint

[issue23763] Chain exceptions in C

2015-03-25 Thread STINNER Victor
STINNER Victor added the comment: Le mercredi 25 mars 2015, Serhiy Storchaka a écrit : > > I think it would be safer to defer automatically chaining exceptions to > 3.6. After releasing 3.5 we can got reports about exceptions ignored by > mistake. > Hum, what change can ignore exceptions by mis

[issue20181] Derby #12: Convert 50 sites to Argument Clinic across 4 files

2015-03-25 Thread Larry Hastings
Larry Hastings added the comment: I read it quickly. It looks basically okay, but I have one issue to discuss right now. Changing from the format unit 'O!' and calling "getuchar" to the format unit 'C' means a change in semantics. The text in the exception will change. Unfortunately, peopl

[issue21717] Exclusive mode for ZipFile and TarFile

2015-03-25 Thread Berker Peksag
Berker Peksag added the comment: LGTM. I left two minor comments on Rietveld. Sorry for the delay. -- stage: patch review -> commit review ___ Python tracker ___