[issue31587] Enum doesn't allow name

2017-09-25 Thread Robert Gomułka
New submission from Robert Gomułka: Enum module handles "name" member incorrectly. 1. "name" can't be used as a member when decorated with unique: >>> import enum >>> @enum.unique ... class A(enum.IntEnum): ... a = 1 ... name = 2 ... Traceback (most recent call last): File "", line 2,

[issue31586] SystemError in _collections._count_element() in case of a bad mapping argument

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree. _collections._count_elements() is an internal function. It should be called only with Counter (which is a dict subclass) or its subclass. But I think it is worth to make the code more reliable. -- ___ Pyt

[issue31586] SystemError in _collections._count_element() in case of a bad mapping argument

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger, serhiy.storchaka versions: +Python 3.6, Python 3.7 -Python 3.8 ___ Python tracker ___ ___

[issue31575] Functional Programming HOWTO sub-optimal example for reduce

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think the existing code conveys the author's message better than the proposed revision. The example isn't about efficiency; rather, it is about comparing several alternative formulations with this one being the weakest of the lost. For emphasizing that

[issue31586] SystemError in _collections._count_element() in case of a bad mapping argument

2017-09-25 Thread Oren Milman
New submission from Oren Milman: The following code causes a SystemError: class BadMapping: get = dict.get __setitem__ = dict.__setitem__ import _collections _collections._count_elements(BadMapping(), [42]) This is because _count_elements() (in Modules/_collectionsmodule.c) assumes tha

[issue31579] Reference leak in enumerate

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 ___ Python tracker ___ __

[issue31579] Reference leak in enumerate

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 19eb87d857f6d1bad1a3619d9d7534820f82e5f2 by Serhiy Storchaka in branch '2.7': [2.7] bpo-31579: Fixed a possible leak in enumerate() with large indices. (GH-3753). (#3761) https://github.com/python/cpython/commit/19eb87d857f6d1bad1a3619d9d753482

[issue31579] Reference leak in enumerate

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d6a356209abd026b41245ad76ba3a374ab0c60db by Serhiy Storchaka in branch '3.6': [3.6] bpo-31579: Fixed a possible leak in enumerate() with large indices. (GH-3753). (#3760) https://github.com/python/cpython/commit/d6a356209abd026b41245ad76ba3a374

[issue31336] Speed up _PyType_Lookup() for class creation

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm going to merge this over the next 24 hours if there are no comments from other core developers. -- ___ Python tracker ___ __

[issue31336] Speed up _PyType_Lookup() for class creation

2017-09-25 Thread Stefan Behnel
Stefan Behnel added the comment: Still ready for merging :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31465] Allow _PyType_Lookup() to raise exceptions

2017-09-25 Thread Stefan Behnel
Stefan Behnel added the comment: Any comments on this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue31584] Documentation Language mixed up

2017-09-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Indeed a problem! Seems to affect Python 2.7 docs. If not mistaken, Julien worked on the language switcher. Maybe he has some clue ... -- nosy: +Mariatta, mdk priority: normal -> high stage: -> needs patch ___ Pyth

[issue31579] Reference leak in enumerate

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3747 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue31579] Reference leak in enumerate

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3746 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue31585] Refactor the enumerate.__next__ implementation

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Having separate code paths was an intentional decision. I prefer to keep it that way. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31585] Refactor the enumerate.__next__ implementation

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch pull_requests: +3745 stage: -> patch review ___ Python tracker ___ ___ Python-bugs

[issue31585] Refactor the enumerate.__next__ implementation

2017-09-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently the large and complex part of enum_next() and enum_next_long() in Objects/enumobject.c is duplicated. This increases the code size and makes harder maintaining the code. The proposed patch refactors the implementation and removes the code duplica

