[issue26110] Speedup method calls 1.2x

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1065 ___ Python tracker ___ ___

[issue28376] rangeiter_new fails when creating a range of step 0

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1098 ___ Python tracker ___ ___

[issue25651] Confusing output for TestCase.subTest(0)

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1077 ___ Python tracker ___ ___

[issue24241] webbrowser default browser detection and/or public API for _trylist.

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1099 ___ Python tracker ___ ___

[issue20491] textwrap: Non-breaking space not honored

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1067 ___ Python tracker ___ ___

[issue28761] Add the const qualifier to fields name and doc of public structs

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1068 ___ Python tracker ___ ___

[issue18896] Remove namedtuple 255 arguments restriction

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1075 ___ Python tracker ___ ___

[issue28115] Use argparse for the zipfile module

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1102 ___ Python tracker ___ ___

[issue24452] Make webbrowser support Chrome on Mac OS X

2017-03-31 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue29941] Confusion between asserts and Py_DEBUG

2017-03-31 Thread Thomas Wouters
Thomas Wouters added the comment: FYI, buildbot issues should be fixed by PR #930. -- ___ Python tracker ___

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-31 Thread R. David Murray
R. David Murray added the comment: If you want to be completely unambiguous, you could say "keyword argument names". "keyword argument" appears to mean different things in different contexts; sometimes it means the name and the value together, sometimes one or the other. Usually which one

[issue29941] Confusion between asserts and Py_DEBUG

2017-03-31 Thread Zachary Ware
Zachary Ware added the comment: Buildbots are happy, thanks! -- ___ Python tracker ___ ___ Python-bugs-list

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll look at this over the next week or two. I don't really like the proposed patch at all but will carefully think through the speed/space trade-offs. -- ___ Python tracker

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Hmm, I wonder why I'm not seeing the same sizes you are seeing. $ cat setsize.py from sys import getsizeof print( [getsizeof(frozenset(range(n))) for n in range(20)] ) $ python3.4 setsize.py [224, 224, 224, 224, 224, 224, 736, 736, 736, 736, 736, 736, 736,

