[issue42513] Socket.recv hangs

2021-01-07 Thread Jakub Stasiak
Jakub Stasiak added the comment: If the edge-case is vaguely socket/file descriptor-related and not application-specific or otherwise secret do you mind sharing what is it? (I'm just curious) -- ___ Python tracker <https://bugs.python.

[issue42513] Socket.recv hangs

2020-12-27 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue42513> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42673] Optimize round_size for rehashing

2020-12-18 Thread Jakub Stasiak
Jakub Stasiak added the comment: I'd be especially curious about branch (mis)prediction stats before and after applying this patch – including such information seems necessary in a patch that's about optimization. -- nosy: +jstasiak ___ Python

[issue42590] Something like Rust's std::sync::Mutex – combining a mutex primitive and a piece of data it's protecting

2020-12-07 Thread Jakub Stasiak
New submission from Jakub Stasiak : I've been wondering if it's worth it to have something like Rust's std::sync::Mutex[1] which is used like this: let data = Mutex::new(0); { let mut unlocked = data.lock().unwrap(); *unlocked += 1; } // unlocked is no longer

[issue42390] Other Python implementations may not expose the module name in datetime type names

2020-11-18 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue42390> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42202] Optimize function annotation

2020-11-17 Thread Jakub Stasiak
Jakub Stasiak added the comment: Yurii, I don't believe that benchmark measures what you need to measure (once imported module is kept imported forever until unloaded, so successive imports are no-ops). See how the side effects of importing bbb only happen once: % cat bbb.py import time

[issue42202] Optimize function annotation

2020-11-16 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue42202> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17852] Built-in module _io can lose data from buffered files in reference cycles

2020-11-12 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue17852> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42319] The `functools.singledispatchmethod` example in the document cannot run

2020-11-12 Thread Jakub Stasiak
Jakub Stasiak added the comment: There's an earlier issue created that relates to this (https://bugs.python.org/issue39679) and there are some possible solutions to get singledispatchmethod and classmethod work there. -- nosy: +jstasiak

[issue42237] test_socket.SendfileUsingSendfileTest fails on illumos

2020-11-12 Thread Jakub Stasiak
Change by Jakub Stasiak : -- pull_requests: +22143 pull_request: https://github.com/python/cpython/pull/23246 ___ Python tracker <https://bugs.python.org/issue42

[issue42269] Add ability to set __slots__ in dataclasses

2020-11-11 Thread Jakub Stasiak
Jakub Stasiak added the comment: As a moderately-heavy dataclass user I support this. :) -- ___ Python tracker <https://bugs.python.org/issue42269> ___ ___ Pytho

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-11-05 Thread Jakub Stasiak
Jakub Stasiak added the comment: FYI your PR 20142 together with my PR https://github.com/python/cpython/pull/23154 allow me to run the whole test_asyncio test suite on OpenIndiana 5.11: $ ./python -m unittest -v test.test_asyncio (...) Ran 2298 tests in 71.668s OK (skipped=52) without

[issue41843] Reenable sendfile in shutil.copyfile() on Solaris

2020-11-05 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue41843> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42269] Add ability to set __slots__ in dataclasses

2020-11-05 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue42269> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41839] Solaris: Fix error checking in sched_get_priority_ functions

2020-11-05 Thread Jakub Stasiak
Jakub Stasiak added the comment: I think negative values aren't possible on Linux if one's to trust the sched_get_priority_min man page: Linux allows the static priority range 1 to 99 for the SCHED_FIFO and SCHED_RR policies, and the priority 0 for the remaining policies

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-11-05 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue38323> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42173] Drop Solaris support

2020-11-05 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue42173> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42237] test_socket.SendfileUsingSendfileTest fails on illumos

2020-11-04 Thread Jakub Stasiak
Jakub Stasiak added the comment: Thank you! I submitted a PR with a slightly modified patch (the comparison only happens on Solaris family of systems), I'd appreciate your confirmation that it still works (it's working for me on openindiana

[issue42237] test_socket.SendfileUsingSendfileTest fails on illumos

2020-11-04 Thread Jakub Stasiak
Change by Jakub Stasiak : -- pull_requests: +22066 pull_request: https://github.com/python/cpython/pull/23154 ___ Python tracker <https://bugs.python.org/issue42

[issue42237] test_socket.SendfileUsingSendfileTest fails on illumos