[issue31579] Reference leak in enumerate

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0e950dd22b075b4809c84afda8aede02b76ac0fa by Serhiy Storchaka in branch 'master': bpo-31579: Fixed a possible leak in enumerate() with large indices. (#3753) https://github.com/python/cpython/commit/0e950dd22b075b4809c84afda8aede02b76ac0fa

[issue31584] Documentation Language mixed up

2017-09-25 Thread asl
New submission from asl: Some of the documentation language are mixed up. eg: Japanese on the English page https://docs.python.org/2.7/faq/design.html French on the Japanese https://docs.python.org/ja/2.7/faq/design.html It seem to affect multiple pages: https://docs.python.org/2.7/bugs.html ht

[issue31580] Defer compiling regular expressions

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: lru_cache() is not used for reasons. The patch makes using cached patterns slower by adding an overhead of 4 additional checks. It makes resolving attributes of a deferred patterns slower. All this slows down a straight call to re.search(pattern, s). Errors

[issue31581] Reduce the number of imports for functools

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Go ahead. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue31583] 2to3 call for file in current directory yields error

2017-09-25 Thread Denis Osipov
Changes by Denis Osipov : -- keywords: +patch pull_requests: +3744 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-lis

[issue31583] 2to3 call for file in current directory yields error

2017-09-25 Thread Denis Osipov
New submission from Denis Osipov: 2to3 doesn't work if called for file in current directory with --add-suffix option. $ /d/repos/cpython/python.bat /d/repos/cpython/Tools/scripts/2to3 -n -W --add-suffix=3 test2to3.py Running Debug|x64 interpreter... WARNING: --write-unchanged-files/-W

[issue31582] Add _pth breadcrumb to sys.path documentation

2017-09-25 Thread Traveler Hauptman
New submission from Traveler Hauptman: Python on windows (winpython) was not adding PYTHONPATH to sys.path as documented and I could not understand why. It took a lot of time, web searches, and finally a tour through the code to find out about _pth; which is well documented but difficult to fi

[issue31581] Reduce the number of imports for functools

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Initially my patch for issue30152 included the change in collections. But it was removed on Raymond's request. -- nosy: +rhettinger, serhiy.storchaka ___ Python tracker ___

[issue31581] Reduce the number of imports for functools

2017-09-25 Thread INADA Naoki
Changes by INADA Naoki : -- keywords: +patch pull_requests: +3743 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue31581] Reduce the number of imports for functools

2017-09-25 Thread INADA Naoki
New submission from INADA Naoki: Makes `import functools` about 1.5 ms faster. * heapq is used only when Counter.most_common(n). * types and waakref is used only for singledispatch. master: import time: - _functools 76 us (self 76 us) import time: - _operator 110 us (self 110 us) impor

[issue31580] Defer compiling regular expressions

2017-09-25 Thread R. David Murray
R. David Murray added the comment: I agree with Raymond. It would be strange to have the API that is obviously designed to pre-compile the regex not pre-compile the regex. If the concern is that a non-precompiled regex might get bumped out of the cache but you want a way to only compile a "bu

[issue31580] Defer compiling regular expressions

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: ISTM, the whole point is to compile in advance. When I worked during high frequency trading, that was essential to news trading where you *really* didn't want to pay the compilation cost at the time the regex was used. This proposal takes away the user's

[issue31580] Defer compiling regular expressions

2017-09-25 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- keywords: +patch pull_requests: +3742 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue31580] Defer compiling regular expressions

2017-09-25 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: It's a very common pattern to see the following at module scope: cre_a = re.compile('some pattern') cre_b = re.compile('other pattern') and so on. This can cost you at start up time because all those regular expressions are compiled at import time, even if

[issue18257] Two copies of python-config

2017-09-25 Thread R. David Murray
R. David Murray added the comment: Since it hasn't been an issue for a few releases, I say we close it. If there is some problem remaining, it probably deserves its own tracker issue anyway. -- nosy: +r.david.murray resolution: -> fixed stage: needs patch -> resolved status: open -> c

[issue14799] Tkinter ttk tests hang on linux

