[issue32012] Disallow ambiguous syntax f(x for x in [1],)

2017-11-15 Thread Nick Coghlan
Nick Coghlan added the comment: With issue 32023 (base class lists) and 32034 (fixing the documentation for decorator factory function calls) covering the other refinements, this particular issue is done now. The most recent PR is the one for issue 32023. -- resolution: -> fixed sta

[issue31801] vars() manipulation encounters problems with Enum

2017-11-15 Thread Eric Wieser
Eric Wieser added the comment: Not necessarily an argument against this feature, but two workarounds exist for this already: 1. Use `nonlocal` to prevent `value` going into the class namespace: value = None class BaudRate(enum.Enum): nonlocal value for value

[issue32023] Always require parentheses for genexps in base class lists

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4349 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue32024] Nominal decorator function call syntax is inconsistent with regular function calls

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since this change is approved, this is a documentation issue, and I left it on to Nick. -- ___ Python tracker ___ _

[issue31983] Officially add Py_SETREF and Py_XSETREF

2017-11-15 Thread Stefan Krah
Change by Stefan Krah : -- nosy: -skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue32031] Do not use the canonical path in pydoc test_mixed_case_module_names_are_lower_cased

2017-11-15 Thread Xavier de Gaye
New submission from Xavier de Gaye : test_mixed_case_module_names_are_lower_cased fails when there is a symlink in the directory path of the installed standard library. -- components: Tests messages: 306259 nosy: xdegaye priority: normal severity: normal stage: needs patch status: open

[issue32032] Module-level pickle tests test only default implementation

2017-11-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : In Python 2 tests for module-level API test both implementations, pickle and cPickle. In Python 3 they test only the default implementation. If _pickle is available, the Python implementation of module-level functions is not tested. -- assignee: s

[issue32032] Module-level pickle tests test only default implementation

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4350 stage: needs patch -> patch review ___ Python tracker ___ ___ P

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

2017-11-15 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +4351 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32033] The pwd test test_values fails on Android

2017-11-15 Thread Xavier de Gaye
New submission from Xavier de Gaye : On Android API 24: $ python -c "import pwd; print(pwd.getpwuid(0))" pwd.struct_passwd(pw_name='root', pw_passwd='', pw_uid=0, pw_gid=0, pw_gecos=None, pw_dir='/', pw_shell='/system/bin/sh') The pw_gecos member is None and the test_values test of pwd fails b

[issue32033] The pwd test test_values fails on Android

2017-11-15 Thread STINNER Victor
STINNER Victor added the comment: > self.assertIsInstance(e.pw_gecos, str) This test is wrong: it's perfectly fine to get None here. Python must not test the OS itself, but only test our own code: make sure that Python converts properly C types to nice Python types, so a string or None. I pr

[issue32033] The pwd test test_values fails on Android

2017-11-15 Thread STINNER Victor
STINNER Victor added the comment: Hum, I changed my mind a little bit :-) > (2) to modify the sets() function in Modules/pwdmodule.c to set an empty > string instead of None when the member of the passwd structure is a NULL > pointer. I checked the doc: pwd doesn't mention None at all :-( ht

[issue32032] Module-level pickle tests test only default implementation

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6545256df93ba54f811206107274cfa5a6d76b86 by Serhiy Storchaka in branch 'master': bpo-32032: Test both implementations of module-level pickle API. (#4401) https://github.com/python/cpython/commit/6545256df93ba54f811206107274cfa5a6d76b86 --

[issue32032] Module-level pickle tests test only default implementation

2017-11-15 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4352 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue32025] Add time.thread_time()

2017-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 15/11/2017 à 02:48, STINNER Victor a écrit : > > Would it be possible to not provide the function if it's not supported by a > platform? Probably, yes. > Do you know platforms which don't support time.thread_time()? Any POSIX platform which doesn't have

[issue10049] Add a "no-op" (null) context manager to contextlib

2017-11-15 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: I am of course willing to sign the CLA (please send further instructions via email), although I don't know how useful my original patch is, given that it caches the null context manager. -- ___ Python tracker

