[issue24252] IDLE removes elements from tracebacks.

2015-05-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: The two additional entries are the last two. In this case, they are needed because KeyError pertains to the dict lookup in the last line "self.breaks[filename]". Mistaken in this particular case or not, the deletion is intentional. Run.print_exception has th

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-21 Thread Nick Coghlan
Nick Coghlan added the comment: Why the switch to WriteUnraisable? Unlike __del__ methods and similar operations that may be invoked at arbitrary points, there's nothing stopping us from emitting an exception here - indeed, we're *already* handling an exception. Getting a hard failure on depre

[issue24257] Incorrect use of PyObject_IsInstance

2015-05-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyObject_IsInstance() is used incorrectly for testing if Python object is an instance of specified builtin type before direct access to internals of object. This is not correct, because PyObject_IsInstance() checks the __class__ attribute that can be modif

[issue24250] Optimization for strcpy(..., "") in file 'install.c'

2015-05-21 Thread Paul Moore
Paul Moore added the comment: The patch looks fine to me, although I don't think you need the comment showing the old code. The new code is perfectly clear on its own. -- nosy: +paul.moore ___ Python tracker _

[issue24115] Unhandled error results of C API functions

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch adds handling of error results of following functions: PyObject_IsTrue(), PyObject_Not(), PyObject_IsInstance(), PyObject_RichCompareBool(), _PyDict_Contains(). All these functions usually return 0 or 1, but also can return -1 in the case of e

[issue24180] PEP 492: Documentation

2015-05-21 Thread Nick Coghlan
Nick Coghlan added the comment: Patch looks worth merging to me. Some minor questions/quibbles: Asynchronous iterator question: should the typical pattern for those be: def __aiter__(self): return self def __await__(self): return self "Did we put the ABC's in the right

[issue24258] BZ2File objects do not have name attribute

2015-05-21 Thread Jozef Sivek
New submission from Jozef Sivek: Unlike GzipFile the BZ2File does not have defined name attribute. The reading of this attribute results in: "AttributeError: 'BZ2File' object has no attribute 'name'". This is truly missing feature and wrong behaviour, compare: https://hg.python.org/releasing/3

[issue24256] threading.Timer is not a class

2015-05-21 Thread John Runyon
John Runyon added the comment: Concise documentation isn't my forte, but my confusion would've been avoided with a note that "for historical reasons, threading.Timer is actually a factory function for the underlying class threading._Timer" or something along those lines. -- _

[issue24250] Optimization for strcpy(..., "") in file 'install.c'

2015-05-21 Thread Martin Panter
Martin Panter added the comment: For the record, the file being patched is PC/bdist_wininst/install.c My opinion is the original is more readable, and unless this is some inner loop bottleneck here it seems like premature optimization. -- nosy: +vadmium ___

[issue22955] Pickling of methodcaller, attrgetter, and itemgetter

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2688655e431a by Serhiy Storchaka in branch 'default': Issue #22955: Fixed reference leak in attrgetter.repr(). https://hg.python.org/cpython/rev/2688655e431a -- ___ Python tracker

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-05-21 Thread Martin Panter
Martin Panter added the comment: I left some new comments. However I remain concerned at how complicated and overloaded the API is becoming. It certainly makes it hard to review for correctness. I could easily have missed some corner case that is broken by the changes. There are a lot of odd

[issue24250] Optimization for strcpy(..., "") in file 'install.c'

2015-05-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- priority: normal -> low stage: -> patch review versions: +Python 3.5 -Python 3.4 ___ Python tracker ___

[issue23699] Add a macro to ease writing rich comparisons

2015-05-21 Thread Stefan Krah
Stefan Krah added the comment: NotImplemented is a non-error return value that's used when the objects cannot be compared, e.g. when the function receives Py_LT but the objects are unorderable. Getting a value outside {Py_EQ, ...} is a hard error that cannot occur in a correct program.

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: Thanks for looking into this, Ned. I've changed that size_t to ssize_t which I expect will quiet that clang warning you saw. I'm glad you pointed it out because it means that that branch was never executing! Unfortunately fixing that does not solve all my proble

[issue24255] Replace debuglevel-related logic with logging