2017-09-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: A year or so ago, I asked people on python-list who could to run the gui tests on their linux boxes and report. About 6 did and with one possible exception, and not that reported here, everyone reported success. So, unless someone can report otherwise, I thi

[issue31415] Add -X option to show import time

2017-09-25 Thread INADA Naoki
INADA Naoki added the comment: how can I make it more machine readable? On 2017年9月25日(月) 19:39 Christian Heimes wrote: > > Christian Heimes added the comment: > > +1 for an option to profile import time. > > I have a minor complain: The output format is not machine-friendly, which > makes it h

[issue31571] Redundand information on Doc/reference/lexical_analysis.rst

2017-09-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: The proposed change seems fine. Merged and backported. Thanks everyone! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31571] Redundand information on Doc/reference/lexical_analysis.rst

2017-09-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 26b940f762f0b306ff894601003f51a8d036e285 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-31571: Remove duplicated info in Lexical Analysis documentation (GH-3691) (GH-3754) https://github.com/python/cpython/commit/26b940f762f0b306ff89460

[issue31571] Redundand information on Doc/reference/lexical_analysis.rst

2017-09-25 Thread Roundup Robot
Changes by Roundup Robot : -- keywords: +patch pull_requests: +3741 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue31571] Redundand information on Doc/reference/lexical_analysis.rst

2017-09-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 4a2d00cb4525fcb3209f04531472ba6a359ed418 by Mariatta (Guilherme Caminha) in branch 'master': bpo-31571: Remove duplicated info in Lexical Analysis documentation (GH-3691) https://github.com/python/cpython/commit/4a2d00cb4525fcb3209f04531472ba6a35

[issue14799] Tkinter ttk tests hang on linux

2017-09-25 Thread Łukasz Langa
Łukasz Langa added the comment: Unsetting priority. -- nosy: +lukasz.langa priority: critical -> ___ Python tracker ___ ___ Python-b

[issue27163] IDLE entry for What's New in Python 3.6

2017-09-25 Thread Łukasz Langa
Łukasz Langa added the comment: Unsetting priority since it's not Critical and RMs look at open Critical bugs when releasing 3.6.3 and so on. -- nosy: +lukasz.langa priority: critical -> ___ Python tracker _

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-09-25 Thread Łukasz Langa
Changes by Łukasz Langa : -- assignee: -> yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-09-25 Thread Łukasz Langa
Łukasz Langa added the comment: This is marked as "critical". Looks like it's fixed. Can we close it? -- nosy: +lukasz.langa ___ Python tracker ___ _

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-09-25 Thread Łukasz Langa
Łukasz Langa added the comment: This is marked as Critical so either we should change the priority or fix it soon :) -- nosy: +lukasz.langa ___ Python tracker ___ _

[issue14499] Extension module builds fail with Xcode 4.3 on OS X 10.7 due to SDK move

2017-09-25 Thread Łukasz Langa
Łukasz Langa added the comment: Not critical anymore. Probably safe to close? -- nosy: +lukasz.langa priority: critical -> ___ Python tracker ___ __

[issue18257] Two copies of python-config

2017-09-25 Thread Łukasz Langa
Łukasz Langa added the comment: Downgrading the priority, it's not a deferred blocker for sure. I think we could probably just close it? -- nosy: +lukasz.langa priority: deferred blocker -> ___ Python tracker __

[issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8

2017-09-25 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: (For PEP 537 please read PEP 538, sorry) -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8

2017-09-25 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: I've investigated a bit more. First, I've tried with Python 3.7.0a1 . As you'd expect, PEP 537 means this behaviour now also occurs when no locale environment variables at all are set. Second, I've looked through locale.py a bit. I believe what it calls the

[issue30152] Reduce the number of imports for argparse

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks all! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue30152] Reduce the number of imports for argparse

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 81108375d9b2ccd0add1572da745311d4dfac505 by Serhiy Storchaka in branch 'master': bpo-30152: Reduce the number of imports for argparse. (#1269) https://github.com/python/cpython/commit/81108375d9b2ccd0add1572da745311d4dfac505 -- __

[issue31579] Reference leak in enumerate

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch pull_requests: +3740 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue31579] Reference leak in enumerate