[issue29902] copy breaks staticmethod

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue was fixed by issue22995 in 3.6. But for some reasons the general solution was not applied to 3.5 and 2.7. Proposed patch makes staticmethod, classmethod and property descriptors explicitly non-pickleable (as was made explicitly non-pickleable

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree. PyArg_ValidateKeywordArguments() fooled me. Now I see that it would be better to change only PyArg_ValidateKeywordArguments(). -- ___ Python tracker

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread INADA Naoki
INADA Naoki added the comment: See set_update_internal(). https://github.com/python/cpython/blob/master/Objects/setobject.c#L969-L1016 This happens only when iterable is set or dict. >>> import sys >>> sys.getsizeof(set(range(10))) 736 >>> sys.getsizeof(set(set(range(10 1248 >>>

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-31 Thread Martin Panter
Martin Panter added the comment: In this test, “keyword arguments” is definitely wrong: >>> f(**{1:2}) -TypeError: f() keywords must be strings +TypeError: f() keyword arguments must be strings To me, a keyword argument is a _value_ passed in using the f(name=. . .) syntax, and the keyword

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-03-31 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- pull_requests: +823 ___ Python tracker ___ ___

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Vinay Sajip
Vinay Sajip added the comment: It's not exactly a decimal point, more a "decimal mark" as per ISO 8601. From the Wikipedia article for the standard at "https://en.wikipedia.org/wiki/ISO_8601#Times - "However, a fraction may only be added to the lowest order time element in the

[issue8232] webbrowser.open incomplete on Windows

2017-03-31 Thread Boštjan Mejak
Boštjan Mejak added the comment: I have Windows 10, 64-bit, and Python 3.6.1, 64-bit, and the code still does not work! >>> import webbrowser >>> webbrowser.get("chrome") Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python 3.6\lib\webbrowser.py", line 51,

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Do you want to prepare a PR for me? I not yet set-up with the ways of Github. Please limit the PR to just unwinding the refactoring in the simplest possible way.. If in the future you want to chat about speed/space trade-offs, we can do that offline.

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: $ ./python -c 'N = 6000; from sys import getsizeof; s = [getsizeof(frozenset(range(n))) for n in range(N)]; print( [(n, s[n]) for n in range(N) if not n or s[n] != s[n-1]] )' 3.5: [(0, 112), (6, 368), (22, 1136), (86, 4208), (342, 16496), (1366, 65648),

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread INADA Naoki
INADA Naoki added the comment: > frozenset(range(n)) is slightly larger in 3.7 than in 3.6. It is 4 times > larger for about 10% of sizes. This is intensional: https://github.com/python/cpython/commit/5cd87a8d61246b0a6233bfb8503d4718b693cef0 load factor is reduced from 66% to 60%. (-10%)

[issue29953] Memory leak in the replace() method of datetime and time objects

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 314d6fca36a4eaa0541218431d14804fadec6488 by Serhiy Storchaka in branch 'master': bpo-29953: Fix memory leaks in the replace() method of datetime and time (#927) https://github.com/python/cpython/commit/314d6fca36a4eaa0541218431d14804fadec6488

[issue29953] Memory leak in the replace() method of datetime and time objects

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1117 ___ Python tracker ___ ___

[issue29922] error message when __aexit__ is not async

2017-03-31 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue29956] math.exp documentation is misleading

2017-03-31 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: The math.exp(x) function is documented to "Return e**x" . This is misleading because even in the simplest case, math.exp(x) is not the same as math.e ** x: >>> import math >>> math.exp(2) - math.e

[issue29953] Memory leak in the replace() method of datetime and time objects

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7d5d13d8d003ae5b62bb8c9ef1d1f310eaabc506 by Serhiy Storchaka in branch '3.6': bpo-29953: Fix memory leaks in the replace() method of datetime and t… (#933) https://github.com/python/cpython/commit/7d5d13d8d003ae5b62bb8c9ef1d1f310eaabc506

[issue29953] Memory leak in the replace() method of datetime and time objects

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

[issue29956] math.exp documentation is misleading

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is because math.e is not the same as e. -- nosy: +mark.dickinson, rhettinger, serhiy.storchaka, stutzbach, tim.peters ___ Python tracker

[issue29956] math.exp documentation is misleading

2017-03-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > This is because math.e is not the same as e. Right. That's why I think it would be nice to distinguish math.e and the base of the natural logarithm typographically in the docs. Can we use sphinx math mode? If not, I would use italic for the

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Skip Montanaro
Skip Montanaro added the comment: It's Vinay's code, so what he wants should carry the most weight. I did this as much as an exercise in figuring out the whole pull request/bug report process as anything. -- ___ Python tracker

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Skip Montanaro
Skip Montanaro added the comment: One example demonstrating that the datetime module at least prefers a decimal point: >>> import dateutil.parser >>> t = '1993-04-21 08:03:00,123' >>> dateutil.parser.parse(t) datetime.datetime(1993, 4, 21, 8, 3, 0, 123000) >>>

[issue29595] Expose max_queue_size in ThreadPoolExecutor

2017-03-31 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review ___ Python tracker ___ ___

[issue28157] Document time module constants (timezone, tzname, etc.) as deprecated.

2017-03-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The time and math modules are probably the oldest Python modules, but math have seen more development recently, so it should serve as a good model for how things should be organized. Yes, I believe re-listing module functions and constants in the

[issue29595] Expose max_queue_size in ThreadPoolExecutor

2017-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Prayslayer, please don't shove. Your PR request was responded to by Mariatta so it wasn't ignored. Making decisions about API expansions takes a while (making sure it fits the intended use, that it isn't a bug factory itself, that it is broadly useful,

[issue29941] Confusion between asserts and Py_DEBUG

2017-03-31 Thread Thomas Wouters
Changes by Thomas Wouters : -- pull_requests: +1119 ___ Python tracker ___ ___

[issue29941] Confusion between asserts and Py_DEBUG

2017-03-31 Thread Thomas Wouters
Changes by Thomas Wouters : -- pull_requests: +1118 ___ Python tracker ___ ___

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread Cameron Simpson
Changes by Cameron Simpson : -- nosy: +cameron ___ Python tracker ___ ___ Python-bugs-list

[issue28157] Document time module constants (timezone, tzname, etc.) as deprecated.

2017-03-31 Thread Cheryl Sabella
Cheryl Sabella added the comment: We were discussing changing the docstring on the pull request and I had additional questions, so I am moving them here for discussion: I've been looking at pydoc math and pydoc time (and the the module.c source). Before I go down the wrong path, I'm not sure

[issue25464] Tix HList header_exists should be "exist"

2017-03-31 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: -833 ___ Python tracker ___ ___

[issue28596] on Android _bootlocale on startup relies on too many library modules

2017-03-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- pull_requests: +1113 ___ Python tracker ___ ___

[issue29956] math.exp documentation is misleading

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: *e*:sup:`x` ? I like this idea. -- ___ Python tracker ___ ___

[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-31 Thread Berker Peksag
Berker Peksag added the comment: > There is another attribute called row_factory in the cursor structure > that isn't in the docs. There is a row_factory defined in the docs, > but that one is for the connection structure. Should it be added under > cursor as well? Thank you for working on

[issue29944] Argumentless super() fails in classes constructed with type()

2017-03-31 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: Argumentless super() calls do not work in classes constructed with type() -> Argumentless super() fails in classes constructed with type() ___ Python tracker

[issue29952] "keys and values" preferred to "keys and elements" for dict constituent

2017-03-31 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: "keys and values" is preferred to "keys and elements" for name of dict constituent -> "keys and values" preferred to "keys and elements" for dict constituent ___ Python tracker

[issue28157] Document time module constants (timezone, tzname, etc.) as deprecated.

2017-03-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: A question for Victor: Should we split the "Constants" section into "Clock ID constants" and "Timezone constants"? (See PR 928.) -- ___ Python tracker

[issue29956] math.exp documentation is misleading

2017-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: I suggest changing the main docs to match the existing docstring, "Return e raised to the power of x." The exp() function is a thin wrapper around the C math library and where it is documented as "compute e (the base of natural logarithms) raised to the

[issue28596] on Android _bootlocale on startup relies on too many library modules

2017-03-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___

[issue28157] Document time module constants (timezone, tzname, etc.) as deprecated.

2017-03-31 Thread STINNER Victor
STINNER Victor added the comment: IMHO it's worth it to have a dedicated section for CLOCK_xxx constants. It would allow to mention which functions use them. -- ___ Python tracker

[issue28596] on Android _bootlocale on startup relies on too many library modules

2017-03-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- pull_requests: -1113 ___ Python tracker ___ ___

[issue28596] on Android _bootlocale on startup relies on too many library modules

2017-03-31 Thread admin
Changes by admin : -- pull_requests: -1113 ___ Python tracker ___

[issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown

2017-03-31 Thread Nick Coghlan
Nick Coghlan added the comment: _PY_SET_FINALIZED is only one letter longer than _PY_ONCEVAR_INIT and the same length as the originally proposed _PY_STATICVAR_INIT. Since it shouldn't be anywhere near as common as _Py_SETREF, I'm also okay in general with trading a bit of brevity for

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-31 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +819 ___ Python tracker ___ ___

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-31 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +820 ___ Python tracker ___ ___

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-31 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +821 ___ Python tracker ___ ___

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-31 Thread INADA Naoki
INADA Naoki added the comment: New changeset 5aa913d72317d7632781fb71a7b45a2b5e31558e by INADA Naoki in branch '2.7': bpo-29952: Use usual terminology of dict (GH-924) https://github.com/python/cpython/commit/5aa913d72317d7632781fb71a7b45a2b5e31558e --

[issue29954] multiprocessing.Pool.__exit__() calls terminate() instead of close()

2017-03-31 Thread Josh Rosenberg
Josh Rosenberg added the comment: I suspect it's far too late to change this, given compatibility constraints. If you want it to close instead of terminate, contextlib.closing is always an option. -- nosy: +josh.r ___ Python tracker

[issue29957] unnecessary LBYL for key contained in defaultdict, lib2to3/btm_matcher

2017-03-31 Thread Michael Selik
Michael Selik added the comment: I'll submit a pull request momentarily. -- ___ Python tracker ___ ___

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Xiang Zhang
Xiang Zhang added the comment: Although I prefer period but such a change could break backwards compatibility so I don't know it's worth or not. Codes like `datetime.strptime('1993-04-21 08:03:00,123', '%Y-%m-%d %H:%M:%S,%f')` (usually for such a simple parse goal I like to use the builtin

[issue23033] Disallow support for a*.example.net, *a.example.net, and a*b.example.net in certificate wildcard handling.

2017-03-31 Thread Mandeep Singh
Changes by Mandeep Singh : -- pull_requests: +1120 ___ Python tracker ___ ___

[issue29957] unnecessary LBYL for key contained in defaultdict, lib2to3/btm_matcher

2017-03-31 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1121 ___ Python tracker ___

[issue29763] test_site failing on AppVeyor

2017-03-31 Thread Zachary Ware
Changes by Zachary Ware : -- pull_requests: +1123 ___ Python tracker ___ ___

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-03-31 Thread Dominic Mayers
Dominic Mayers added the comment: I am a bit ashamed that I missed that. Still, the intent in the current code, the name of the parameter, the examples, etc. is that we pass the handler class. This is more than its __init__ function and less than a generic factory method. An important

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-03-31 Thread R. David Murray
R. David Murray added the comment: I think I'm missing something here. What prevents one from passing a factory function as the RequestHandlerClass argument? In Python, a class name *is* a factory function for class instances. -- nosy: +r.david.murray

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for changing this to a period. Every time I see the comma, it seems odd to me. It also is harder to parse back into a regular float. In addition, it is hazard when people use commas and delimiters between the fields in a log file. -- nosy:

[issue29957] unnecessary LBYL for key contained in defaultdict, lib2to3/btm_matcher

2017-03-31 Thread Michael Selik
New submission from Michael Selik: Minor, but it looks like someone decided to use a defaultdict but forgot to remove the checks for whether a key exists. Creating a defaultdict(list):

[issue29571] test_re is failing when local is set for `en_IN`

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -1096 ___ Python tracker ___

[issue28115] Use argparse for the zipfile module

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -1102 ___ Python tracker ___

[issue29957] unnecessary LBYL for key contained in defaultdict, lib2to3/btm_matcher

2017-03-31 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the PR Michael :) It may take one US business day for the CLA to be received. Then a core dev has to manually update the label in GitHub. -- ___ Python tracker

[issue29957] unnecessary LBYL for key contained in defaultdict, lib2to3/btm_matcher

2017-03-31 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review versions: +Python 3.7 ___ Python tracker ___

[issue29763] test_site failing on AppVeyor

2017-03-31 Thread Zachary Ware
Zachary Ware added the comment: New changeset b94d7fd4efa877d649cea9c8125c8869ffe0c32d by Zachary Ware in branch 'master': bpo-29763: Use unittest cleanup in test_site (GH-841) https://github.com/python/cpython/commit/b94d7fd4efa877d649cea9c8125c8869ffe0c32d --

[issue23262] webbrowser module broken with Firefox 36+

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -903 ___ Python tracker ___ ___

[issue28556] typing.py upgrades

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -1037 ___ Python tracker ___

[issue29416] Path.mkdir can get into a recursive error loop

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -984 ___ Python tracker ___ ___

[issue27593] Deprecate sys._mercurial and create sys._git

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -971 ___ Python tracker ___ ___

[issue26906] Special method lookup fails on uninitialized types

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -967 ___ Python tracker ___ ___

[issue28087] macOS 12 poll syscall returns prematurely

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -1036 ___ Python tracker ___

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -1038 ___ Python tracker ___

[issue29572] Upgrade installers to OpenSSL 1.0.2k

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -1053 ___ Python tracker ___

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -1060 ___ Python tracker ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -1085 ___ Python tracker ___

[issue23903] Generate PC/python3.def by scraping headers

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -1091 ___ Python tracker ___

[issue27906] Socket accept exhaustion during high TCP traffic

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -933 ___ Python tracker ___ ___

[issue27172] Undeprecate inspect.getfullargspec()

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -923 ___ Python tracker ___ ___

[issue29335] subprocess module does not check WIFSTOPPED on SIGCHLD

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -916 ___ Python tracker ___ ___

[issue20211] setup.py: do not add system header locations when cross compiling

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -867 ___ Python tracker ___ ___

[issue29957] unnecessary LBYL for key contained in defaultdict, lib2to3/btm_matcher

2017-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nice catch. You've got sharp eyes. Do you want to submit a pull request or have another dev work on it? -- nosy: +Mariatta, rhettinger ___ Python tracker

[issue29957] unnecessary LBYL for key contained in defaultdict, lib2to3/btm_matcher

2017-03-31 Thread Michael Selik
Michael Selik added the comment: PR submitted. I also signed the contributor agreement, but the bot doesn't seem to have noticed. -- ___ Python tracker

[issue28629] Emit ResourceWarning when implicitly terminating a suspended frame?

2017-03-31 Thread Nathaniel Smith
Nathaniel Smith added the comment: It does make sense to skip emitting a warning if there's no try or with block active. Don't we already have the ability to check for this, though, without any extensions to the frame or code objects? That's what the public PyGen_NeedsFinalizing does, right?

[issue29763] test_site failing on AppVeyor

2017-03-31 Thread Zachary Ware
Changes by Zachary Ware : -- pull_requests: +1124 ___ Python tracker ___ ___

[issue29957] unnecessary LBYL for key contained in defaultdict, lib2to3/btm_matcher

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +benjamin.peterson ___ Python tracker ___

[issue28157] Document time module constants (timezone, tzname, etc.) as deprecated.

2017-03-31 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +825 ___ Python tracker ___ ___

[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-31 Thread Aviv Palivoda
Aviv Palivoda added the comment: Hi Cheryl, the arraysize value can be set by doing: >>> cursor.array = 5 For example I can do the following >>> import sqlite3 >>> s = sqlite3.connect(":memory:") >>> s.execute("create table a(a,b)") >>> s.execute("insert into a(a,b) values (1,2)") >>>

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think the best thing to do is to undo the refactoring in https://github.com/python/cpython/commit/4897300276d870f99459c82b937f0ac22450f0b6 . It is was intended be neutral but did affect set_update_internal() for small sets. --

[issue29897] itertools.chain behaves strangly when copied with copy.copy

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue is related to the behavior of other composite iterators. >>> from copy import copy >>> it = map(ord, 'abc') >>> list(copy(it)) [97, 98, 99] >>> list(copy(it)) [] >>> it = filter(None, 'abc') >>> list(copy(it)) ['a', 'b', 'c'] >>> list(copy(it)) []

[issue29897] itertools.chain behaves strangly when copied with copy.copy

2017-03-31 Thread Michael Seifert
Michael Seifert added the comment: Just an update what doesn't work: just overriding the `__copy__` method. I tried it but it somewhat breaks `itertools.tee` because if the passed iterable has a `__copy__` method `tee` rather copies the iterator (=> resulting in a lot of unnecessary memory

[issue29953] Memory leak in the replace() method of datetime and time objects

2017-03-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: When pass out of bound keyword argument fold to datetime.datetime.replace() or datetime.time.replace(), ValueError is raised and just allocated object is leaked. Proposed patch fixes the leaks. -- components: Extension Modules messages: 290913

<    1   2   3   4   5   >