[issue32032] Module-level pickle tests test only default implementation

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset eb38367f20b05f2ad04a4833bceb369b5e78b1a3 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-32032: Test both implementations of module-level pickle API. (GH-4401) (#4403) https://github.com/python/cpython/commit/eb38367f20b05f2ad0

[issue32034] Impossible to unpickle IncompleteReadError

2017-11-15 Thread badouxn
New submission from badouxn : When using asyncio in combination with multiprocessing, a TypeError occur when readuntil() encounter an EOF instead of the delimiter. readuntil return a IncompleteReadError exception which is pickled by the multiprocessing package. The unpickling failed due to an a

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread badouxn
Change by badouxn : -- title: Impossible to unpickle IncompleteReadError -> Error when unpickling IncompleteReadError ___ Python tracker ___ ___

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread badouxn
Change by badouxn : -- versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread badouxn
Change by badouxn : -- keywords: +patch pull_requests: +4353 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mail

[issue32032] Module-level pickle tests test only default implementation

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue27494] 2to3 parser failure caused by a comma after a generator expression

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since this syntax never was valid according to the Python language specification, and it causes SyntaxError in 3.7 (see issue32012), I think that this change should be reverted. -- resolution: fixed -> stage: resolved -> status: closed -> open __

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This isn't so simple. >>> from asyncio.streams import IncompleteReadError >>> import pickle >>> e1 = IncompleteReadError(b'abc', 10) >>> e2 = pickle.loads(pickle.dumps(e1)) >>> print(e1) 3 bytes read on a total of 10 expected bytes >>> print(e2) 44 bytes read

[issue32035] Documentation of zipfile.ZipFile().writestr() fails to mention that 'data' may also be bytes

2017-11-15 Thread Daniel
New submission from Daniel : The documentation for "ZipFile.writestr(zinfo_or_arcname, data[, compress_type])" says: "Write the string data to the archive; [...]" --> https://docs.python.org/3/library/zipfile.html I fails to mention that data could also be bytes. The source code does mention i

[issue32035] Documentation of zipfile.ZipFile().writestr() fails to mention that 'data' may also be bytes

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +easy stage: -> needs patch type: -> enhancement versions: -Python 3.4, Python 3.5, Python 3.8 ___ Python tracker ___ __