2017-09-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: There is a possible leak of the value emitted by an underlying iterator in enumerate.__next__. Proposed PR fixes it. -- assignee: rhettinger components: Interpreter Core messages: 302978 nosy: rhettinger, serhiy.storchaka priority: normal severity:

[issue31571] Redundand information on Doc/reference/lexical_analysis.rst

2017-09-25 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue31530] Python 2.7 readahead feature of file objects is not thread safe

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: > Iteration on Python 2 files is fragile, now is not the time to fix > fundamental bugs in Python 2. Right. I don't have a strong preference for Serhiy's PR 3672. -- ___ Python tracker

[issue31577] crash in os.utime() in case of a bad ns argument

2017-09-25 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3739 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue31577] crash in os.utime() in case of a bad ns argument

2017-09-25 Thread Oren Milman
Oren Milman added the comment: I opened a PR. I think another fix might be to use PyLong_Type.tp_as_number->long_divmod() instead of PyNumber_Divmod(). -- ___ Python tracker ___

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: Oh, it seems like Steve Dower found an issue on Windows: PR 3751. I reopen the issue. -- resolution: fixed -> status: closed -> open ___ Python tracker _

[issue31571] Redundand information on Doc/reference/lexical_analysis.rst

2017-09-25 Thread Guilherme Praciano Karst Caminha
Guilherme Praciano Karst Caminha added the comment: In that case, I believe the PR I've opened should be fine? -- ___ Python tracker ___

[issue31530] Python 2.7 readahead feature of file objects is not thread safe

2017-09-25 Thread Guido van Rossum
Guido van Rossum added the comment: It should be like 'if key in dct: del dct[key]'. It may fail when two threads do this but the *internal* state of dct should not be compromised. On Sep 25, 2017 2:45 AM, "Antoine Pitrou" wrote: > > Antoine Pitrou added the comment: > > Le 25/09/2017 à 11:39,

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 25/09/2017 à 20:55, Neil Schemenauer a écrit : > > I think the basic idea makes a lot of sense, i.e. have a generation that is > never collected. An alternative way to implement it would be to have an > extra generation, e.g. rather than just 0, 1, 2 also

[issue20827] IDLE : Display function argument list in ClassBrowser

2017-09-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Having fixed the nested functions and classes issue, and thought some more, I have two other concerns with adding signatures in the browser, and a different solution. 1. Time: When requested, the browser window comes up immediately with the module node. Ther

[issue31571] Redundand information on Doc/reference/lexical_analysis.rst

2017-09-25 Thread Guido van Rossum
Guido van Rossum added the comment: That's *really* old. Please clean up as you see fit! On Sep 24, 2017 10:33 PM, "Serhiy Storchaka" wrote: Serhiy Storchaka added the comment: Guido, in 60f2f0cf8e10c94693dfea8937b7feabeffe5744 you added the phrase "Note that numeric literals do not include a

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-09-25 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I like the idea of a gen 4 that never gets collected. This would have been useful for the original problem that inspired me to add the `generation` argument to `gc.collect()`. The nice thing about this, is just as you suggest: you could force a collection o

[issue31578] Unexpected Floating Point Division Result

2017-09-25 Thread R. David Murray
R. David Murray added the comment: In the absence of the appropriate __future__ import, the python2 division operator uses integer division. -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python trac

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-09-25 Thread Neil Schemenauer
Neil Schemenauer added the comment: I think the basic idea makes a lot of sense, i.e. have a generation that is never collected. An alternative way to implement it would be to have an extra generation, e.g. rather than just 0, 1, 2 also have generation 3. The collection would by default neve

[issue31578] Unexpected Floating Point Division Result