2020-11-04 Thread Jakub Stasiak
Jakub Stasiak added the comment: I thought I'd give it a shot and I believe i found the issue. Let's use the testCount test as an example. The client side (or the data sending side) looks like this: def _testCount(self): address = self.serv.getsockname() file = open

[issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables

2020-11-02 Thread Jakub Stasiak
Change by Jakub Stasiak : -- pull_requests: +22022 pull_request: https://github.com/python/cpython/pull/23105 ___ Python tracker <https://bugs.python.org/issue42

[issue42140] asyncio.wait function creates futures set two times

2020-11-01 Thread Jakub Stasiak
Jakub Stasiak added the comment: I opened https://bugs.python.org/issue42230 to make the documentation reflect the reality in this matter. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables

2020-11-01 Thread Jakub Stasiak
Change by Jakub Stasiak : -- keywords: +patch pull_requests: +21993 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23073 ___ Python tracker <https://bugs.python.org/issu

[issue42230] Document that asyncio's wait() and as_completed() accept arbitrary iterables

2020-11-01 Thread Jakub Stasiak
New submission from Jakub Stasiak : The documentation explicitly says "sets" but arbitrary iterables are accepted and various non-sets are passed to those in real world almost certainly. -- components: asyncio messages: 380128 nosy: asvetlov, jstasiak, yselivanov priori

[issue42140] asyncio.wait function creates futures set two times

2020-11-01 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue42140> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40901] It's not clear what "interface name" means in socket if_nameindex/if_nametoindex/if_indextoname on Windows

2020-10-19 Thread Jakub Stasiak
Jakub Stasiak added the comment: Cheers! -- ___ Python tracker <https://bugs.python.org/issue40901> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41081] Exclude __pycache__ directories from backups using CACHEDIR.TAG

2020-06-22 Thread Jakub Stasiak
Change by Jakub Stasiak : -- keywords: +patch pull_requests: +20231 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21060 ___ Python tracker <https://bugs.python.org/issu

[issue41081] Exclude __pycache__ directories from backups using CACHEDIR.TAG

2020-06-22 Thread Jakub Stasiak
New submission from Jakub Stasiak : It'd be nice of __pycache__ directories didn't pollute backups. Granted, one can add __pycache__ directory to their backup-tool-of-choice exclusion list, but those lists are ever growing and maybe it'd be good to help the tools and the users. There's

[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-06-14 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue40548> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40901] It's not clear what "interface name" means in socket if_nameindex/if_nametoindex/if_indextoname on Windows

2020-06-07 Thread Jakub Stasiak
Jakub Stasiak added the comment: if_nameindex(), if_indextoname() and if_nametoindex() have been implemented as part of https://bugs.python.org/issue37007 While working on ifaddr I discovered that all three different kinds of names ifaddr fetches for an interface on Windows are not what

[issue40901] It's not clear what "interface name" means in socket if_nameindex/if_nametoindex/if_indextoname on Windows

2020-06-07 Thread Jakub Stasiak
Change by Jakub Stasiak : -- keywords: +patch pull_requests: +19909 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20694 ___ Python tracker <https://bugs.python.org/issu

[issue40901] It's not clear what "interface name" means in socket if_nameindex/if_nametoindex/if_indextoname on Windows

2020-06-07 Thread Jakub Stasiak
New submission from Jakub Stasiak : On Windows there are different names for the same interface in different contexts. -- components: Library (Lib), Windows messages: 370894 nosy: jstasiak, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open

[issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables

2020-05-26 Thread Jakub Stasiak
Jakub Stasiak added the comment: Cheers for backporting this, Tal, you beat me to it! -- ___ Python tracker <https://bugs.python.org/issue38580> ___ ___ Pytho

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2020-05-19 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue27501> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37339] os.path.ismount returns true on nested btrfs subvolumes

2020-04-22 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue37339> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-02-06 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue39318> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39491] Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions

2020-02-06 Thread Jakub Stasiak
Change by Jakub Stasiak : -- pull_requests: +17766 pull_request: https://github.com/python/cpython/pull/18379 ___ Python tracker <https://bugs.python.org/issue39

[issue39491] Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions

2020-02-06 Thread Jakub Stasiak
Change by Jakub Stasiak : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39491] Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions

2020-02-03 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +levkivskyi ___ Python tracker <https://bugs.python.org/issue39491> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39491] Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions

2020-02-03 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue39491> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39298] add BLAKE3 to hashlib

2020-02-01 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue39298> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39491] Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions

