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

2017-03-05 Thread Nick Coghlan
Nick Coghlan added the comment: I'm with Serhiy on this one: if the "re" module isn't using locale.getpreferredencoding(), then there's something odd going on. It just sounds like the disconnect on Windows is the opposite of the one we hit on Linux without Benjamin's patch, perhaps due to the

[issue29714] can't interpolate byte string with \x00 before replacement identifier

2017-03-05 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +407 ___ Python tracker ___ ___ Python-bugs-list

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

2017-03-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: getpreferredencoding() takes a completely different path on windows (returns a codepage) and isn't related to the C locale. -- ___ Python tracker

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

2017-03-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: But the test was never broken on windows. On Sun, Mar 5, 2017, at 23:54, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > I'm not sure this will help on Windows. > > -- > > ___ > Python

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

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And I don't understand why my fix doesn't work on Windows. -- ___ Python tracker ___

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

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure this will help on Windows. -- ___ Python tracker ___ ___

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

2017-03-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yep, I think we should merge https://github.com/python/cpython/pull/422 and revert ncoghlan's change. -- nosy: +benjamin.peterson ___ Python tracker

[issue5945] PyMapping_Check returns 1 for lists

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed wording doesn't looks much informative to me. Maybe just say that PyMapping_Check() also returns 1 for sequences that support slicing? And recommend `PyMapping_Check() && !PySequence_Check()` for true mapping test? -- nosy:

[issue13566] Increase pickle compatibility

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46703/pickle-old-strings-2.patch ___ Python tracker ___

[issue29690] no %z directive for strptime in python2, doc says nothing about it

2017-03-05 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Neither documentation is clear on whether each of those flags are available for strptime too. A precision should be added on a flag if it's not available for strptime. What do you think ? -- ___ Python tracker

[issue29727] collections.abc.Reversible doesn't fully support the reversing protocol

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

[issue29695] Weird keyword parameter names in builtins

2017-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I do think it would be better to not have the deprecation. -- ___ Python tracker ___

[issue29695] Weird keyword parameter names in builtins

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I already merged the patch as 58d23e68068996c76cac78887ec67dee68cdbc72. If you think that it would be better to remove without deprecation, the following patch does this. -- Added file: http://bugs.python.org/file46702/remove-bad-keywords.patch

[issue29731] Ability to filter warnings to print current stack

2017-03-05 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +406 ___ Python tracker ___

[issue5945] PyMapping_Check returns 1 for lists

2017-03-05 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: needs patch -> patch review versions: -Python 3.4 ___ Python tracker ___

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

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden resolution: fixed -> stage: resolved -> status: closed -> open ___ Python tracker

[issue29730] unoptimal calls to PyNumber_Check

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +mark.dickinson, serhiy.storchaka ___ Python tracker ___

[issue24329] __qualname__ and __slots__

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: serhiy.storchaka -> xiang.zhang ___ Python tracker ___

[issue29731] Ability to filter warnings to print current stack

2017-03-05 Thread Matthias Bussonnier
New submission from Matthias Bussonnier: The warning module is extremely useful, especially the ability to change various level of verbosity and filter by multiple criteria. It is though sometime hard to pinpoint why a warning was triggered, or actually what triggered a warning. This is

[issue29714] can't interpolate byte string with \x00 before replacement identifier

2017-03-05 Thread Xiang Zhang
Xiang Zhang added the comment: The problem is now _PyBytes_FormatEx uses strchr to sniff %. It should use memchr instead. -- assignee: -> xiang.zhang nosy: +xiang.zhang ___ Python tracker

[issue29657] os.symlink: FileExistsError shows wrong message

2017-03-05 Thread Xiang Zhang
Xiang Zhang added the comment: I agree with Eryk. The error message is misleading. When I see it, I take it as source -> destination. I think we should make the error message clearer, or document it in the OSError documentation. -- ___ Python

[issue15290] setAttribute() can fail

2017-03-05 Thread Craig Rodrigues
Craig Rodrigues added the comment: Same issue was brought up in http://bugs.python.org/issue4851 -- nosy: +Craig Rodrigues ___ Python tracker ___

[issue24329] __qualname__ and __slots__

2017-03-05 Thread Xiang Zhang
Xiang Zhang added the comment: PR made. :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24329] __qualname__ and __slots__

2017-03-05 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +405 ___ Python tracker ___ ___ Python-bugs-list