2017-09-25 Thread hw
New submission from hw: To reproduce: >>> 480/1000/13.0 Actual result: 0.0 Expected result: 0.03692307692307692 Adding the zero decimal to any other combinations of the numbers produces the expected floating point result. Working as expected in Python 3 -- components: Interpreter Core

[issue31569] inconsistent case of PCbuild/ directory

2017-09-25 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-l

[issue31574] Add dtrace hook for importlib

2017-09-25 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue22140] "python-config --includes" returns a wrong path (double prefix)

2017-09-25 Thread Michał Górny
Changes by Michał Górny : -- nosy: +mgorny ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue31423] Error while building PDF documentation

2017-09-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Sorry!! Yesterday morning I received 50+ emails all about document download page is 404. Reading those again, turns out these are older emails from a week before, somehow just showing up in my mailbox. I think everything is good here. :) Thanks! --

[issue31574] Add dtrace hook for importlib

2017-09-25 Thread Ned Deily
Changes by Ned Deily : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue31475] Bug in argparse - not supporting utf8

2017-09-25 Thread Josh Rosenberg
Josh Rosenberg added the comment: Based on the OP's patch, it looks like they have a problem where they have non-ASCII text in their output strings (either due to using non-ASCII switches, or using non-ASCII help documentation), but sys.stdout/sys.stderr are configured for some encoding that d

[issue31569] inconsistent case of PCbuild/ directory

2017-09-25 Thread Paul Moore
Paul Moore added the comment: New changeset f1502d097c29b266a5748312ee2451a2d6ac0af6 by Paul Moore (Stefan Grönke) in branch 'master': bpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711) https://github.com/python/cpython/commit/f1502d097c29b266a5748312ee2451a2d6ac0a

[issue31577] crash in os.utime() in case of a bad ns argument

2017-09-25 Thread Oren Milman
New submission from Oren Milman: The following code causes the interpreter to crash: class BadInt: def __divmod__(*args): return 42 import os os.utime('foo.txt', ns=(BadInt(), 1)) This is because split_py_long_to_s_and_ns() (in Modules/posixmodule.c) assumes that PyNumber_Divmod()

[issue31569] inconsistent case of PCbuild/ directory

2017-09-25 Thread Paul Moore
Paul Moore added the comment: OK, having re-read the PR, I'm fine with applying it as is, too. -- ___ Python tracker ___ ___ Python-b

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-25 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +3738 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue31569] inconsistent case of PCbuild/ directory

2017-09-25 Thread Zachary Ware
Zachary Ware added the comment: Personally, *I'd* prefer PC -> Windows and PCbuild -> Windows\build :) I'm also good with the PR as is. -- ___ Python tracker ___ __

[issue31569] inconsistent case of PCbuild/ directory

2017-09-25 Thread Steve Dower
Steve Dower added the comment: I'm okay with the PR as it stands, especially the parts that affect GitHub and appveyor, as those are almost certainly using case sensitive comparisons. It's definitely not easier to update the case of a file that is in git, and doing so will very likely break us

[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding

2017-09-25 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue31145] PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same.

2017-09-25 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue31573] PyStructSequence_New() doesn't validate its input type (crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage)

2017-09-25 Thread STINNER Victor
Changes by STINNER Victor : -- title: PyStructSequence_New() doesn't validate its input type (crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage -> PyStructSequence_New() doesn't validate its input type (crashes in os.wait3() and os.wait4() in case of a bad r

[issue31573] PyStructSequence_New() doesn't validate its input type (crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

2017-09-25 Thread STINNER Victor
Changes by STINNER Victor : -- title: crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage -> PyStructSequence_New() doesn't validate its input type (crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage _

[issue31573] crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

2017-09-25 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue31573] crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: Attached PR 3750 tries to validate the input type. The problem is that structseq is not exactly a type. It's hard to really validate everything. See the comment test in my PR. -- nosy: +haypo ___ Python tracker

[issue31573] crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

2017-09-25 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch pull_requests: +3737 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue31576] problem in math