2020-01-29 Thread Jakub Stasiak
Change by Jakub Stasiak : -- keywords: +patch pull_requests: +17636 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18260 ___ Python tracker <https://bugs.python.org/issu

[issue39491] Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions

2020-01-29 Thread Jakub Stasiak
Change by Jakub Stasiak : -- components: Library (Lib) nosy: jstasiak priority: normal severity: normal status: open title: Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions versions: Python 3.9

[issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables

2019-10-24 Thread Jakub Stasiak
New submission from Jakub Stasiak : Excerpt from the documentation: """This is a straightforward interface to the Unix select() system call. The first three arguments are sequences of ‘waitable objects’: either integers representing file descriptors or objects with a param

[issue13322] buffered read() and write() does not raise BlockingIOError

2019-10-10 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue13322> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29847] Path takes and ignores **kwargs

2019-05-17 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue29847> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34700] typing.get_type_hints doesn't know about typeshed

2019-05-17 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker <https://bugs.python.org/issue34700> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2018-07-31 Thread Jakub Stasiak
Jakub Stasiak added the comment: I appreciate the example, but I'd claim that's a "missing fixer" issue, not a "parser accepts too much" issue. Considering the syntax wasn't ambiguous (I think) and had been accepted before 3.7 I'll remain not to

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

2018-07-31 Thread Jakub Stasiak
Jakub Stasiak added the comment: Apologies for only responding now, I've not received any notifications after my original pull request had been merged. I only learned about the change being reverted from https://github.com/python/cpython/pull/8580, so let me leave my two cents here: I

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

2017-10-01 Thread Jakub Stasiak
Jakub Stasiak <jakub+python@stasiak.at> added the comment: By "forbid" do you mean "forbid in Python" (as in change Python syntax)? I like the idea but that seems like a more serious change and 2to3 arguably needs to handle code targeting ol

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

2017-09-26 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- keywords: +patch pull_requests: +3758 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

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

2017-07-19 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28629> ___

[issue12857] Expose called function on frame object

2017-07-18 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12857> ___

[issue20692] Tutorial and FAQ: how to call a method on an int

2017-07-03 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20692> ___

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

2017-02-15 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- versions: +Python 3.6, Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

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

2017-02-15 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- pull_requests: +87 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue8840] truncate() semantics changed in 3.1.2

2016-09-12 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8840> ___

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

2016-07-12 Thread Jakub Stasiak
New submission from Jakub Stasiak: Test file (test.py): print(set(x for x in range(2),)) Python runs it nicely: % python2 test.py set([0, 1]) % python3 test.py {0, 1} 2to3 parser (on both Python 2.7.11 and 3.5.2) chokes on it though: % /usr/local/Cellar/python/2.7.11/Frameworks

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-05-15 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26058> ___

[issue26219] implement per-opcode cache in ceval

2016-05-15 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26219> ___

[issue26110] Speedup method calls 1.2x

2016-05-15 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26110> ___

[issue25998] doctest terminates when accessing __wrapped__ raises an error

2016-05-11 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25998> ___

[issue23507] Tuple creation is too slow

2016-05-09 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23507> ___

[issue26814] [WIP] Add a new _PyObject_FastCall() function which avoids the creation of a tuple or dict for arguments

2016-05-09 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26814> ___

[issue25609] Add a ContextManager ABC and type

2016-03-18 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25609> ___

[issue26396] Create json.JSONType

2016-03-09 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26396> ___

[issue26335] Make mmap.write return the number of bytes written like other write methods

2016-03-02 Thread Jakub Stasiak
Jakub Stasiak added the comment: Glad I could help, thanks for merging! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26335> ___ __

[issue26435] Fix versionadded/versionchanged documentation directives

2016-02-25 Thread Jakub Stasiak
New submission from Jakub Stasiak: A double colon seems to be required for a directive to work, please find a patch attached. -- assignee: docs@python components: Documentation files: typos.patch keywords: patch messages: 260848 nosy: docs@python, jstasiak priority: normal severity

[issue26335] Make mmap.write return the number of bytes written like other write methods

2016-02-25 Thread Jakub Stasiak
Jakub Stasiak added the comment: Thank you. I didn't know whether to add an entry to Doc/whatsnew/3.6.rst, Misc/NEWS or both so I chose both, feel free to modify/remove as needed. The new patch also doesn't have a typo in the versionchanged directive present in the version 2. I noticed more

[issue26335] Make mmap.write return the number of bytes written like other write methods

2016-02-23 Thread Jakub Stasiak
Jakub Stasiak added the comment: Oops, sorry for the silliness in the C code, thanks for reviewing. I modified as suggested, please find the new patch attached. -- Added file: http://bugs.python.org/file42014/mmap_write_return_count2.patch

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-12 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15873> ___

[issue26335] Make mmap.write return the number of bytes written like other write methods

2016-02-10 Thread Jakub Stasiak
New submission from Jakub Stasiak: Since mmap objects are said to "behave like both bytearray and like file objects" I believe it's appropriate for the mmap.write() method to return the number of bytes written like write() of other file objects/interfaces I could find in the standa

[issue26292] Raw I/O writelines() broken

2016-02-05 Thread Jakub Stasiak
Changes by Jakub Stasiak <jakub+python@stasiak.at>: -- nosy: +jstasiak ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26292> ___

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-10 Thread Jakub Stasiak
Jakub Stasiak added the comment: That's fair and thanks for the links. Please find a quick patch attached, feel free to use that or any modification of it. While I believe the documentation is technically correct right now it won't hurt to clarify this I think. -- keywords: +patch

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-09 Thread Jakub Stasiak
Jakub Stasiak added the comment: This is exactly what I'm thinking. Do you think it's sensible to move that sentence + some additional information (following your suggestion) into a "Warning" block? -- ___ Python tracker <rep...@bu

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread Jakub Stasiak
New submission from Jakub Stasiak: It is my understanding that socket.sendall effectively calls the underlying socket.send's implementation in a retry loop, possibly multiple times. It is also my understanding that each one of those low level send calls can timeout on its own if a socket

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: Martin: While I'd consider timeout in HTTPConnection(timeout=...) or urlopen(timeout=...) to be the timeout for the entire operation, just just for the data sending part and HTTPConnection/urlopen can achieve the timeout behavior using just send I concede

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-16 Thread Jakub Stasiak
Jakub Stasiak added the comment: That's right, I was actually wondering about it few minutes before you pointed it out. Find new patch attached. -- Added file: http://bugs.python.org/file31792/timeit-v4-actual-changes.patch ___ Python tracker rep

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-15 Thread Jakub Stasiak
Jakub Stasiak added the comment: Antoine: I agree that it does look weird to have thousands separators at one place and not at the other but IMO it's still slightly better - the number formatted with separators is simply more readable that separator-less one. R. David Murray: what's

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
New submission from Jakub Stasiak: This patch includes: * making code more PEP8-compatible and refactoring it a bit * printing number of loops per second when using command line interface * using thousands separators when printing numbers of loops (also in command line interface) * changing

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: Oops, forgot to patch the tests, please find correct patch attached. -- Added file: http://bugs.python.org/file31673/timeit-v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18975

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: I agree with both notes. Splitting the patch won't be a problem. As much as I don't fancy , as thousands separator either - I just used what's in the standard library but I'll think about the best way of putting spaces

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: To me the point of this patch is adding number of loops per second information - using thousands separators was just an addition which I'm happy to drop. Please find attached 2 patches: - one containing actual changes - loops per second added, fractional part

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Changes by Jakub Stasiak jakub+python@stasiak.at: Added file: http://bugs.python.org/file31684/timeit-v3-pep8.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18975

[issue18983] Specify time unit for timeit CLI

2013-09-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: My 2 cents - I'd split timeit.main function into processing part and argument parsing + data printing part so that you could use Python to call the first one to get the actual results (timings, numbers of loops etc.) and then present the data to the outside

[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-09-05 Thread Jakub Stasiak
Jakub Stasiak added the comment: I don't see an obvious way of solving that. One thing I could think of is creating a wrapper for file method being returned from __getattr__ that holds reference to _TemporaryFileWrapper instance until the method gets called, please find a patch attached

[issue17862] itertools.chunks(iterable, size, fill=None)

2013-09-02 Thread Jakub Stasiak
Jakub Stasiak added the comment: I'm just gonna leave my implementation of chunk function (not sure about the name yet) here, it's basically what itertools.chunks from the previous patch is but it works for arbitrary iterables + few tests and documentation. The last chunk is currently

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-09-01 Thread Jakub Stasiak
Jakub Stasiak added the comment: I'd change cumulativepercall and totalpercall to cumpercall and percall (and/or intpercall) but that's a detail, this patch works for me. Data structure affected by this patch is produced and consumed internally by the sort method so it looks like nothing