[issue27873] multiprocessing.pool.Pool.map should take more than one iterable

2016-09-27 Thread Berker Peksag
Berker Peksag added the comment: > What is the process? hg clone cpython, and make a patch from that and post it > here? Yes, it's exactly what you just described :) See https://docs.python.org/devguide/index.html for details. > Or is there some pull-request style process available? Not yet,

[issue27873] multiprocessing.pool.Pool.map should take more than one iterable

2016-09-27 Thread naught101
naught101 added the comment: OK, one question, is Pool.map preferable to Pool.starmap in any particular cases? -- ___ Python tracker ___

[issue28253] calendar.prcal(9999) output has a problem

2016-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset f2aff898f7c8 by Alexander Belopolsky in branch '2.7': Issue #28253: Fixed calendar functions for extreme months: 0001-01 and -12. https://hg.python.org/cpython/rev/f2aff898f7c8 -- ___ Python tracker

[issue27873] multiprocessing.pool.Pool.map should take more than one iterable

2016-09-27 Thread naught101
naught101 added the comment: Here you go. -- keywords: +patch Added file: http://bugs.python.org/file44851/mp.map.starmap.patch ___ Python tracker ___ ___

[issue28292] Make Calendar.itermonthdates() behave consistently in edge cases

2016-09-27 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: The Calendar.itermonthdates() method is defined as follows: "Return an iterator for one month. The iterator will yield datetime.date values and will always iterate through complete weeks, so it will yield dates outside the specified month." However, f

[issue28253] calendar.prcal(9999) output has a problem

2016-09-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed superseder: -> Make Calendar.itermonthdates() behave consistently in edge cases ___ Python tracker

[issue26650] calendar: OverflowErrors for year == 1 and firstweekday > 0

2016-09-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Make Calendar.itermonthdates() behave consistently in edge cases ___ Python tracker

[issue28292] Make Calendar.itermonthdates() behave consistently in edge cases

2016-09-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +calendar.prcal() output has a problem, calendar: OverflowErrors for year == 1 and firstweekday > 0 ___ Python tracker ___

[issue26072] pdb fails to access variables closed over

2016-09-27 Thread Chun-Yu Tseng
Chun-Yu Tseng added the comment: What Antony Lee mentioned are two different cases. The former is what PDB should behave because it is not reasonable to inspect a variable does not exist in the current frame. If you want to do so, you have to reference the variable `x` as a closure inside inn

[issue28288] Expose environment variable for Py_Py3kWarningFlag

2016-09-27 Thread Roy Williams
Roy Williams added the comment: @Brett @Berker In a similar vein, it'd be great to expose the `-b` flag in Python 3 in a similar manner to test for invalid byte comparisons. -- ___ Python tracker _

[issue28293] Don't completely dump the regex cache when full

2016-09-27 Thread Raymond Hettinger
New submission from Raymond Hettinger: When the regex cache gets filled, it is cleared in its entirety. Instead, it only needs to evict one arbitrary entry. This will save the us from having to rebuild and recache frequently used regexes. -- assignee: serhiy.storchaka components: Lib

[issue28289] ImportError.__init__ doesn't reset not specified exception attributes

2016-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Brett. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5, Python 3.6 ___ Python tracker __

[issue28293] Don't completely dump the regex cache when full

2016-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: serhiy.storchaka -> rhettinger stage: patch review -> commit review ___ Python tracker ___

[issue28293] Don't completely dump the regex cache when full

2016-09-27 Thread Xiang Zhang
Xiang Zhang added the comment: But with the compact dict implementation, popitem is not going to evict an arbitrary entry but always the last one. Will this cause two interchangeably used regexes always need to recompile? -- nosy: +xiang.zhang ___ P

[issue28292] Make Calendar.itermonthdates() behave consistently in edge cases

2016-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Possible solutions (in any case the documentation needs changes): 1. Raise OverflowError at both ends (revert issue15421patch). The method becomes unusable for two extreme months. 2. Yield an incomplete week at both ends (apply the patch from issue26650). T

[issue28293] Don't completely dump the regex cache when full

2016-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nice catch! Here is a patch that deletes the first key. -- stage: commit review -> patch review Added file: http://bugs.python.org/file44853/re_cache_del_first.patch ___ Python tracker

[issue28293] Don't completely dump the regex cache when full

2016-09-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Perhaps: _cache.pop(next(iter(_cache))) The for-loop version indirect about what it is trying to do and relies on an obscure quirk of exactly when it is an error to mutate while iterating. I do like that the side-effect of the compact dict is that is lets

[issue28293] Don't completely dump the regex cache when full

2016-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Perhaps: _cache.pop(next(iter(_cache))) This can raise KeyError if the cache is cleared in other thread. And it is a little slower. I remember why I didn't propose this idea earlier. This depends on the ordering of dict. But this is implementation detail

[issue28293] Don't completely dump the regex cache when full

2016-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Maybe use OrderedDict? But this adds heavy dependency to the re module. We can use the same trick as in the enum module. Here is a patch. -- Added file: http://bugs.python.org/file44854/re_cache_ordered_dict_del_first.patch ___

[issue28293] Don't completely dump the regex cache when full

2016-09-27 Thread Xiang Zhang
Xiang Zhang added the comment: Why not OrderedDict.popitem(last=False)? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue28293] Don't completely dump the regex cache when full

2016-09-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: This has gotten crazy. I withdraw the suggestion. -- resolution: -> rejected status: open -> closed ___ Python tracker ___

[issue28293] Don't completely dump the regex cache when full

2016-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Why not OrderedDict.popitem(last=False)? Yes, this should work. Here is a patch. -- Added file: http://bugs.python.org/file44855/re_cache_ordered_dict_popitem.patch ___ Python tracker

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

2016-09-27 Thread Nick Coghlan
Nick Coghlan added the comment: +1 for 3.6 from me - as you say, this is fixing a usability bug in the error handling rather than being a new feature. -- ___ Python tracker ___

<    1   2