[issue42939] Linux's chattr i.e. ioctl(FS_IOC_SETFLAGS) is not supported in os.chflags()

2021-01-16 Thread Марк Коренберг
New submission from Марк Коренберг : https://man7.org/linux/man-pages/man2/ioctl_iflags.2.html Seems the ioctl is only way to implement chattr(). I propose to add all these flags to os.chflags() and to gain its support in Linux. -- components: Library (Lib) messages: 385141 nosy

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-05-21 Thread Марк Коренберг
Марк Коренберг added the comment: FYI: PEP8 does not mention enums. -- ___ Python tracker <https://bugs.python.org/issue40721> ___ ___ Python-bugs-list mailin

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-05-21 Thread Марк Коренберг
New submission from Марк Коренберг : Example from PEP0435: (https://www.python.org/dev/peps/pep-0435) >>> from enum import Enum >>> class Color(Enum): ... red = 1 ... green = 2 ... blue = 3 Example from Python documentation: (https://docs.python.org/3/library/en

[issue40666] TarFile.add does not support pathlib.Path as a value to first argument.

2020-05-18 Thread Марк Коренберг
Change by Марк Коренберг : -- components: Library (Lib) nosy: socketpair priority: normal severity: normal status: open title: TarFile.add does not support pathlib.Path as a value to first argument. versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

[issue40567] asyncio.StreadReader `async for line in reader` is not documented

2020-05-08 Thread Марк Коренберг
Change by Марк Коренберг : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker <https://bugs.python.org/issu

[issue40567] asyncio.StreadReader `async for line in reader` is not documented

2020-05-08 Thread Марк Коренберг
New submission from Марк Коренберг : Actually it works. But it is not documented. Please ad docs. -- components: asyncio messages: 368453 nosy: asvetlov, socketpair, yselivanov priority: normal severity: normal status: open title: asyncio.StreadReader `async for line in reader

[issue40373] urlunparse does not escape slash (/) for http+unix:// in netloc field

2020-04-23 Thread Марк Коренберг
New submission from Марк Коренберг : urlunsplit(('http+unix', '\x00qwe/asd', 'def', '', '')) gives: 'http+unix://\x00qwe/asd/def' but should: 'http+unix://\x00qwe%2Fasd/def' see https://github.com/msabramo/requests

[issue33708] Doc: Asyncio's Event documentation typo.

2018-05-31 Thread Марк Коренберг
Марк Коренберг added the comment: NO! it points to asyncio.wait() but should point to asyncio.Event.wait() -- ___ Python tracker <https://bugs.python.org/issue33

[issue33708] Doc: Asyncio's Event documentation typo.

2018-05-31 Thread Марк Коренберг
New submission from Марк Коренберг : https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event : Class implementing event objects. An event manages a flag that can be set to true with the set() method and reset to false with the clear() method. The -> wait() <- method

[issue33707] Doc:

2018-05-31 Thread Марк Коренберг
Марк Коренберг added the comment: Sorry, I did not -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue33707] Doc:

2018-05-31 Thread Марк Коренберг
New submission from Марк Коренберг : https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event : Class implementing event objects. An event manages a flag that can be set to true with the set() method and reset to false with the clear() method. The -> wait() <- method

[issue17305] IDNA2008 encoding missing

2018-05-28 Thread Марк Коренберг
Change by Марк Коренберг : -- nosy: +socketpair ___ Python tracker <https://bugs.python.org/issue17305> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-05-28 Thread Марк Коренберг
Марк Коренберг added the comment: http://man7.org/linux/man-pages/man2/ioctl_ficlonerange.2.html That possibly should be used under Linux in order to really acheive zero-copying. Just like modern cp command. -- nosy: +socketpair ___ Python tracker

[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: @ncoghlan Could you please create Pull-request on Github ? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-09 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: Actually documented: http://man7.org/linux/man-pages/man2/msync.2.html EINVAL: addr is not a multiple of PAGESIZE; -- nosy: +socketpair ___ Python tracker <rep...@bugs.python.or

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2018-01-30 Thread Марк Коренберг
Change by Марк Коренберг <socketp...@gmail.com>: -- pull_requests: +5281 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32221> ___

[issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation

2018-01-26 Thread Марк Коренберг
New submission from Марк Коренберг <socketp...@gmail.com>: Proof: import asyncio async def test(): while True: print('sleeping 1') await asyncio.gather(asyncio.sleep(1), return_exceptions=True) async def amain(): print('creating task')

[issue32528] Change base class for futures.CancelledError

2018-01-11 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: @gvanrossum More real code: async def (): while True: try: result = await download() handle_result(result) except Exception as e: log.warning('Fail..%r', e)

[issue32528] Change base class for futures.CancelledError

2018-01-10 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: Will you accept PR if I fix that ? I think we may merge that in Python 3.8 Who can also judge us? @asvetlov, what do you think about my idea ? -- ___ Python tracker <rep...@bugs.p

[issue32528] Change base class for futures.CancelledError

2018-01-10 Thread Марк Коренберг
Change by Марк Коренберг <socketp...@gmail.com>: -- components: +Library (Lib) ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32528] Change base class for futures.CancelledError

2018-01-10 Thread Марк Коренберг
Change by Марк Коренберг <socketp...@gmail.com>: -- type: -> enhancement ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32528> ___ _

[issue32528] Change base class for futures.CancelledError

2018-01-10 Thread Марк Коренберг
New submission from Марк Коренберг <socketp...@gmail.com>: I have discoverd one very ugly pattern connected with asyncio. Many times I see code like this: try: await something() except Exception: log.error('Opertaion failed -- will retry later.') Seems, everything i

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-29 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: So, PR is ready. Please review. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32437] UnicodeError: 'IDNA does not round-trip'

2017-12-28 Thread Марк Коренберг
New submission from Марк Коренберг <socketp...@gmail.com>: First: This is the bug: In [1]: 'großhandel-shop'.encode('idna') Out[1]: b'grosshandel-shop' This lead to this: 'xn--einla-pqa'.decode('idna') Traceback (most recent call last): File "", line 1, in File &qu

[issue31106] os.posix_fallocate() generate exception with errno 0

2017-12-23 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: Yes, I can. Should I create new PR ? to which branch ? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-20 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: No, Improvement for typical case (not scoped IPv6 addresses) was not the target, but fortunatelly it also sped up. -- ___ Python tracker <rep...@bugs.python.org> <https://

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-20 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: After my patch: $ python3.7 -m timeit --setup 'import socket; s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM); s.bind(("ff02::1de:c0db", 1234, 0, 2))' 's.getsockname()' 50 loops, best of 5: 613 nsec per loop

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-20 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: So it may affect applications, that work with UDP and .recvfrom() -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-20 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: Original (not patched) python: ``` In [1]s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) In [2]: s.bind(('ff02::1de:c0db', 1234, 0, 2)) In [3]: timeit s.getsockname() The slowest run took 12.06 times longer than the f