2015-05-21 Thread R. David Murray
R. David Murray added the comment: +1 -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-05-21 Thread Rolf Krahl
Rolf Krahl added the comment: Hi again, first of all, sorry for not contributing to the discussion for such a long time. I was quite busy lately. I tested the patch with Python 3.5.0a3. It works nicely for my use case. Thanks a lot! I have one issue though: urllib's HTTPHandler and HTTPSH

[issue24257] Incorrect use of PyObject_IsInstance

2015-05-21 Thread R. David Murray
R. David Murray added the comment: Is there any chance that these changes will break working code, or is it the case that if the current check passes incorrectly one will always get a segfauilt or other error? -- nosy: +r.david.murray ___ Python tra

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: Cool. The following gives consistent failures at certain seed values: for i in `seq 1 100`; do echo $i; PYTHONHASHSEED=$i ./python -m test.regrtest -m test_basic test_configparser ; done Through 100 I get segfaults with 7, 15, 35, 37, 39, 40, 42, 47, 50, 66, 67,

[issue24257] Incorrect use of PyObject_IsInstance

2015-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > is it the case that if the current check passes incorrectly > one will always get a segfauilt or other error? Yes, that is the case. All four of these checks precede a reference to an structure member that depends on being an exact type or subtype. So,

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-21 Thread Thomas Güttler
New submission from Thomas Güttler: The Python tarfile library does not detect a broken tar. user@host$ wc -c good.tar 143360 good.tar user@host$ head -c 13 good.tar > cut.tar user@host$ tar -tf cut.tar ... tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now Very ni

[issue24257] Incorrect use of PyObject_IsInstance

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it is the case that if the current check passes incorrectly one will always get a segfauilt or other error. Added tests for types.SimpleNamespace and sqlite3.Cursor. It is not easy to reproduce a bug for StopIterator (not sure it is reproducible), but t

[issue24180] PEP 492: Documentation

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 548d5704fcb3 by Yury Selivanov in branch 'default': Issue 24180: Documentation for PEP 492 changes. https://hg.python.org/cpython/rev/548d5704fcb3 -- nosy: +python-dev ___ Python tracker

[issue24180] PEP 492: Documentation

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks for the review Nick. I committed the patch with some additional minor fixes, including your suggestion. > Asynchronous iterator question: should the typical pattern for those be: def __aiter__(self): return self def __await__(self):

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset ff983ee10b3e by Yury Selivanov in branch 'default': Issue 24017: Use abc.Coroutine in inspect.iscoroutine() function https://hg.python.org/cpython/rev/ff983ee10b3e -- ___ Python tracker

[issue23863] Fix EINTR Socket Module issues in 2.7

2015-05-21 Thread Jeff McNeil
Jeff McNeil added the comment: Do we have a decision on this yet? I'm willing to rework bits that may need it, but I'd like to know whether this is going to be a fruitful effort or not. Thanks! -- ___ Python tracker

[issue23780] Surprising behaviour when passing list to os.path.join.

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

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: > Why the switch to WriteUnraisable? After adding a unittest for the patch it became clear that it was indeed unnecessary ;) Please see the new patch. -- Added file: http://bugs.python.org/file39454/gen_stop_warn.patch ___

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2015-05-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: michael.foord -> serhiy.storchaka versions: +Python 2.7 ___ Python tracker ___ ___ Python-b

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-05-21 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the report Rolf. I'll look into your suggestion for this patch. Antoine: Given beta is slated for the 24th and Martin's legitimate concerns, I think it might be a little hasty to get this in before feature freeze. Knocking it back to 3.6 (obviously f

[issue24255] Replace debuglevel-related logic with logging

2015-05-21 Thread Demian Brecht
Changes by Demian Brecht : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue24223] argparse parsing (mingling --option and optional positional argument)

2015-05-21 Thread Bob Alexander
Bob Alexander added the comment: Thanks for the note, Martin. I agree that it's a duplicate. (I had done a brief search for possible dups, but didn't find that one!) Bob On Sun, May 17, 2015 at 8:29 PM, Martin Panter wrote: > > Martin Panter added the comment: > > I suggest this is a duplicat

[issue23699] Add a macro to ease writing rich comparisons