2017-09-25 Thread ANEESH JOSE
ANEESH JOSE added the comment: Thankyou for the information . -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue31576] problem in math

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: It seems like you are confused between radians and degrees. math.sin() expects radians. https://docs.python.org/dev/library/math.html#math.sin Sorry but the Python bug tracker is not the right to ask questions. I close your bug report. -- nosy: +haypo

[issue31576] problem in math

2017-09-25 Thread ANEESH JOSE
New submission from ANEESH JOSE: We know that the answer of sin 90 is 1. But In Python's library math,the value of it is around 0.83... My program is as follows: import math a=math.sin(90) print(a) #Output obtained is 0.83. Hope you guys solve this on the next update or nearby I hope it is a

[issue31574] Add dtrace hook for importlib

2017-09-25 Thread Christian Heimes
Christian Heimes added the comment: Improved script and output for "import asyncio": $ sudo stap import.stp -c "./python -c 'import asyncio'" [1506343527655342994] * Importing '_frozen_importlib_external' ... [1506343527655797118] + Imported '_frozen_importlib_external' in 454us [15063435276563

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2017-09-25 Thread Eric Moyer
Eric Moyer added the comment: I planned to write the PR myself, on the principle of "it's my itch, I should scratch it." But if you think it is better for someone else to write it, you know the codebase better than I, and you know how long a PR takes to review/fix. My intention is to help. I'll d

[issue31520] ResourceWarning: unclosed warning

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: > I’m curious how you manage to trigger the warning in the “closed” state. It comes from Refleak buildbots. Example: 0:13:47 load avg: 3.24 [ 52/407] test_urllib2net passed (239 sec) beginning 6 repetitions 123456 Resource 'http://www.imdb.com' is not available

[issue31574] Add dtrace hook for importlib

2017-09-25 Thread Christian Heimes
Christian Heimes added the comment: Example output: $ sudo stap import.stp -c "./python -c pass" [1506342342142233574] * Importing '_frozen_importlib_external' ... [1506342342142719538] + Imported '_frozen_importlib_external' [1506342342143260191] * Importing 'zipimport' ... [150634234214332947

[issue31575] Functional Programming HOWTO sub-optimal example for reduce

2017-09-25 Thread Anran Yang
New submission from Anran Yang: At the end of the Functional Programming HOWTO document (https://docs.python.org/3.7/howto/functional.html) the usage of reduce/lambda/for loops are compared and discussed. However, the example for reduce seems sub-optimal and thus the discussion is not that eff

[issue31520] ResourceWarning: unclosed warning

2017-09-25 Thread Martin Panter
Martin Panter added the comment: I’m curious how you manage to trigger the warning in the “closed” state. The Python I have handy is half a year out of date, but all my attempts to trigger the warning either produce the less confusing version, ResourceWarning: unclosed or there is no warning

[issue30347] itertools.groupby() can fail a C assert()

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Hmm, the sole issue30346 is not enough for fixing this crash. I don't know if there is a simpler fix based on issue30346, but since PR 1557 removes the code duplication I'm going to merge it in any case. -- ___ Py

[issue30347] itertools.groupby() can fail a C assert()

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

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

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I committed the patch from Raymond's name, but GitHub set me as the author of the commit. :( -- ___ Python tracker ___ _

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d94a65a0694a188713f91ba7c9fffded090247dc by Serhiy Storchaka in branch '2.7': bpo-25732: Make functools.total_ordering implementing __ne__. (#3748) https://github.com/python/cpython/commit/d94a65a0694a188713f91ba7c9fffded090247dc -- _

[issue31573] crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

2017-09-25 Thread Oren Milman
New submission from Oren Milman: The following code causes the interpreter to crash: import os import time import resource new_pid = os.fork() if new_pid == 0: time.sleep(0.5) else: resource.struct_rusage = None os.wait3(0) We would get a crash also if we replaced 'os.wait3(0)' w

  1   2   >