[issue27456] asyncio: set TCP_NODELAY flag by default

2017-12-19 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: Note, TCP_NODELAY can not be set on UNIX streaming socket. Do you have corresponding tests for UNIX sockets ? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32323] urllib.parse.urlsplit() must not lowercase() IPv6 scope value

2017-12-14 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: Also this: http://potaroo.net/ietf/idref/draft-kitamura-ipv6-zoneid-free/ So, I'm confused. Will investigate. -- ___ Python tracker <rep...@bugs.python.org> <https://

[issue32323] urllib.parse.urlsplit() must not lowercase() IPv6 scope value

2017-12-14 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: https://url.spec.whatwg.org/#host-representation -> Support for is intentionally omitted. https://tools.ietf.org/html/rfc6874 -- ___ Python tracker <rep...@bugs.python

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-14 Thread Марк Коренберг
Марк Коренберг <socketp...@gmail.com> added the comment: Please look at my PR -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32323] urllib.parse.urlsplit() must not lowercase() IPv6 scope value

2017-12-14 Thread Марк Коренберг
Change by Марк Коренберг <socketp...@gmail.com>: -- keywords: +patch pull_requests: +4758 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32323] urllib.parse.urlsplit() must not lowercase() IPv6 scope value

2017-12-14 Thread Марк Коренберг
New submission from Марк Коренберг <socketp...@gmail.com>: qwe = urlsplit('http://[FE80::822a:a8ff:fe49:470c%Тест]:1234/keys') qwe.hostname will be 'fe80::822a:a8ff:fe49:470c%тест' Which is wrong. correct value is 'fe80::822a:a8ff:fe49:470c%Тест' so, IP-address is lowercased and zone i

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-05 Thread Марк Коренберг
Change by Марк Коренберг <socketp...@gmail.com>: -- keywords: +patch pull_requests: +4631 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-05 Thread Марк Коренберг
New submission from Марк Коренберг <socketp...@gmail.com>: https://github.com/python/cpython/pull/4724 `recvfrom` from multicast socket is painfull slow. In fact, it returns sender address in form: `('fe80::941f:f6ff:fe04:c560%qwe', 42133, 0, 78)` which is superfluous, since interfac