2015-05-21 Thread Petr Viktorin
Petr Viktorin added the comment: Here is a version with PyErr_BadArgument. -- Added file: http://bugs.python.org/file39455/richcompare-macro-badargument.patch ___ Python tracker

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 84d7ec21cc43 by Serhiy Storchaka in branch 'default': Issue #15836: assertRaises(), assertRaisesRegex(), assertWarns() and https://hg.python.org/cpython/rev/84d7ec21cc43 -- nosy: +python-dev ___ Python tr

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Applied to 3.5 only, because this issue looks rather as new feature (preventing possible user error) and there is minimal chance to break existing tests (see issue24134). -- type: behavior -> enhancement versions: -Python 2.7, Python 3.4 __

[issue24254] Make class definition namespace ordered by default

2015-05-21 Thread Eric Snow
Eric Snow added the comment: Here's a patch that drops adding __definition_order__. You can get the same effect by adding `__definition_order__ = list(locals())` at the bottom of your class definition. The benefit of having `__definition_order__` is that the information is automatically avai

[issue23985] Crash when deleting slices from duplicated bytearray

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 274c1b0a2494 by Serhiy Storchaka in branch '2.7': Issue #23985: Fixed integer overflow in iterator object. Original patch by https://hg.python.org/cpython/rev/274c1b0a2494 New changeset 5b86a1abc8c3 by Serhiy Storchaka in branch '3.4': Issue #23985

[issue22939] integer overflow in iterator object

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset d6179accca20 by Serhiy Storchaka in branch '2.7': Fixed issue number for issue #22939. https://hg.python.org/cpython/rev/d6179accca20 New changeset 7fa2f4afcf5a by Serhiy Storchaka in branch '3.4': Fixed issue number for issue #22939. https://hg.pyt

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

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

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Daniel. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue22939] integer overflow in iterator object

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Clement. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker _

[issue23985] Crash when deleting slices from duplicated bytearray

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, it was related to issue22939. -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, I've updated the patch to address all PendingDeprecationWarnings related to the PEP 479 in the test suite. -- Added file: http://bugs.python.org/file39457/gen_stop_warn.patch ___ Python tracker

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread Tim Golden
Tim Golden added the comment: Tests failed on Windows probably because of NamedTemporaryFile -- nosy: +tim.golden ___ Python tracker ___ _

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread arachnegl
arachnegl added the comment: Thanks Tim for testing on Windows and suggesting the change. -- nosy: +gregorylo...@gmail.com versions: +Python 3.4 Added file: http://bugs.python.org/file39458/test_turtle.patch ___ Python tracker

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread Tim Golden
Tim Golden added the comment: @RDM I'm sitting with Greg at a London Python session and we've run through these tests on 3.4/3.5. I know you were reviewing this code at PyCon. Are you happy for me to commit from here? -- ___ Python tracker

[issue20438] inspect: Deprecate getfullargspec?

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Please see the new patch. So it's time to deprecate getargspec with a warning (was softly deprecated in 3.0). getfullargspec() and getcallargs() deprecation is documented. I also want to deprecate formatargspec() and formatargvalues(), but Signature does not

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm making a review. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailin

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread R. David Murray
R. David Murray added the comment: Yes, I don't need to be involved further (unless you need help from me on something :) -- ___ Python tracker ___ _

[issue24056] Expose closure & generator status in function repr()

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, Berker, please find an updated patch attached (with support for coroutines). Big +1 on the idea, BTW. -- Added file: http://bugs.python.org/file39460/issue24056_2.diff ___ Python tracker

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread Tim Golden
Tim Golden added the comment: Serhiy's offered a review and we can take it from here. :) -- ___ Python tracker ___ ___ Python-bugs-lis

[issue24004] avoid explicit generator type check in asyncio

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: This issue was resolved in https://github.com/python/asyncio/commit/3a09a93277afc2cdb43badf92a2c85c2789813f6. -- resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.4 ___ Python trac

[issue23898] inspect() changes in Python3.4 are not compatible with objects that implement special __bool__, __eq__

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset fb9addfdfc35 by Yury Selivanov in branch '3.4': Issue 23898: Fix inspect.classify_class_attrs() to work with __eq__ https://hg.python.org/cpython/rev/fb9addfdfc35 New changeset d6a9d225413a by Yury Selivanov in branch 'default': Issue 23898: Fix ins

[issue23898] inspect() changes in Python3.4 are not compatible with objects that implement special __bool__, __eq__

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Merged. Thanks for the bug report and patch, Mike! -- assignee: -> yselivanov resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue24056] Expose closure & generator status in function repr()