[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2017-11-15 Thread Josh Cullum
Josh Cullum added the comment: Hi Ned, Tried that but unfortunately it didn't work. It still produces an error within the make install function which then re-removes the module - it does however create a folder called tkinter. -- ___ Python tracke

[issue31807] unitest.mock: Using autospec=True conflicts with 'wraps'

2017-11-15 Thread Lukas Anzinger
Lukas Anzinger added the comment: I can reproduce the problem and have analyzed it a bit. My use case is a bit different, I want to use autospec=True and wraps= so that I can mock unbound methods but return the result from the original method (see also https://docs.python.org/3/library/unitte

[issue31949] Bugs in PyTraceBack_Print()

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset edad8eebeee3c99e324a7f1ac5073167c2b0b54d by Serhiy Storchaka in branch 'master': bpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). (#4289) https://github.com/python/cpython/commit/edad8eebeee3c99e324a7f1ac5073167c2b

[issue32023] Always require parentheses for genexps in base class lists

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ddbce1378644f9d5ad0651e1c9035bd8c6502edc by Serhiy Storchaka in branch 'master': bpo-32023: Disallow genexprs without parenthesis in class definitions. (#4400) https://github.com/python/cpython/commit/ddbce1378644f9d5ad0651e1c9035bd8c6502edc

[issue32011] Restore loading of TYPE_INT64 in marshal

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 00987f6230fcdbecc8d9ab4b2b9fae8f99a1a4a9 by Serhiy Storchaka in branch 'master': bpo-32011: Revert "Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal." (#4381) https://github.com/python/cpython/commit/00987f6230fcdbec

[issue32011] Restore loading of TYPE_INT64 in marshal

2017-11-15 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4354 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue31949] Bugs in PyTraceBack_Print()

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4355 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30950] Convert round() to Arument Clinic

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset aca7f574b06c72c85a5e3e4b16a8a5e384a7c4a8 by Serhiy Storchaka in branch 'master': bpo-30950: Convert round() to Argument Clinic. (#2740) https://github.com/python/cpython/commit/aca7f574b06c72c85a5e3e4b16a8a5e384a7c4a8 --

[issue30950] Convert round() to Arument Clinic

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: -Documentation for round() is incorrect. resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue30399] Get rid of trailing comma in the repr() of BaseException

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f8a4c03ede6048022f60a58d5a21b278b78a8a16 by Serhiy Storchaka in branch 'master': bpo-30399: Get rid of trailing comma in the repr of BaseException. (#1650) https://github.com/python/cpython/commit/f8a4c03ede6048022f60a58d5a21b278b78a8a16

[issue30399] Get rid of trailing comma in the repr() of BaseException

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue32023] Always require parentheses for genexps in base class lists

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue30143] Using collections ABC from collections.abc rather than collections in 2to3 converted code

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What are your thoughts about this Benjamin? -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue32011] Restore loading of TYPE_INT64 in marshal

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue31949] Bugs in PyTraceBack_Print()

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3864248866d6224336c7be49670447cb4d125cd6 by Serhiy Storchaka in branch '3.6': [3.6] bpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). (GH-4289) (#4406) https://github.com/python/cpython/commit/3864248866d6224336c7be

[issue31949] Bugs in PyTraceBack_Print()

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 ___ Python tracker ___ ___

[issue32011] Restore loading of TYPE_INT64 in marshal

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d15bb5fcad584e113836486d17c6abcbf2168a86 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-32011: Revert "Issue GH-15480: Remove the deprecated and unused TYPE_INT64 code from marshal." (GH-4381) (#4405) https://github.com/python

[issue30143] Using collections ABC from collections.abc rather than collections in 2to3 converted code

2017-11-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 I think this change will be essential. IIRC, elsewhere Guido approved a 3.7 change so that the ABC will no longer be visible in collections. -- nosy: +rhettinger ___ Python tracker

[issue32036] error mixing positional and non-positional arguments with `argparse`

2017-11-15 Thread Stefan Seefeld
New submission from Stefan Seefeld : I'm trying to mix positional and non-positional arguments with a script using `argparse`, but I observe inconsistent behaviour. The attached test runs fine when invoked with test_argparse.py --info a a=b test_argparse.py a a=b --info but produces the error

[issue31983] Officially add Py_SETREF and Py_XSETREF

2017-11-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Adding my -1. My experience was that these macros impaired my ability to maintain the code and interfered with useful patterns like delaying all decrefs until an object was in a consistent state. While I know that name was bikeshedded quite a bit, the ou

[issue32037] Pickle 32-bit integers with protocol 0 as INT instead of LONG

2017-11-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : In Python 3 different opcodes are used for pickling integers with protocol 1 and higher. But pickling with protocol 0 always uses the LONG opcode. In Python all such integers are unpickled to the long instances. Proposed PR makes integers that fit in a si

[issue32037] Pickle 32-bit integers with protocol 0 as INT instead of LONG

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4356 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue32033] The pwd module implementation incorrectly sets some attributes to None

2017-11-15 Thread Xavier de Gaye
Xavier de Gaye added the comment: > I'm not sure that it's very useful to distinguish NULL and an empty char* > string. I agree. An attribute of a ('pwd' Python module) password database entry corresponds to the field of a line in a 'passwd' text file. So it makes sense that when the field i

[issue32026] Memory leaks in Python on Windows

2017-11-15 Thread Steve Dower
Steve Dower added the comment: I don't think the refleak handling would detect leaks across PyInitialize/PyFinalize calls anyway. Really, we probably just need to loop Initialize/Finalize a few hundred times and measure the memory usage of the process before/after. That will handle a range o

[issue32030] PEP 432: Rewrite Py_Main()

2017-11-15 Thread STINNER Victor
STINNER Victor added the comment: I wrote a new "_PyInitError" type to report more information when something goes wrong: * indicate if it's an user error: don't abort() in that case * function name where the error was raised * error message Example: --- $ PYTHONHASHSEED=x ./python Fatal Pyth

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread badouxn
badouxn added the comment: My first fix was indeed wrong. Upon looking further into it, it seems to me that the problem come from the fact that the call to super is not done with the right argument. Upon unpickling, the argument that will be passed to the __init__ is the string representatio

[issue32018] inspect.signature does not respect PEP 8

2017-11-15 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +4357 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue32033] The pwd module implementation incorrectly sets some attributes to None

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I disagree. This is an old API, a thin wrapper around standard POSIX API, and returning an empty string instead of None will make impossible to distinguish NULL from "". It is easy to convert None in an empty string in Python: `value or ''`. I would change