[issue31313] Feature Add support of os.chflags() on Linux platform

2017-09-01 Thread Марк Коренберг
Марк Коренберг added the comment: Well, it seems, you are right. But there are another ioctls (maybe they are the same, I haven't checked): FS_IOC_SETFLAGS FS_IOC_GETFLAGS http://man7.org/tlpi/code/online/book/files/chiflag.c.html (also attached) -- Added file: http

[issue31313] Feature Add support of os.chflags() on Linux platform

2017-08-31 Thread Марк Коренберг
New submission from Марк Коренберг: Yes, chflags() is not supported by linux directly. But actually, Linux supports chflags functionality: https://stackoverflow.com/questions/34176464/why-os-chflags-doesnt-work-under-linux through ioctl (fd, EXT2_IOC_SETFLAGS, ) -- components

[issue31106] os.posix_fallocate() generate exception with errno 0

2017-08-14 Thread Марк Коренберг
Марк Коренберг added the comment: If I understand right, Python 3.5 will not be fixed with this pathc. Right ? If yes, I will tell Debian maintainers to backport this patch to Python 3.5, which is shipped with latest stable Debian 9. -- ___ Python

[issue31033] Add argument to .cancel() of Task and Future

2017-08-10 Thread Марк Коренберг
Марк Коренберг added the comment: 1. Yes, specifying argument to cancel in `raise CancelledError` would be perfect 2. specifying argument to `.cancel()` is still actual. 3. Yes, important part of exceptions should not be swallowed (please open separate issue). Also, it will be nice to show

[issue31106] os.posix_fallocate() generate exception with errno 0

2017-08-04 Thread Марк Коренберг
Марк Коренберг added the comment: posix_fadvise() is also affected :( Fixed in this patch. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31106] os.posix_fallocate() generate exception with errno 0

2017-08-04 Thread Марк Коренберг
Марк Коренберг added the comment: All checks passed. Please merge. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31106> ___ ___

[issue31106] os.posix_fallocate() generate exception with errno 0

2017-08-04 Thread Марк Коренберг
Марк Коренберг added the comment: https://github.com/python/cpython/pull/3000 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31106] os.posix_fallocate() generate exception with errno 0

2017-08-04 Thread Марк Коренберг
Changes by Марк Коренберг <socketp...@gmail.com>: -- pull_requests: +3036 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31106> ___

[issue31106] os.posix_fallocate() generate exception with errno 0

2017-08-04 Thread Марк Коренберг
Марк Коренберг added the comment: Also, EINTR will not be caught too (!) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31106> ___ __

[issue31106] os.posix_fallocate() generate exception with errno 0

2017-08-04 Thread Марк Коренберг
Марк Коренберг added the comment: man posix_fallocate: RETURN VALUE posix_fallocate() returns zero on success, or an error number on failure. Note that errno is not set. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue31106] os.posix_fallocate() generate exception with errno 0

2017-08-02 Thread Марк Коренберг
New submission from Марк Коренберг: === os.posix_fallocate(os.open('qwe.qwe', os.O_RDONLY|os.O_CREAT), 0, 1024*1024) === generates OSError with errno 0. Suppose this happen due to O_RDONLY flag. strace : open("qwe.qwe", O_RDONLY|O_CREAT|O_CLOEXEC, 0777) = 3 fallocate(3, 0,

[issue31033] Add argument to .cancel() of Task and Future

2017-07-25 Thread Марк Коренберг
Марк Коренберг added the comment: Hmmm task.set_exception(Exception('xxx')) Will it cancel whole chain of depending futures in a RIGHT way ? Or we must require exception passed here to be subclassed from CancelledError ? -- ___ Python tracker

[issue31033] Add argument to .cancel() of Task and Future

2017-07-25 Thread Марк Коренберг
Марк Коренберг added the comment: Yes, I agree with you about my weird way of debugging. But anyway, changing API with adding ability to pass actual cause would be welcome. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue31035] Document order of firing callbacks added with Future.add_done_callback()

2017-07-25 Thread Марк Коренберг
New submission from Марк Коренберг: Please document these two things: * Order of callbacks firing is not specified. (Is it True?) * All callbacks are called *BEFORE* await triggered: f = asyncio.Future() f.add_done_callback(xxx) f.add_done_callback(yyy) try: await f except