2015-05-21 Thread Yury Selivanov
Changes by Yury Selivanov : Removed file: http://bugs.python.org/file39460/issue24056_2.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue24056] Expose closure & generator status in function repr()

2015-05-21 Thread Yury Selivanov
Changes by Yury Selivanov : Added file: http://bugs.python.org/file39461/issue24056_2.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23898] inspect() changes in Python3.4 are not compatible with objects that implement special __bool__, __eq__

2015-05-21 Thread mike bayer
mike bayer added the comment: thanks for the merge! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added comments on Rietveld. It looks the patch includes changes for non-relevant files. -- type: -> enhancement ___ Python tracker ___ _

[issue22107] tempfile module misinterprets access denied error on Windows

2015-05-21 Thread Tim Golden
Tim Golden added the comment: My reluctance to commit the os.access patch is because it will cause such a behaviour change in a function which has been pretty stable for a long while. It'll certainly be more correct, but at the undoubted expense of breaking someone's long-working code. --

[issue22107] tempfile module misinterprets access denied error on Windows

2015-05-21 Thread Paul Moore
Paul Moore added the comment: I'm not sure I follow. Isn't the point of this patch to try again in certain cases of a PermissionError, where currently the code breaks out of the loop early? How can the result be worse than the current behaviour? Suerly sometimes (maybe not always) it works now

[issue24180] PEP 492: Documentation

2015-05-21 Thread Berker Peksag
Berker Peksag added the comment: Hi Yury, Here is a post commit review. I've mostly removed some additional PEP 492 mentions and made a couple of trivial changes. -- nosy: +berker.peksag Added file: http://bugs.python.org/file39462/issue24180.diff _

[issue24180] PEP 492: Documentation

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5691d2d2d0a4 by Yury Selivanov in branch 'default': Issue 24180: Fixes by Berker Peksag. https://hg.python.org/cpython/rev/5691d2d2d0a4 -- ___ Python tracker _

[issue24180] PEP 492: Documentation

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Hi Berker, thanks for the review. I think all your edits are reasonable, so I've just committed your patch as is. -- ___ Python tracker ___ ___

[issue24250] Optimization for strcpy(..., "") in file 'install.c'

2015-05-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: I agree with vadmium and also note that many compilers (though I don't know about MSVC) can optimize the strcpy call away. -- nosy: +benjamin.peterson resolution: -> works for me status: open -> closed ___ Python

[issue23973] PEP 484 implementation

2015-05-21 Thread Guido van Rossum
Guido van Rossum added the comment: New patch. -- Added file: http://bugs.python.org/file39463/pep484.diff ___ Python tracker ___ ___

[issue24258] BZ2File objects do not have name attribute

2015-05-21 Thread Ned Deily
Changes by Ned Deily : -- nosy: +nadeem.vawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-21 Thread Ned Deily
Changes by Ned Deily : -- nosy: +lars.gustaebel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue24260] TabError behavior doesn't match documentation

2015-05-21 Thread Evgeny Kapun
New submission from Evgeny Kapun: In the documentation, it is said: Indentation is rejected as inconsistent if a source file mixes tabs and spaces in a way that makes the meaning dependent on the worth of a tab in spaces; a TabError is raised in that case. But that's not true. For example

[issue24261] Add a command line flag to suppress default signal handlers

2015-05-21 Thread Evgeny Kapun
New submission from Evgeny Kapun: Currently, Python always changes handling of certain signals on startup: SIGPIPE is ignored, and SIGINT is handled by a function that raises KeyboardInterrupt exception. As a result, if the user presses Ctrl-C, a backtrace is printed to stderr. Some program m

[issue24261] Add a command line flag to suppress default signal handlers

2015-05-21 Thread R. David Murray
R. David Murray added the comment: See also issue 14228. -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14228] Don't display traceback when import site is interrupted by CTRL+c

2015-05-21 Thread Evgeny Kapun
Changes by Evgeny Kapun : -- nosy: +abacabadabacaba ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue24257] Incorrect use of PyObject_IsInstance

2015-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, go ahead and apply your patch. The existing code is clearly wrong. -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue24261] Add a command line flag to suppress default signal handlers