[issue32018] inspect.signature does not respect PEP 8

2017-11-15 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue32036] error mixing positional and non-positional arguments with `argparse`

2017-11-15 Thread R. David Murray
R. David Murray added the comment: Can you reproduce this without your PosArgsParser? -- nosy: +r.david.murray ___ Python tracker ___ __

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread badouxn
badouxn added the comment: Typo in the last comment. The code should be: ''' def __init__(self, partial, expected): super().__init__(partial, expected) self.partial = partial self.expected = expected def __str__(self): return ("%d bytes read on a to

[issue32021] Brotli encoding is not recognized by mimetypes

2017-11-15 Thread R. David Murray
R. David Murray added the comment: OK, bouncing around from those URL I finally found this: https://github.com/google/ngx_brotli/issues/28 That indicates unambiguously that someone does expect files to be pre-compressed on the server and that the main brotli package provides a cli tool (I co

[issue32036] error mixing positional and non-positional arguments with `argparse`

2017-11-15 Thread Stefan Seefeld
Stefan Seefeld added the comment: On 15.11.2017 12:54, R. David Murray wrote: > Can you reproduce this without your PosArgsParser? I can indeed (by simply commenting out the `action` argument to the `add_argument()` calls). That obviously results in all positional arguments being accumulated in

[issue32018] inspect.signature does not respect PEP 8

2017-11-15 Thread Dong-hee Na
Dong-hee Na added the comment: I've submitted a patch. :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32018] inspect.signature does not respect PEP 8

2017-11-15 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 762b9571c9c8c6b036f1bf90140a1d030b3f9a01 by Yury Selivanov (Dong-hee Na) in branch 'master': bpo-32018: Fix inspect.signature repr to follow PEP 8 (#4408) https://github.com/python/cpython/commit/762b9571c9c8c6b036f1bf90140a1d030b3f9a01 ---

[issue32018] inspect.signature does not respect PEP 8

2017-11-15 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +4358 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread Yury Selivanov
Yury Selivanov added the comment: > Does such a fix looks correct to you ? No, this fix won't restore exception.args properly. I made a PR with a fix. -- ___ Python tracker _

[issue32038] Add API to intercept socket.close()

2017-11-15 Thread Yury Selivanov
New submission from Yury Selivanov : asyncio has a few APIs that accept a Python socket object: loop.sock_recv(), loop.sock_accept() etc. asyncio (and event loops such as uvloop) expect that it controls the socket for the duration of the call. However, it cannot prevent the socket object from

[issue32038] Add API to intercept socket.close()

2017-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why not instead add `loop.sock_close()`? -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue32025] Add time.thread_time()

2017-11-15 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4359 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32038] Add API to intercept socket.close()

2017-11-15 Thread Yury Selivanov
Yury Selivanov added the comment: > Why not instead add `loop.sock_close()`? It wouldn't help if the program calls `socket.close()` somewhere. This can happen easily in big code bases. Ideally (at least I think so) we need to provide a guarantee that the socket object can't be closed at all

[issue32038] Add API to intercept socket.close()

2017-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, that sounds reasonable to me. Also cc'ing Ben Darnell (maintainer of Tornado) in case he wants to chime in. -- nosy: +Ben.Darnell ___ Python tracker ___

[issue32036] error mixing positional and non-positional arguments with `argparse`

2017-11-15 Thread Stefan Seefeld
Stefan Seefeld added the comment: It looks like https://bugs.python.org/issue14191 is a conversation about the same inconsistent behaviour. It is set to "fixed". Can you comment on this ? Should I follow the advice mentioned there about how to work around the issue ? -- _

[issue32039] timeit documentation should describe caveats

2017-11-15 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : timeit is cool, but it's not appropriate for all performance testing. For example, since it uses only a single Python process, anything that's cached is not a good candidate for timeit profiling. The classic example is timing imports. E.g. these are not

[issue32040] Sorting pahtlib.Paths does give the same order as sorting the (string) filenames of that pathlib.Paths

2017-11-15 Thread QbLearningPython
New submission from QbLearningPython : While testing a module, I have found a weird behaviour of pathlib package. I have a list of pathlib.Paths and I sorted() it. I assumed that the order retrieved by sorting a list of Paths would be the same as the order retrieved by sorting the list of thei

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is the same issue with LimitOverrunError. I'm not sure that we should keep args the same. It affects __str__ and __repr__. badouxn overrides __str__. And the result of __repr__ currently looks like the exception constructor, but actually is not compat

[issue32040] Sorting pahtlib.Paths does give the same order as sorting the (string) filenames of that pathlib.Paths

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Paths are ordered by lexicographical order of their corresponding components. Paths are not strings, and this this order is more natural for them. The alphabetical order of Path strings: SPAMS.txt SPAM\file.txt spam\file.txt spams.txt

[issue32041] Cannot cast '\0' to c_void_p

2017-11-15 Thread Ilya Kulakov
New submission from Ilya Kulakov : Happens on 3.6.3 only: >>> import ctypes >>> ctypes.cast('\0', ctypes.c_void_p) ctypes.ArgumentError: argument 1: : embedded null character -- components: ctypes messages: 306307 nosy: Ilya.Kulakov priority: normal severity: normal status: open title:

[issue32025] Add time.thread_time()

2017-11-15 Thread STINNER Victor
STINNER Victor added the comment: I can work on the macOS implementation, once your PR will be merged. -- ___ Python tracker ___ ___

[issue32025] Add time.thread_time()

2017-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 15/11/2017 à 22:06, STINNER Victor a écrit : > > I can work on the macOS implementation, once your PR will be merged. Great! -- ___ Python tracker __

[issue26579] Support pickling slots in subclasses of common classes

2017-11-15 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +4360 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue26579] Support pickling slots in subclasses of common classes

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -4360 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue32039] timeit documentation should describe caveats

2017-11-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Other caveats: * The tight, repeated loops tend to have perfect branch prediction rates and 100% L1 cache hit rates that are rarely present in real code. There should be links to why this matters: - https://stackoverflow.com/questions/11227809 -

[issue32042] Option for comparing values instead of reprs in doctest

2017-11-15 Thread Tomáš Petříček
New submission from Tomáš Petříček : Would there be an interest and possibility to add an option to the doctest module to compare values instead of reprs? The idea is that the expected value would be eval'ed prior to comparison if this option was enabled. Motivation for this option is to enabl

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-15 Thread Ilya Kulakov
Ilya Kulakov added the comment: Victor, Does this change imply that no python-traceback-for-every-thread will be printed upon both handled and unhandled C++ exception? -- nosy: +Ilya.Kulakov ___ Python tracker

[issue32025] Add time.thread_time()

2017-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 4bd41c9b52ea0c730e9e294caaf003e54c088c6e by Antoine Pitrou in branch 'master': bpo-32025: Add time.thread_time() (#4410) https://github.com/python/cpython/commit/4bd41c9b52ea0c730e9e294caaf003e54c088c6e -- _

[issue32039] timeit documentation should describe caveats

2017-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: +1 to all said by Raymond. But this is rather the matter of a special article or blog post than a note in the documentation. Other example of caching is regular expressions. Mistakes: python3 -m timeit -s "it = iter(range(10))" "next(it)" python3

[issue32039] timeit documentation should describe caveats

2017-11-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Nov 15, 2017, at 17:00, Serhiy Storchaka wrote: > > +1 to all said by Raymond. But this is rather the matter of a special article > or blog post than a note in the documentation. Maybe a HOWTO on performance testing and analysis? We already have one on

[issue32039] timeit documentation should describe caveats

2017-11-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 43605e6bfa8d49612df4a38460d063d6ba781906 by Yury Selivanov in branch 'master': bpo-32034: Make IncompleteReadError & LimitOverrunError pickleable #4409 https://github.com/python/cpython/commit/43605e6bfa8d49612df4a38460d063d6ba781906 --

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4361 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue32036] error mixing positional and non-positional arguments with `argparse`

2017-11-15 Thread R. David Murray
R. David Murray added the comment: Ah, yes, I'd managed to forget about that issue, even though I was the one that finally committed the fix. So, the alternate parser will be in 3.7. In the meantime you can grab the code from the commit and put it in a local file, I think. You'll doubtless

[issue32042] Option for comparing values instead of reprs in doctest

2017-11-15 Thread Tomáš Petříček
Tomáš Petříček added the comment: Related to https://bugs.python.org/issue3332 -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue32042] Option for comparing values instead of reprs in doctest

2017-11-15 Thread Tomáš Petříček
Tomáš Petříček added the comment: This option can be seen as a more general case of the options already available which lift the requirement of exact representation match (True for 1, normalize whitespace etc.). It would enable easier testing of relevant behavior instead of repr's artifacts.

[issue32042] Option for comparing values instead of reprs in doctest

2017-11-15 Thread Tomáš Petříček
Tomáš Petříček added the comment: The following tests then succeed: def str_fun(): """ >>> str_fun() 'foo' >>> str_fun() "foo" >>> str_fun() '''foo''' """ return 'foo' def dict_fun(): """ >>> dict_fun() {'foo': 1, 'bar': 2} >>> dict_fun()

[issue32030] PEP 432: Rewrite Py_Main()

2017-11-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset f7e5b56c37eb859e225e886c79c5d742c567ee95 by Victor Stinner in branch 'master': bpo-32030: Split Py_Main() into subfunctions (#4399) https://github.com/python/cpython/commit/f7e5b56c37eb859e225e886c79c5d742c567ee95 -- __

[issue32042] Option for comparing values instead of reprs in doctest

2017-11-15 Thread R. David Murray
R. David Murray added the comment: I think it is an interesting idea. Let see what other people think. -- nosy: +r.david.murray ___ Python tracker ___

[issue32041] Cannot cast '\0' to c_void_p

2017-11-15 Thread Ilya Kulakov
Ilya Kulakov added the comment: That's the change that introduced the bug: https://github.com/python/cpython/pull/2285 -- ___ Python tracker ___ __

[issue32034] Error when unpickling IncompleteReadError

2017-11-15 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset f35076a002b958f991d180d6f945344cc5ab3900 by Yury Selivanov (Miss Islington (bot)) in branch '3.6': bpo-32034: Make IncompleteReadError & LimitOverrunError pickleable GH-4409 (#4411) https://github.com/python/cpython/commit/f35076a002b958f991d180

[issue32041] Cannot cast '\0' to c_void_p

2017-11-15 Thread Ilya Kulakov
Ilya Kulakov added the comment: I have fixed that problem by ensuring that ctypes-facing code passes bytes, not strings. -- ___ Python tracker ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-11-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4362 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31415] Add -X option to show import time

2017-11-15 Thread STINNER Victor
STINNER Victor added the comment: FYI I'm working on the Py_Main() function in bpo-32030. My latest PR (PR 4412) moves the code to parse -X importtime and PYTHONPROFILEIMPORTTIME into Py_Main(), to group all functions parsing the command line arguments and environment variables. With this ch

  1   2   >