[issue31033] Add argument to .cancel() of Task and Future

2017-07-25 Thread Марк Коренберг
New submission from Марк Коренберг: History: First, I tried to debug code around asyncio.Task() cancelling. So I wrote: = try: ... except Exception as e: print(e) = When task was cancelled, an empty string printed. I wondered why. So I change the code to print(repr(e

[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-07-24 Thread Марк Коренберг
Марк Коренберг added the comment: Triggered almost the same error. Minimal proof: Documentation did not say that .drain() can't be called simultaneously. === async def do_nothing(client_reader, client_writer): await asyncio.sleep(1) mb = b'*' * (4096*4

[issue29808] SyslogHandler: should not raise exception in constructor if connection fails

2017-05-10 Thread Марк Коренберг
Марк Коренберг added the comment: @vinay.sajip I don't see this change in Python 3.5.3: https://github.com/python/cpython/blob/v3.5.3/Lib/logging/handlers.py#L806 How can this be true? -- ___ Python tracker <rep...@bugs.python.org>

[issue30083] Asyncio: GeneratorExit + strange exception

2017-04-16 Thread Марк Коренберг
Changes by Марк Коренберг <socketp...@gmail.com>: -- components: +asyncio nosy: +yselivanov versions: +Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30083] Asyncio: GeneratorExit + strange exception

2017-04-16 Thread Марк Коренберг
New submission from Марк Коренберг: How to reproduce: Run the following program: = import asyncio async def handle_connection(reader, writer): try: await reader.readexactly(42) except BaseException as err: print('Interesting: %r.' % err

[issue29808] SyslogHandler: should not raise exception in constructor if connection fails

2017-03-17 Thread Марк Коренберг
Марк Коренберг added the comment: Yes, I want this simple patch to be back-ported. We use Python 3.5 in our projects. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29808] SyslogHandler: should not raise exception in constructor if connection fails

2017-03-14 Thread Марк Коренберг
Марк Коренберг added the comment: Syslog, listening on local machine via UNIX socket. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29808] SyslogHandler: should not raise exception in constructor if connection fails

2017-03-14 Thread Марк Коренберг
Марк Коренберг added the comment: Nothing special. Just try to create SysLogHandler when syslog server is down. Exception will be raised. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29808] SyslogHandler: should not raise exception in constructor if connection fails

2017-03-14 Thread Марк Коренберг
New submission from Марк Коренберг: Syslog handler already able to ignore temporary errors while seding logs. So he knows that syslog server may be not reachable at the moment. But when we say about constructor, it fails with error. I have fixed that -- now it will ignore such errors, and try

[issue29214] Standard open() does not allow to specify file permissions.

2017-01-10 Thread Марк Коренберг
Марк Коренберг added the comment: @haypo, suppose, one thread wants file with permissions A, and other thread wants permissions B. If they will "set" them through umask(), race condition may occur. -- ___ Python tracker <rep...@bu

[issue29214] Standard open() does not allow to specify file permissions.

2017-01-09 Thread Марк Коренберг
Марк Коренберг added the comment: Such construction is not so easy. Especially for beginners. Not everyone even uses context managers to work with files. They will try to use os.chmod(). More clever will use os.fchmod(fileobj.fileno()). And in rare case someone asks about race condition

[issue29214] Standard open() does not allow to specify file permissions.

2017-01-09 Thread Марк Коренберг
Марк Коренберг added the comment: so, io.open() should just pass that value down to implementation. implementation should use this value instead of hard-coded 0o666. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29214] Standard open() does not allow to specify file permissions.

2017-01-09 Thread Марк Коренберг
Марк Коренберг added the comment: I expect this: open(, perms=0o644) Why not? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29214] Standard open() does not allow to specify file permissions.

2017-01-09 Thread Марк Коренберг
Марк Коренберг added the comment: Permissions -- are very important thing. As I think, such high-level functions should not hide that important functionality from end-users. Also, it is not difficult to make a patch (as I think). -- ___ Python

[issue29214] Standard open() does not allow to specify file permissions.

2017-01-09 Thread Марк Коренберг
Марк Коренберг added the comment: 1. Yes, I'm reporting problem about standard open(), not os.open(). 2. Yes, I know about umask. But unfortunatelly, umask affects whole process, including all threads, so it is not possible to force specific permissions without of race conditions with other

[issue29214] Standard open() does not allow to specify file permissions.