[issue29719] "Date" of what's new is confusing

2017-03-05 Thread Ned Deily
Ned Deily added the comment: Heh, it looks like we agree! -- ___ Python tracker ___ ___ Python-bugs-list

[issue29719] "Date" of what's new is confusing

2017-03-05 Thread INADA Naoki
INADA Naoki added the comment: I'm sorry, I was wrong. https://docs.python.org/3.5/whatsnew/3.5.html asyncio has "Updates in 3.5.1:" section. provisional package will introduce updates in what's new in bugfix release. So is it OK to just removing Date and Release field? "Date (when this HTML

[issue29719] "Date" of what's new is confusing

2017-03-05 Thread Ned Deily
Ned Deily added the comment: > Additonally, unlike "changelog", "What's New" only shows difference between > 3.5 and 3.6. It won't be updated to describe changes between 3.6.0 and 3.6.1. That's not always true. There are occasionally changes made in the What's New document for maintenance

[issue4851] xml.dom.minidom.Element.cloneNode fails with AttributeError

2017-03-05 Thread Craig Rodrigues
Craig Rodrigues added the comment: This looks like a duplicate of https://bugs.python.org/issue15290 . 15290 was closed as invalid, and the submitter was told that the code should be changed to not rely on creating elements outside of the document interface. I encountered the same problem when

[issue29719] "Date" of what's new is confusing

2017-03-05 Thread INADA Naoki
INADA Naoki added the comment: Additonally, unlike "changelog", "What's New" only shows difference between 3.5 and 3.6. It won't be updated to describe changes between 3.6.0 and 3.6.1. -- ___ Python tracker

[issue29719] "Date" of what's new is confusing

2017-03-05 Thread INADA Naoki
INADA Naoki added the comment: https://docs.python.org/3.7/whatsnew/3.6.html shows: Release:3.7.0a0 Date: February 15, 2017 Is it make sense for you? -- ___ Python tracker

[issue29719] "Date" of what's new is confusing

2017-03-05 Thread Ned Deily
Ned Deily added the comment: Sorry, I disagree. I think the point of adding these directives is that shows for what release of 3.6.x they apply. It is expected that the What's New documents may be updated during the lifecycle of a major release and having the release and date there lets the

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

2017-03-05 Thread Zachary Ware
Zachary Ware added the comment: This seems to have broken test_re on Windows, see https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.1 I found this change to be the culprit via git bisect, unfortunately we didn't have any working CI on Windows (buildbots were otherwise broken) at

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-05 Thread Eryk Sun
Eryk Sun added the comment: > I don't have a specific problem that it causes. Adding an arbitrary directory ahead of the standard library in sys.path is a problem waiting to happen. This also happens when the import source is a zip file, e.g. a .pyz app. --

[issue29719] "Date" of what's new is confusing

2017-03-05 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +404 ___ Python tracker ___ ___

[issue29695] Weird keyword parameter names in builtins

2017-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Victor and Serhiy that we can bypass a deprecation phase here and just get it done. In the rare case of int(x=3.14), the fix is trivial. -- nosy: +rhettinger ___ Python tracker

[issue29730] unoptimal calls to PyNumber_Check

2017-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for removing each of these calls to PyNumber_Check. -- nosy: +rhettinger ___ Python tracker ___

[issue29726] test_xmlrpc raises DeprecationWarnings

2017-03-05 Thread dillon.brock
dillon.brock added the comment: The cherry-pick is causing a merge conflict because 3.6 and 3.5 do not include the SimpleXMLRPCDispatcherTestCase that this fix modifies. Should I backport that entire test case as well as the fix? -- ___ Python

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-05 Thread Ned Batchelder
Ned Batchelder added the comment: I don't have a specific problem that it causes. It's just a difference from any previous CPython version. About the PyPy thing: it has always behaved this way: $ for ver in 4.0.1 5.1.1 5.4.0 5.6.0; do py=/usr/local/pythonz/pythons/PyPy-$ver/bin/pypy; $py -V;

[issue29730] unoptimal calls to PyNumber_Check