2015-05-21 Thread Martin Panter
Martin Panter added the comment: I have often wished for Python to have two modes: 1. Programming development mode: something like “python -b -Wdefault”, enabling warnings, printing full trackbacks for SIGINT and EPIPE errors, etc. Also possibly catching SystemExit() when raised inside the int

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-21 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: I've spent a bit of time exploring the segfault. Here's some data that might help relative to the configparser test. I put the following at the beginning of _odict_resize: Py_ssize_t len = PyObject_Size((PyObject *)od); if (len == 0) PySys_FormatSt

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2015-05-21 Thread Martin Panter
Martin Panter added the comment: This bug and Demian’s patch were originally about changing the low-level http.client.HTTPConnection class. I suggest opening a separate issue for changing urllib.request.urlopen() or similar, to avoid confusion. It should actually be possible to support chunkin

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: As far as I can tell there aren't any patterns that repeat across multiple seeds (which makes sense). -- ___ Python tracker ___

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: Here are the last 10 frames from the backtrace (gdb): #0 0x005b15d0 in odictiter_iternext (di=) at Objects/odictobject.c:1888 #1 0x00453179 in PyIter_Next (iter=) at Objects/abstract.c:2760 #2 0x005881e7 in chain_next (lz=0x72b8d878)

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: The segfault happens at line 1888 of odictobject.c when it tries to Py_INCREF a NULL value. The problem is that the value that gets looked up for a presumably valid key is returned as NULL. So either the value is messed up, lookup is broken, or the wrong key is b

[issue24262] logging.FileHandler.close() is not thread-safe

2015-05-21 Thread Gleb Dubovik
New submission from Gleb Dubovik: We're using FileHandler in combination with pytest plugin. Every time new test starts, new FileHandler is created and attached to the root logger, at the end of the test FileHandler is removed. This allows us to create per-test log files. There are some thread

[issue22107] tempfile module misinterprets access denied error on Windows

2015-05-21 Thread eryksun
eryksun added the comment: Shouldn't it be checking whether `file` (or `filename`) is a directory [1]? For example: except PermissionError: # This exception is thrown when a directory with # the chosen name already exists on windows. if _os.name == 'nt' and _os.path.

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Matthew Barnett
Matthew Barnett added the comment: FTR, in "_odict_resize" there's this: size_t i = _odict_get_index(od, _odictnode_KEY(node)); if (i < 0) { Note that "i" is declared as unsigned and then tested whether it's negative. -- nosy: +mrabarnett __

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: Yeah, Ned pointed that one out. I fixed it but haven't pushed the change. -- ___ Python tracker ___ ___

[issue22107] tempfile module misinterprets access denied error on Windows

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a risk of race condition. One process can create a directory `file`, then other process fails to create a file with the same name `file`, then the first process removes directory `file`, then the second process handles PermissionError. The same is p

[issue24230] tempfile.mkdtemp() doesn't work with bytes paths

2015-05-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: code review comments addressed. -- Added file: http://bugs.python.org/file39464/issue24230-gps02.diff ___ Python tracker ___ _

[issue24262] logging.FileHandler.close() is not thread-safe

2015-05-21 Thread Ned Deily
Changes by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue24262] logging.FileHandler.close() is not thread-safe

2015-05-21 Thread Gleb Dubovik
Gleb Dubovik added the comment: We used a very old version of python shipped with 12.04 LTS. The bug was fixed in 2.7.3 in 2ab3a97d544c by Vinay. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-21 Thread Nick Coghlan
Nick Coghlan added the comment: The patch mostly looks good to me, but I suggest using "test.support.check_warnings" for the cases where you're checking that the warning is raised as expected: https://docs.python.org/3/library/test.html#test.support.check_warnings It's slightly simpler than c

[issue24263] Why VALID_MODULE_NAME in unittest/loader.py is r'[_a-z]\w*\.py$' not r'\w+\.py$' ?

2015-05-21 Thread sih4sing5hong5
Changes by sih4sing5hong5 : -- components: Unicode nosy: ezio.melotti, haypo, sih4sing5hong5 priority: normal severity: normal status: open title: Why VALID_MODULE_NAME in unittest/loader.py is r'[_a-z]\w*\.py$' not r'\w+\.py$' ? type: behavior versions: Python 3.2, Python 3.3, Python 3

[issue22107] tempfile module misinterprets access denied error on Windows

2015-05-21 Thread eryksun
eryksun added the comment: Ok, I think I understand now. You chose an indirect check to avoid the race condition. If we have write access to the directory, then the PermissionError must be because a directory exists with the same name. Unfortunately os.access doesn't currently tell us this in