2017-01-09 Thread Марк Коренберг
Changes by Марк Коренберг <socketp...@gmail.com>: -- versions: +Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29214> ___

[issue29214] Standard open() does not allow to specify file permissions.

2017-01-09 Thread Марк Коренберг
Changes by Марк Коренберг <socketp...@gmail.com>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29214> ___ _

[issue29214] Standard open() does not allow to specify file permissions.

2017-01-09 Thread Марк Коренберг
New submission from Марк Коренберг: 1. Syscall open() allows that. 2. This is important to prevent race-conditions between creating a file with default permissions and calling fchmod(). -- components: Library (Lib) messages: 285044 nosy: mmarkk priority: normal severity: normal status

[issue28654] sys.stdout.isatty() returns True even if redirected to NUL

2016-11-10 Thread Марк Коренберг
Марк Коренберг added the comment: 1. I think, that is not a bug. 2. It seems, that for Cygwin, `> /dev/nul` is a bug, it should be `/dev/null` does not it ? -- nosy: +mmarkk ___ Python tracker <rep...@bugs.python.org> <http://bug

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Марк Коренберг
Марк Коренберг added the comment: > haypo added the check because people called `.call_later()` with coroutine > instead of callback very often maybe make dirty hack and check hasattr(callback, 'send') ? -- nosy: +mmarkk ___ Python tracke

[issue20847] asyncio docs should call out that network logging is a no-no

2016-10-25 Thread Марк Коренберг
Марк Коренберг added the comment: Typical network logging is using syslog UDP. Sending UDP is never block. -- nosy: +mmarkk ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28518] execute("begin immediate") throwing OperationalError

2016-10-24 Thread Марк Коренберг
Changes by Марк Коренберг <socketp...@gmail.com>: -- nosy: +mmarkk ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28518> ___ _

[issue28433] Add sorted (ordered) containers

2016-10-17 Thread Марк Коренберг
Марк Коренберг added the comment: @r.david.murray Please see answres at https://groups.google.com/forum/#!topic/python-ideas/nPOi2LtVsR4 No one say that adding sorted containers is bad idea. Some people say that specific use-cases require specific solutions, but they also said

[issue28430] asyncio: C implemeted Future cause Tornado test fail

2016-10-14 Thread Марк Коренберг
Changes by Марк Коренберг <socketp...@gmail.com>: -- nosy: +mmarkk ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28430> ___ _

[issue28436] GzipFile doesn't properly handle short reads and writes on the underlying stream

2016-10-13 Thread Марк Коренберг
Марк Коренберг added the comment: And also issue26877 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28436> ___ ___ Python-bugs-

[issue28436] GzipFile doesn't properly handle short reads and writes on the underlying stream

2016-10-13 Thread Марк Коренберг
Марк Коренберг added the comment: Also see issue16859 -- nosy: +mmarkk ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28436> ___ ___

[issue28433] Add sorted (ordered) containers

2016-10-13 Thread Марк Коренберг
Марк Коренберг added the comment: Well, I created discussion at https://groups.google.com/forum/#!topic/python-ideas/CoRe1gThnd8 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28433] Add sorted (ordered) containers

2016-10-13 Thread Марк Коренберг
Марк Коренберг added the comment: https://groups.google.com/forum/#!searchin/python-ideas/sorted|sort:relevance/python-ideas/dy3Thu-PXSM/mTqEduXE4GYJ ? @serhiy.storchaka did not rejected idea. Anyway, I still can not find message in python-ideas which describe why such idea may be rejected

[issue28433] Add sorted (ordered) containers

2016-10-13 Thread Марк Коренберг
New submission from Марк Коренберг: I mean mutable containers that are always sorted when iterating over them. i.e. * SortedSet (sorted unique elements, implemented using (rb?)tree instead of hash) * SortedList (sorted elements, the same as SortedSet, but without uniquiness constraint

[issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented

2016-10-12 Thread Марк Коренберг
Марк Коренберг added the comment: It will be nice if someone also adds if abstract UNIX sockets are supported. And also about bytes/str path support. -- nosy: +mmarkk ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28397] Faster index range checks

2016-10-11 Thread Марк Коренберг
Марк Коренберг added the comment: $ gcc -O3 -DDOIT=doit ./zzz.c -o zzz && time ./zzz real0m1.675s user0m1.672s sys 0m0.000s $ gcc -O3 -DDOIT=doit2 ./zzz.c -o zzz && time ./zzz real0m1.657s user0m1.656s

[issue28397] Faster index range checks

2016-10-11 Thread Марк Коренберг
Марк Коренберг added the comment: Without optimisation in compiler (-O0) speed is the same. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28397] Faster index range checks