2017-03-05 Thread Oren Milman
New submission from Oren Milman: current state if (PyNumber_Check(obj)) { someVar = PyNumber_AsSsize_t(obj, SomeError); if (someVar == -1 && PyErr_Occurred()) { return errVal; } } else { PyErr_Format(PyExc_TypeError, "integer

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +403 ___ Python tracker ___ ___

[issue28682] Bytes support in os.fwalk()

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +402 ___ Python tracker ___ ___

[issue29196] Remove old-deprecated plistlib features

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +401 ___ Python tracker ___ ___

[issue29729] UUID bytes constructor has too-tight an assertion

2017-03-05 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue28749] Fixed the documentation of the mapping codec APIs

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +400 ___ Python tracker ___ ___

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-05 Thread Eryk Sun
Eryk Sun added the comment: That's not the current directory. It's the 'script' directory (i.e. the parent of main361), as set by PySys_SetArgv when Py_IsolatedFlag isn't set. The old behavior was for RunMainFromImporter to unconditionally replace this directory in sys.path with the import

[issue29724] Itertools docs propose a harmful “speedup” without any explanation

2017-03-05 Thread STINNER Victor
STINNER Victor added the comment: > Victor will probably tell me I'm micro-benchmarking this the wrong way, so to satisfy him I did one more run: You are doing it the wrong way :-D Please replace Timeit(...) with runner=perf.Runner() and then runner.timeit('bench1', ...). Runner spaws

[issue29695] Weird keyword parameter names in builtins

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +399 ___ Python tracker ___ ___

[issue24037] Argument Clinic: add the boolint converter

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +398 ___ Python tracker ___ ___

[issue29645] webbrowser module import has heavy side effects

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +397 ___ Python tracker ___ ___

[issue29728] Expose TCP_NOTSENT_LOWAT

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

[issue29728] Expose TCP_NOTSENT_LOWAT

2017-03-05 Thread Nathaniel Smith
Changes by Nathaniel Smith : -- pull_requests: +396 ___ Python tracker ___ ___

[issue29729] UUID bytes constructor has too-tight an assertion

2017-03-05 Thread Nic Watson
New submission from Nic Watson: The assertion: File "/usr/lib/python3.6/uuid.py", line 150, in __init__ assert isinstance(bytes, bytes_), repr(bytes) is too specific (and IMHO, unpythonic). One may want to pass a bytearray or a memoryview. See int.from_bytes for an example that takes

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-05 Thread Ned Deily
Ned Deily added the comment: I think this is a result of the changes introduced with Issue29319. Perhaps a more prominent NEWS entry is needed? Nick? Ned, does this change in behavior cause problems? -- nosy: +ncoghlan, ned.deily ___ Python

[issue29727] collections.abc.Reversible doesn't fully support the reversing protocol

2017-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: One other thought: array.array() object should probably be registered so that it recognizable as a Sequence and as Reversible. -- ___ Python tracker

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +395 ___ Python tracker ___ ___

[issue29724] Itertools docs propose a harmful “speedup” without any explanation

2017-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Additional note: For folks interested in performance, it is common for people not to realize that function call overhead can dominate their timings (see this recent SO question as a recent, but typical example http://stackoverflow.com/questions/41772054

[issue29728] Expose TCP_NOTSENT_LOWAT

2017-03-05 Thread Nathaniel Smith
New submission from Nathaniel Smith: https://github.com/python/cpython/pull/477 -- components: Library (Lib) messages: 289041 nosy: njs priority: normal severity: normal status: open title: Expose TCP_NOTSENT_LOWAT ___ Python tracker

[issue29727] collections.abc.Reversible doesn't fully support the reversing protocol

2017-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think this is a bug. The purpose collections.abc.Reversible is to recognize type where the behavior has been guaranteed, not to recognize all types where it happens to work. Part of the original reason for introducing ABCs in the first place was

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +394 ___ Python tracker ___ ___

[issue29727] collections.abc.Reversible doesn't fully support the reversing protocol

2017-03-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: collections.abc.Reversible doesn't work with types that are supported by reserved() but neither have the __reversed__ method nor are explicitly registered as collections.abc.Sequence. For example: >>> issubclass(array.array, collections.abc.Reversible)

[issue29724] Itertools docs propose a harmful “speedup” without any explanation

2017-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: The reason that this comment was added was to note the recipes themselves are unoptimized and to provide some guideance on how that could be done. The recipes themselves are provided in the cleaner looking form. FWIW, localizing variables is one of the

[issue29724] Itertools docs propose a harmful “speedup” without any explanation

2017-03-05 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Seems this has fixed issue25744. This is interesting, if I remember correctly the relevant typing classes were added only recently. I will take a look at how to back-port this (probably this will require some code changes) --

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ivan! Seems this has fixed issue25744. Don't you mind to backport your changes to 3.6 and 3.5? -- versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue25744] Reference leaks in test_collections

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Closed in favor of issue29638. The latter has a patch. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Spurious failures in test_collections in releak hunting mode after typing is imported

[issue29724] Itertools docs propose a harmful “speedup” without any explanation

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have got 15% speed up. But two of my variants (the first and the second) speed up the calculation by 2.8 and 3.6 times correspondingly. It doesn't make sense to talk about microoptimization of the example if rewriting it without using iterator tools can

[issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE

2017-03-05 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE

2017-03-05 Thread Senthil Kumaran
Senthil Kumaran added the comment: The .github directory needs to stay and is being used for other purposes (like providing contributing guidelines (https://github.com/blog/1184-contributing-guidelines)). The old pull request template has already been deleted:

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > If you just want to add a workaround in dash_R_cleanup, I think it would be > better to generate the list of all abstract classes and add three typing > classes to it. Yes, I just updated the PR. I have found something else unrelated to typing, this test

[issue29724] Itertools docs propose a harmful “speedup” without any explanation

2017-03-05 Thread Leonid R.
Leonid R. added the comment: I think this is a "last resort" optimization and shouldn't be encouraged, especially in the official documentation. There are plenty of real optimizations you can do before doing micro-optimizations like this, and there is no reason it should be mentioned in the

[issue29724] Itertools docs propose a harmful “speedup” without any explanation

2017-03-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The localization using keyword parameters is a very old trick to avoid global lookups. It does give a noticeable speedup, esp. when the localized variables are used in tight loops or the function itself is used in such loops. The 5% speedup Steven

[issue29724] Itertools docs propose a harmful “speedup” without any explanation

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How it comparing with return vec1[0]*vec2[0]+vec1[1]*vec2[1]+vec1[2]*vec2[2] and x1, y1, z1 = vec1 x2, y2, z2 = vec2 return x1*x2+y1*y2+z1*z2 and x1, y1, z1 = vec1 x2, y2, z2 = vec2 return sum(a*b for a, b in zip(vec1, vec2))

[issue29724] Itertools docs propose a harmful “speedup” without any explanation

2017-03-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: On my computer, running Python 3.5 and continuing to do other tasks while the tests are running, I get a reproducible 5% speedup by using the "default values" trick. Here's my code: import operator def dotproduct(vec1, vec2): return sum(map(operator.mul,

[issue29726] test_xmlrpc raises DeprecationWarnings

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Dillon! Could you backport your changes to 3.6 and 3.5? -- ___ Python tracker ___

[issue29726] test_xmlrpc raises DeprecationWarnings

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +p...@motejlek.net, serhiy.storchaka stage: -> patch review versions: +Python 3.5, Python 3.6 ___ Python tracker

[issue29726] test_xmlrpc raises DeprecationWarnings

2017-03-05 Thread dillon.brock
Changes by dillon.brock : -- pull_requests: +393 ___ Python tracker ___ ___

[issue29726] test_xmlrpc raises DeprecationWarnings

2017-03-05 Thread dillon.brock
New submission from dillon.brock: In 3 unit tests, test_xmlrpc calls assertRaises(Exception, expectedRegex='method'), causing DeprecationWarnings. These calls should be replaced with assertRaisesRegex(Exception, 'method'). 0:20:56 [378/404] test_xmlrpc 127.0.0.1 - - [05/Mar/2017 11:53:45]

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I just wonder is there any other negative consequences? inspect.isabstract() returning False for abstract class looks a bug to me. If you just want to add a workaround in dash_R_cleanup, I think it would be better to generate the list of all abstract

[issue29724] Itertools docs propose a harmful “speedup” without any explanation

2017-03-05 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- nosy: +steven.daprano ___ Python tracker ___ ___

[issue20774] collections.deque should ship with a stdlib json serializer

2017-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, one of the design goal for deques was to make them easily substitutable for lists when needed. This feature request is a nice-to-have that moves us a little closer. That said, I think a __json__ attribute is too big of a hammer for this simple

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

2017-03-05 Thread Jürgen A . Erhard
New submission from Jürgen A. Erhard: It's an attribute mentioned in fetchmany and fetchall, but it's not in the list with those two, but it should be, since the section says "A Cursor instance has the following attributes and methods." and it is an attribute. -- assignee: docs@python

[issue20774] collections.deque should ship with a stdlib json serializer

2017-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: There is a difference. An __json__ attribute would have to convert to a list first. Adding support directly to the json module would allow the deque to be read directly. I think you all are leaning towards premature generalization and making this harder

[issue29649] struct.pack_into check boundary error message ignores offset

2017-03-05 Thread Andrew Nester
Andrew Nester added the comment: Thanks Serhiy! Just implemented new error messages in my PR for case you mentioned. -- ___ Python tracker ___

[issue29724] Itertools docs propose a harmful “speedup” without any explanation

2017-03-05 Thread Chris Warrick
New submission from Chris Warrick: The itertools recipes list [0] ends with the following dubious advice: > Note, many of the above recipes can be optimized by replacing global lookups > with local variables defined as default values. For example, the dotproduct > recipe can be written as: >

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > What if explicitly set __abstractmethods__ = True for these types? Unfortunately this does not help. I think this is because dash_R_cleanup only clears caches for classes in collections.abc.__all__ and their immediate .__subclasses__(). Making this

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What if explicitly set __abstractmethods__ = True for these types? -- ___ Python tracker ___

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Are typing.ChainMap and others actually abstract classes? They are abstract classes in the sense that they are instances of abc.ABCMeta. However, for some reasons inspect checks __flags__ attribute. The latter probably reflects the fact that Deque etc. do

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > So maybe we just need to add all ABC caches to typing._cleanups (just in > case). I don't know. Sorry, I didn't remember exactly reasons why I didn't move the clearing of all ABC caches into clear_caches(). Perhaps I suspected that this can have unwanted

[issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch

2017-03-05 Thread Petr MOTEJLEK
Changes by Petr MOTEJLEK : -- pull_requests: +392 ___ Python tracker ___ ___

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > why not add corresponding clearing methods obj._abc_cache.clear and > obj._abc_negative_cache.clear to typing._cleanups ? OK, this is another possible solution. I didn't think about this, because now typing._cleanups only clear generic caches (not ABC

[issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch

2017-03-05 Thread Petr MOTEJLEK
Changes by Petr MOTEJLEK : -- pull_requests: +391 ___ Python tracker ___ ___

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there are problems with ABC caches of typing.ChainMap, typing.Counter, and typing.DefaultDict, why not add corresponding clearing methods obj._abc_cache.clear and obj._abc_negative_cache.clear to typing._cleanups ? Why there are problems only with ABC

[issue20774] collections.deque should ship with a stdlib json serializer

2017-03-05 Thread R. David Murray
R. David Murray added the comment: I disagree, I think a __json__ protocol is sensible. But this is why it needs to be discussed on python-dev or python-ideas first :) In the meantime adding deque support like we added enum support is reasonable, but IMO we shouldn't go to crazy adding

[issue29718] Fixed compile on cygwin.

2017-03-05 Thread STINNER Victor
STINNER Victor added the comment: Please remove TSS from the Cygwin patch in that case. -- ___ Python tracker ___

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-05 Thread Ned Batchelder
Ned Batchelder added the comment: BTW, I don't know if this is relevant, but PyPy has added the current directory in this situation for a long time. -- ___ Python tracker

[issue16535] json encoder unable to handle decimal

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The trick from msg176158 no longer works since issue26719. -- ___ Python tracker ___

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-05 Thread Ned Batchelder
New submission from Ned Batchelder: 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py Previous versions, including 3.6.0, did not. Is this intentional? $ pwd /Users/ned/foo $ cat main361/__main__.py import pprint, sys pprint.pprint(sys.path) $ for ver in

[issue29718] Fixed compile on cygwin.

2017-03-05 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: We should avoid to submit quickfix to official as much as we can. Especially the case of unofficial (or inarticulate) support platform, a patch for specific platform is probably rejected because the code won't be maintained. Thread Specific Storage API

[issue27362] json.dumps to check for obj.__json__ before raising TypeError

2017-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This feature already was proposed for simplejson (https://github.com/simplejson/simplejson/issues/52). Special __json__ method is used in wild in a number of projects for exactly this purpose. It looks to me the main disagreement in the past Python-Idea

[issue27362] json.dumps to check for obj.__json__ before raising TypeError

2017-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with David Murray that this should be kicked around on python-dev or python-ideas first. Also, we should ask Bob Ippolito for his thoughts. -- assignee: -> bob.ippolito nosy: +bob.ippolito, rhettinger

  1   2   >