2016-10-11 Thread Марк Коренберг
Марк Коренберг added the comment: $ gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28397] Faster index range checks

2016-10-11 Thread Марк Коренберг
Марк Коренберг added the comment: -O2 -- the same speed too! -O3 really helps. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28397] Faster index range checks

2016-10-11 Thread Марк Коренберг
Марк Коренберг added the comment: oh shidoit() i.e. return index < 0 || index >= nitems; is faster! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28397] Faster index range checks

2016-10-11 Thread Марк Коренберг
Марк Коренберг added the comment: Much more conveniet way is to use unsigned variables in appropriate places. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28397] Faster index range checks

2016-10-11 Thread Марк Коренберг
Марк Коренберг added the comment: I have tested. performace differs in about of two times. gcc -O3 0.22 nanoseconds per comparison. vs 0.58 nanoseconds per comparison. Does it cost a time that we spent to discuss here ? -- nosy: +mmarkk ___ Python

[issue28385] Bytes objects should reject all formatting codes with an error message

2016-10-07 Thread Марк Коренберг
Марк Коренберг added the comment: Yes, that message will be sufficient. Perfectly. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28385] Non-informative exception while formatting strings.

2016-10-07 Thread Марк Коренберг
New submission from Марк Коренберг: $ python3 -c "'{0:s}'.format(b'qwe')" Traceback (most recent call last): File "", line 1, in TypeError: non-empty format string passed to object.__format__ Spent many hours to detect bug in my code. -- components: Library (L

[issue26050] Add new StreamReader.readuntil() method

2016-09-16 Thread Марк Коренберг
Марк Коренберг added the comment: It needs to compare python functoin(s) docstrings with separate documentation. All information from docstrings should also be written in separate docs. Will compare later. -- ___ Python tracker <

[issue18329] for line in socket.makefile() speed degradation

2016-09-09 Thread Марк Коренберг
Марк Коренберг added the comment: mmarkk@mmwork:~$ python2.7 --version Python 2.7.12 mmarkk@mmwork:~$ python2.7 ./qwe.py TCP mode, makefile method. 292731.3 lines per second (279.2 MB/s). Delay is 3.42 seconds TCP mode, fdopen method. 2410875.9 lines per second (2299.2 MB/s). Delay

[issue20979] Calling getdents()/readdir64() repeatedly while closing descriptors provides unexpected behaviour.

2016-09-08 Thread Марк Коренберг
Марк Коренберг added the comment: Yes, it is still relevant. For example for closing fds after fork(). -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27456] asyncio: set TCP_NODELAY flag by default

2016-09-02 Thread Марк Коренберг
Марк Коренберг added the comment: vote +10 for that -- nosy: +mmarkk ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27456> ___ ___

[issue27879] add os.syncfs()

2016-08-29 Thread Марк Коренберг
Марк Коренберг added the comment: 1. It is appropriate to call `sync()` when one calls `os.syncfs()` if `syncfs()` syscall is not supported in kernel. 2. https://technet.microsoft.com/sv-se/sysinternals/bb897438(en-us).aspx 3. https://github.com/EricGrange/FlushFileCache

[issue27879] add os.syncfs()

2016-08-27 Thread Марк Коренберг
New submission from Марк Коренберг: I mean http://linux.die.net/man/2/syncfs -- components: Library (Lib) messages: 273790 nosy: mmarkk priority: normal severity: normal status: open title: add os.syncfs() type: enhancement versions: Python 3.6

[issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders

2016-08-02 Thread Марк Коренберг
Марк Коренберг added the comment: Well, I provide the patch, as you can see it is very simple. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders

2016-08-02 Thread Марк Коренберг
Changes by Марк Коренберг <socketp...@gmail.com>: -- nosy: +gvanrossum ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27638> ___ _

[issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders

2016-08-02 Thread Марк Коренберг
Марк Коренберг added the comment: @skrah, what about integers with length not equal to 2 or 4 bytes, and also signed ? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders

2016-08-02 Thread Марк Коренберг
Марк Коренберг added the comment: 1. I forgot to say: since I add new items to `if.. elif...elif.` chain after testing for 'big' and 'little', this change will not slowdown current external code. 2. Well, slowdown of to_bytes() between 'big' and 'net' on my PC give about 3 percents. 3

  1   2   3   4   >