[issue44345] The first line (comment) of the parser.c is incorrect.

2021-06-08 Thread Akira Nonaka
Change by Akira Nonaka : -- pull_requests: +25199 pull_request: https://github.com/python/cpython/pull/26615 ___ Python tracker <https://bugs.python.org/issue44

[issue44345] The first line (comment) of the parser.c is incorrect.

2021-06-08 Thread Akira Nonaka
Akira Nonaka added the comment: I have just signed the contributor agreement. -- ___ Python tracker <https://bugs.python.org/issue44345> ___ ___ Python-bug

[issue44345] The first line (comment) of the parser.c is incorrect.

2021-06-08 Thread Akira Nonaka
Change by Akira Nonaka : -- pull_requests: +25184 pull_request: https://github.com/python/cpython/pull/26602 ___ Python tracker <https://bugs.python.org/issue44

[issue44345] The first line (comment) of the parser.c is incorrect.

2021-06-07 Thread Akira Nonaka
Change by Akira Nonaka : -- keywords: +patch pull_requests: +25175 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26591 ___ Python tracker <https://bugs.python.org/issu

[issue44345] The first line (comment) of the parser.c is incorrect.

2021-06-07 Thread Akira Nonaka
Change by Akira Nonaka : -- title: The First-line (comment) of the parser.c is incorrect. -> The first line (comment) of the parser.c is incorrect. ___ Python tracker <https://bugs.python.org/issu

[issue44345] The First-line (comment) of the parser.c is incorrect.

2021-06-07 Thread Akira Nonaka
New submission from Akira Nonaka : The First-line (comment) of the parser.c is incorrect. "// @generated by pegen.py from ./Grammar/python.gram" pegen.py no longer exists. It is now "pegen" package. -- components: Demos and Tools messages: 395306 nosy: anon

[issue29352] provide the authorative source for s[i:j] negative slice indices (<-len(s)) behavior for standard sequences

2017-03-17 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: -- pull_requests: +576 ___ Python tracker <http://bugs.python.org/issue29352> ___ ___ Python-bugs-list mailing list

[issue29352] provide the authorative source for s[i:j] negative slice indices (<-len(s)) behavior for standard sequences

2017-03-17 Thread Akira Li
Akira Li added the comment: I prefer the wording in the current patch. Though I don't have strong feelings one way or the other as long as the behavior is specified explicitly. -- ___ Python tracker <http://bugs.python.org/is

[issue28876] bool of large range raises OverflowError

2017-03-17 Thread Akira Li
Akira Li added the comment: > Akira, could you open a pull request on GitHub? Done. PR 699 -- ___ Python tracker <http://bugs.python.org/issue28876> ___ ___ Py

[issue28876] bool of large range raises OverflowError

2017-03-17 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: -- pull_requests: +572 ___ Python tracker <http://bugs.python.org/issue28876> ___ ___ Python-bugs-list mailing list

[issue29352] provide the authorative source for s[i:j] negative slice indices (<-len(s)) behavior for standard sequences

2017-01-23 Thread Akira Li
New submission from Akira Li: I've failed to find where the behavior for negative indices in s[i:j] expression (i, j < -len(s)) for standard sequences (str, list, etc) is formally defined. The observed behavior implemented in PySlice_GetIndicesEx(): If "len(s) + i" or "

[issue28876] bool of large range raises OverflowError

2017-01-23 Thread Akira Li
Akira Li added the comment: I've updated the patch to use 4-space indent (pep-7). I've added space around "=" (pep-7); unlike the usual "dict(designator=value)" -- no space around "=" for keyword argument (pep-8). -- Added file: http://

[issue28876] bool of large range raises OverflowError

2017-01-22 Thread Akira Li
Akira Li added the comment: Following the python-dev discussion [1] I've added a variant of the patch that uses c99 designated initializers [2] [1] https://mail.python.org/pipermail/python-dev/2017-January/147175.html [2] https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits

[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-12-21 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: -- nosy: +akira ___ Python tracker <http://bugs.python.org/issue28180> ___ ___ Python-bugs-list mailing list

[issue28876] bool of large range raises OverflowError

2016-12-05 Thread Akira Li
Akira Li added the comment: I've removed the documentation changes from the patch. -- Added file: http://bugs.python.org/file45773/range_bool-no_docs.patch ___ Python tracker <http://bugs.python.org/is

[issue28876] bool of large range raises OverflowError

2016-12-05 Thread Akira Li
Akira Li added the comment: Here's a patch with range_bool() implementation, tests and the docs update. I'm not sure how it should be documented. I've specified it as versionchanged:: 3.6 -- keywords: +patch nosy: +akira Added file: http://bugs.python.org/file45765/r

[issue27079] Bugs in curses.ascii predicates

2016-07-01 Thread Akira Li
Akira Li added the comment: I'm not sure anything should be done (e.g., it is "undefined behavior" to pass a negative value such as CHAR_MIN (if *char* type is signed) to a character classification function in C. Though EOF value (-1 traditionally) should be handled). If you

[issue27079] Bugs in curses.ascii predicates

2016-06-30 Thread Akira Li
Akira Li added the comment: There is an overlapping issue from 2010: "curses.ascii.isblank() function is broken. It confuses backspace (BS 0x08) with tab (0x09)" http://bugs.python.org/issue9770 Your patch fixes it too (it should be closed). Note: the patch does not pass tests fro

[issue27273] subprocess.run(cmd, input='text') should pass universal_newlines=True to Popen

2016-06-08 Thread Akira Li
New submission from Akira Li: At the moment, subprocess.run(cmd, input='text') raises TypeError. It would be nice if universal_newlines=isinstance(input, str) if *input* is set. I've attached a corresponding patch with the necessary changes to the docs, tests and the subpro

[issue27050] Demote run() below the high level APIs in subprocess docs

2016-06-08 Thread Akira Li
Akira Li added the comment: > setting "universal_newlines=True" switches to UTF-8 encoded text pipes It uses locale.getpreferredencoding(False) encoding -- something like cp1252,cp1251,etc on Windows, and UTF-8 on *nix with proper locale settings. It is ASCII (C/POSIX locale de

[issue22274] subprocess.Popen(stderr=STDOUT) fails to redirect subprocess stderr to stdout

2016-05-08 Thread Akira Li
Akira Li added the comment: Updated the patch to address vadmium's review comments. -- versions: -Python 3.4 Added file: http://bugs.python.org/file42777/subprocess-stderr_redirect_with_no_stdout_redirect-2.diff ___ Python tracker

[issue23220] Documents input/output effects of how IDLE runs user code

2016-03-14 Thread Akira Li
Akira Li added the comment: IDLE can implement functionality similar to what colorama [1] module does on Windows: translate ANSI escape character sequences into corresponding GUI method calls. For example, \b might be implemented using a .delete() call, \r using .mark_set(), etc. [1] https

[issue23570] Change "with subprocess.Popen():" (context manager) to ignore broken pipe error

2016-02-17 Thread Akira Li
Akira Li added the comment: Should this issue be reopened in light of http://bugs.python.org/issue26372 (Popen.communicate not ignoring BrokenPipeError)? If .close() shouldn't raise BrokenPipeError in .communicate() (and it shouldn't) then it seems logical that .close() shoul

[issue25536] use sys.platform instead of os.name in asyncio docs consistently

2015-11-02 Thread Akira Li
New submission from Akira Li: asyncio code uses "sys.platform == 'win32'" to detect OS. asyncio docs use both os.name and sys.platform. As far as I can tell there is no *practical* difference between "os.name == 'nt" and "sys.platform == 'win32

[issue25288] readline.py file in current directory caused unexpected code execution.

2015-10-02 Thread Akira Li
Akira Li added the comment: python3 -I could be used as a workaround. -- nosy: +akira ___ Python tracker <http://bugs.python.org/issue25288> ___ ___ Python-bug

[issue25286] views are not sequences

2015-10-01 Thread Akira Li
Akira Li added the comment: Thank you for `view`, hint. I did look for :term:`view` that was obviously not enough. The new patch contains the renamed entry in the correct place. All `view`, ` occurrences dictionary view are updated now. -- Added file: http://bugs.python.org/file40654

[issue25286] views are not sequences

2015-09-30 Thread Akira Li
New submission from Akira Li: The entry for *dict view* in the glossary may be clarified, to avoid confusion with collection.abc.Sequence i.e., from: They are lazy sequences that will see changes in the underlying dictionary. to something like: They provide a dynamic view on the

[issue22798] time.mktime doesn't update time.tzname

2015-09-29 Thread Akira Li
Akira Li added the comment: Marc-Andre Lemburg writes: ... > tzname is set when the module is being loaded and not updated > afterwards (unless you call tzset()). I can't really see why you > would expect a module global in Python to follow the semantics > of a C globa

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2015-09-29 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: -- nosy: +akira ___ Python tracker <http://bugs.python.org/issue24773> ___ ___ Python-bugs-list mailing list

[issue22798] time.mktime doesn't update time.tzname

2015-09-29 Thread Akira Li
Akira Li added the comment: > Would issue22798.diff patch address your issue? No. The issue is that C mktime() may update C tzname on some platforms but time.mktime() does not update time.tzname on these platforms while the time module docs suggest that it might be expected e.g.: Most

[issue22798] time.mktime doesn't update time.tzname

2015-08-31 Thread Akira Li
Akira Li added the comment: The C code produces correct values according to the tz database. If TZ=Europe/Moscow then tzname={"MSK", "MSD"} at 2010-07-01 and tzname={"MSK", "MSK"} at 2015-07-01. Notice the difference! The code calls C mktime() with c

[issue22798] time.mktime doesn't update time.tzname

2015-08-31 Thread Akira Li
Akira Li added the comment: > C mktime itself should not change timezone globals, but it may indirectly if > it calls tzset() and TZ changed between calls. You should have run the attached test_mktime_changes_tzname.c which demonstrates that (at least on some systems) C mktime *does*

[issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt'

2015-08-21 Thread Akira Li
Akira Li added the comment: To make _pyio correspond to the C version I've added sys.platform in {'win32', 'cygwin'} condition. See the attached pyio_setmode.diff It is not clear why the absence of _setmode(fd, os.O_BINARY) is not detected by tests. (a) a cor

[issue24842] Mention SimpleNamespace in namedtuple docs

2015-08-16 Thread Akira Li
Akira Li added the comment: People do have problems that SimpleNamespace can solve: - Why Python does not support record type i.e. mutable namedtuple [1] - Does Python have anonymous classes? [2] - How to create inline objects with properties in Python? [3] - python create object and add

[issue19007] precise time.time() under Windows 8: use GetSystemTimePreciseAsFileTime

2015-07-20 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: -- nosy: +akira ___ Python tracker <http://bugs.python.org/issue19007> ___ ___ Python-bugs-list mailing list

[issue22442] Deprecate PIPE with subprocess.check_call() and call()

2015-06-21 Thread Akira Li
Akira Li added the comment: Martin, thank you for the review. As Matthias mentioned, the introduction of subprocess.run() perhaps deprecates this issue: old api should be left alone to avoid breaking old code, new code should use new api, those who need old api (e.g., to write 2/3 compatible

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-25 Thread Akira Li
Akira Li added the comment: > I'm going to be honest; seeing None being returned from a pipe read feels > *really* broken to me. When I get None returned from an IO read operation, my > first instinct is "there can't be anything else coming, why else would it > ret

[issue10482] subprocess and deadlock avoidance

2015-03-22 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: -- nosy: +akira ___ Python tracker <http://bugs.python.org/issue10482> ___ ___ Python-bugs-list mailing list

[issue23574] datetime: support leap seconds

2015-03-12 Thread Akira Li
Akira Li added the comment: POSIX timestamp doesn't count (literally) past/future leap seconds. It allows to find out that the timestamp 2**31-1 corresponds to 2038-01-19T03:14:07Z (UTC) regardless of how many leap seconds will occur before 2038: >>> from datetime import datet

[issue21619] Cleaning up a subprocess with a broken pipe

2015-03-02 Thread Akira Li
Akira Li added the comment: On Windows behavior http://stackoverflow.com/questions/23688492/oserror-errno-22-invalid-argument-in-subprocess -- nosy: +akira ___ Python tracker <http://bugs.python.org/issue21

[issue23494] adding timedelta to datetime object is not timezone aware

2015-03-02 Thread Akira Li
Akira Li added the comment: pytz explicitly documents this case (crossing DST boundary). There is tz.normalize() method. > the tzinfo object is responsible for handling daylight savings time. This > looks like a bug in pytz. Are any of tzinfo methods even called during `before + tim

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2015-02-13 Thread Akira Li
Akira Li added the comment: As I've mentioned in http://bugs.python.org/issue22524#msg231703 os.walk size 7925376343, scandir.walk size 5534939617 -- NOT EQUAL! os.walk and scandir.walk do a different work here. I don't see that it is acknowledged so I assume the benchmark is not

[issue22799] wrong time.timezone

2015-01-28 Thread Akira Li
Akira Li added the comment: I agree that time.timezone, time.altzone is not enough in the general case. Because UTC offset may be different at different dates for reasons unrelated to DST transitions therefore any solution that doesn't take into account a given date/time into account will

[issue22799] wrong time.timezone

2015-01-28 Thread Akira Li
Akira Li added the comment: > Isn't this a duplicate of #13466? In what way is it a duplicate? -- ___ Python tracker <http://bugs.python.org/issue22799> ___

[issue23320] devguide should mention rules about "paragraph reflow" in the documentation

2015-01-25 Thread Akira Li
New submission from Akira Li: It is suggested in https://bugs.python.org/issue23251 that only a core Python developer may reflow paragraphs while submitting patches for the Python documentation. It should be codified in devguide: I haven't found the word *reflow* in it. -- compo

[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2015-01-25 Thread Akira Li
New submission from Akira Li: Python 2.7.9 (default, Jan 25 2015, 13:41:30) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os, sys, tempfile >>> d = u'\u20a

[issue23251] mention in time.sleep() docs that it does not block other Python threads

2015-01-25 Thread Akira Li
Akira Li added the comment: I've removed mentioning of GIL and uploaded a new patch. -- Added file: http://bugs.python.org/file37850/docs-time.sleep-other-threads-are-not-blocked-2.diff ___ Python tracker <http://bugs.python.org/is

[issue23251] mention in time.sleep() docs that it does not block other Python threads

2015-01-18 Thread Akira Li
Akira Li added the comment: > Only if the behaviour was unintuitive (i.e. if it *didn't* release the > GIL) would it make sense to document it. There is no intuitive interface, not even the nipple. It's all learned. [1] > Yes, on consideration I agree with Antoine. That l

[issue23251] mention in time.sleep() docs that it does not block other Python threads

2015-01-17 Thread Akira Li
Akira Li added the comment: > I think it's superfluous to mention the GIL here, since it has no impact on > the function. If GIL is not released then all Python code in other threads is effectively blocked. It is worth mentioning explicitly that it is guaranteed to be released

[issue23251] mention in time.sleep() docs that it does not block other Python threads

2015-01-16 Thread Akira Li
Akira Li added the comment: I do not understand. Have you tried to look at the patch in Rietveld? The new content is highlighted in a darker green. It is clearly visible. I've tested on Chromium, Firefox, Safari. If I won't reflow then the first line will be longer than the recomme

[issue23251] mention in time.sleep() docs that it does not block other Python threads

2015-01-16 Thread Akira Li
New submission from Akira Li: There is the corresponding StackOverflow question with 60K view "time.sleep — sleeps thread or process?" [1] The documentation patch is attached. [1] http://stackoverflow.com/questions/92928/time-sleep-sleeps-thread-or-process -- assignee: d

[issue22932] email.utils.formatdate uses unreliable time.timezone constant

2015-01-11 Thread Akira Li
Akira Li added the comment: @mitya57: Please, combine the code changes, tests, docs into a single rietveld-compatible patch (hg diff); read devguide and http://bugs.python.org/issue13963 Make sure "review" link appears on the right near the patch. Example: http://bugs.python.org/

[issue22673] document the special features (eg: fdclose=False) of the standard streams

2014-12-24 Thread Akira Li
Akira Li added the comment: Two minor details: 1. It is possible that `fileno(stdout) != 1` even in C [1]. I don't know what happens if the code from the answer is run on Windows. In principle, it may break eryksun's workaround. I don't know how likely it is in pr

[issue22932] email.utils.formatdate uses unreliable time.timezone constant

2014-12-24 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: -- nosy: +akira ___ Python tracker <http://bugs.python.org/issue22932> ___ ___ Python-bugs-list mailing list

[issue23017] string.printable.isprintable() returns False

2014-12-13 Thread Akira Li
Akira Li added the comment: C standard defines locale-specific *printing characters* that are [ -~] in "C" locale for implementations that use 7-bit US ASCII character set i.e., SP (space, 0x20) is a printing character in C (isprint() returns nonzero). There is isgraph() function th

[issue22356] mention explicitly that stdlib assumes gmtime(0) epoch is 1970

2014-12-02 Thread Akira Li
Akira Li added the comment: > Alexander Belopolsky added the comment: > >> I've provide the direct quote from *C* standard ... > > I understand that C standard uses the word "encoding", but it does so > for a reason that is completely unrelated to the choi

[issue22356] mention explicitly that stdlib assumes gmtime(0) epoch is 1970

2014-12-01 Thread Akira Li
Akira Li added the comment: > Alexander Belopolsky added the comment: > > In the context of Python library documentation, the word "encoding" > strongly suggests that you are dealing with string/bytes. The > situation may be different in C. If you want to refer to somet

[issue22356] mention explicitly that stdlib assumes gmtime(0) epoch is 1970

2014-12-01 Thread Akira Li
Akira Li added the comment: > Alexander Belopolsky added the comment: > > 1. It is not the job of the time module documentation to warn about > "many functions in the stdlib." What are these functions, BTW? The e-mail linked in the first message of this issue msg226539

[issue22799] wrong time.timezone

2014-11-27 Thread Akira Li
Akira Li added the comment: This issue could be fixed using sync-time-timezone-attr-with-c.diff patch from http://bugs.python.org/issue22798 -- ___ Python tracker <http://bugs.python.org/issue22

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-11-26 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: Removed file: http://bugs.python.org/file37284/get_tree_size_listdir.diff ___ Python tracker <http://bugs.python.org/i

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-11-26 Thread Akira Li
Akira Li added the comment: To see what happens at syscall level, I've run various implementations of get_tree_size() functions (see get_tree_size_listdir.diff) with strace: get_tree_size_listdir_fd -- os.listdir(fd) + os.lstat get_tree_size -- os.scandir(path) + entry.

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-11-26 Thread Akira Li
Akira Li added the comment: > STINNER Victor added the comment: > >> scandir is slower on my machine: > > Please share more information about your config: OS, disk type (hard > drive, SSD, something else), filesystem, etc. > Ubuntu 14.04, SSD, ext4 filesystem. Resu

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-11-25 Thread Akira Li
Akira Li added the comment: scandir is slower on my machine: $ git clone https://github.com/benhoyt/scandir $ cd scandir/ $ ../cpython/python benchmark.py /usr/ Using slower ctypes version of scandir Comparing against builtin version of os.walk() Priming the system's

[issue22798] time.mktime doesn't update time.tzname

2014-11-25 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: Removed file: http://bugs.python.org/file37132/test_mktime_changes_tzname.c ___ Python tracker <http://bugs.python.org/i

[issue22798] time.mktime doesn't update time.tzname

2014-11-25 Thread Akira Li
Akira Li added the comment: One of the ways to fix this issue is to synchronize time.tzname attribute with the corresponding C tzname variable. I've uploaded sync-time-timezone-attr-with-c.diff patch that synchronizes tzname, timezone, altzone, daylight attributes. The patch also inc

[issue22752] incorrect time.timezone value

2014-11-24 Thread Akira Li
Akira Li added the comment: C standard delegates to implementations: The local time zone and Daylight Saving Time are implementation-defined. gcc (one of the implementations) says [1]: [timezone] contains the difference between UTC and the latest local standard time, in seconds west of

[issue21872] LZMA library sometimes fails to decompress a file

2014-11-21 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: Removed file: http://bugs.python.org/file37240/decompress-example-files.py ___ Python tracker <http://bugs.python.org/i

[issue21872] LZMA library sometimes fails to decompress a file

2014-11-21 Thread Akira Li
Akira Li added the comment: If lzma._BUFFER_SIZE is less than 2048 then all example files are decompressed successfully (at least lzma module produces the same results as xz utility) -- Added file: http://bugs.python.org/file37241/decompress-example-files.py

[issue21872] LZMA library sometimes fails to decompress a file

2014-11-20 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: Removed file: http://bugs.python.org/file37239/decompress-example-files.py ___ Python tracker <http://bugs.python.org/i

[issue21872] LZMA library sometimes fails to decompress a file

2014-11-20 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: Added file: http://bugs.python.org/file37240/decompress-example-files.py ___ Python tracker <http://bugs.python.org/i

[issue21872] LZMA library sometimes fails to decompress a file

2014-11-20 Thread Akira Li
Akira Li added the comment: @Esa changing the buffer size helps with some "bad" files but lzma module still fails on some files. I've uploaded decompress-example-files.py script that demonstrates it. ------ nosy: +akira Added file: http://bugs.python.org/file37239/dec

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-19 Thread Akira Li
Akira Li added the comment: It would be inconsitent to provide filename only if exec is called e.g.: >>> import subprocess subprocess.call("not used", cwd="nonexistent") FileNotFoundError: [Errno 2] No such file or directory: 'nonexistent' Th

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-17 Thread Akira Li
Akira Li added the comment: If the_oserror.filename is not None then str(the_oserror) appends the filename twice: [Errno 2] No such file or directory: 'nonexistent': 'nonexistent' You could remove `err_msg += ':' ...` statements to avoid the repeatition. I

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-17 Thread Akira Li
Akira Li added the comment: I can confirm that without the patch the filename attribute is None despite being mentioned in strerror. Travis, you should use `orig_executable` instead of `args[0]` to cover: subprocess.call("exit 0", shell=True, executable='/nonexistent bash

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-09 Thread Akira Li
Akira Li added the comment: I agree the documentation should nudge towards aware datetime objects. I've attached a documentation patch as an example. -- keywords: +patch Added file: http://bugs.python.org/file37162/issue22791-utcfromtimestamp-aware

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-08 Thread Akira Li
Akira Li added the comment: >>> from datetime import datetime, timezone >>> datetime.fromtimestamp(0, timezone.utc) datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc) already works and it is documented [1] [1] https://docs.python.org/3/lib

[issue16353] add function to os module for getting path to default shell

2014-11-06 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: Added file: http://bugs.python.org/file37140/os.get_shell_executable-3.patch ___ Python tracker <http://bugs.python.org/i

[issue16353] add function to os module for getting path to default shell

2014-11-06 Thread Akira Li
Akira Li added the comment: > Matt Frank added the comment: > > In msg230720 Akira Li (akira) wrote: >> os.defpath is supposed to be ':'+CS_PATH, e.g., look at glibc (C library >> used on Linux) sysdeps/posix/spawni.c I don't know whether it is >> poss

[issue16353] add function to os module for getting path to default shell

2014-11-05 Thread Akira Li
Akira Li added the comment: > Matt Frank added the comment: > > Unfortunately os.defpath seems to be hardcoded. And hardcoded to the > wrong value on every system I have looked at, including Linux. os.defpath is supposed to be ':'+CS_PATH, e.g., look at glibc (C library

[issue22799] wrong time.timezone

2014-11-05 Thread Akira Li
New submission from Akira Li: $ TZ=:Europe/Moscow ./python -mtest -v test_time == FAIL: test_localtime_timezone (test.test_time.TestPytime) -- Traceback

[issue22798] time.mktime doesn't update time.tzname

2014-11-05 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: Added file: http://bugs.python.org/file37134/test_mktime_changes_tzname.c ___ Python tracker <http://bugs.python.org/i

[issue22798] time.mktime doesn't update time.tzname

2014-11-05 Thread Akira Li
Akira Li added the comment: I've attached test-timezone-info-is-updated.diff file -- a patch for Lib/test/test_time.py that demonstrates that time functions fail to update the timezone info. The test uses Europe/Moscow timezone but most timezones around the world had/will have diff

[issue22798] time.mktime doesn't update time.tzname

2014-11-05 Thread Akira Li
New submission from Akira Li: time.tzname is initialized from C tzname variable or tm_zone around Jan, Jul of the current year. If time.mktime() is called with a time tuple from the past/future then after the call time.tzname might be out-of-sync with the corresponding C tzname and tm_zone

[issue22749] remove obsolete remark in time.clock() docs

2014-10-28 Thread Akira Li
New submission from Akira Li: time.clock() documentation [1] says: this is the function to use for benchmarking Python or timing algorithms. and Deprecated since version 3.3: The behaviour of this function depends on the platform: use perf_counter() or process_time() instead, depending

[issue22715] PEP 257: drop the recommendation for a blank line between the class line and the docstring

2014-10-24 Thread Akira Kitada
Akira Kitada added the comment: Good point. I looked at some Python files but, as you pointed out, I couldn't find ones what follow the recommendation. In some files there is a blank line after a docstring but it seemed it's not because it "is written as a number of sections"

[issue22715] PEP 257: drop the recommendation for a blank line between the class line and the docstring

2014-10-24 Thread Akira Kitada
Akira Kitada added the comment: Guido is with me :) On Wed, Oct 22, 2014 at 2:16 AM, Guido van Rossum wrote: > I think the argument is about the blank line between the "class" line and > the docstring. I agree with Akira that very few packages follow this style, > and I thi

[issue22715] PEP 257: drop the recommendation for a blank line between the class line and the docstring

2014-10-24 Thread Akira Kitada
New submission from Akira Kitada: The PEP 257 says: Insert a blank line before and after all docstrings (one-line or multi-line) that document a class Looking at stdlib and popular open source software, I couldn't find packages that follow this style, so I think this is not rea

[issue22709] restore accepting detached stdin in fileinput binary mode

2014-10-23 Thread Akira Li
Akira Li added the comment: > This is not related to Python. Terms "character", "string", "text", "file" > can have different meaning in different domains. In Python we use Python > terminology. There is no such thing as sys.stdin in Posix-co

[issue22709] restore accepting detached stdin in fileinput binary mode

2014-10-23 Thread Akira Li
Akira Li added the comment: It is incorrect that sys.stdin is *always* a text stream. It often is, but not always. There are cases when it is not e.g., $ tar zcf - stuff | gpg -e | ssh user@server 'cat - > stuff.tar.gz.gpg' tar's stdout is *not* a text stream. gpg'

[issue22709] restore accepting detached stdin in fileinput binary mode

2014-10-23 Thread Akira Li
New submission from Akira Li: The patch for Issue #21075: "fileinput.FileInput now reads bytes from standard stream if binary mode is specified" broke code that used sys.stdin = sys.stdin.detach() with FileInput(mode='rb') in Python 3.3 I've attached the patch that

[issue11820] idle3 shell os.system swallows shell command output

2014-10-19 Thread Akira Li
Akira Li added the comment: It looks like the issue can be reduced to whether or not to show this output: >>> import os >>> os.write(1, b'should we see this in idle?\n') should we see this in idle? 28 assuming sys.__stdout__.fileno() == fileno(stdout) == 1

[issue22627] Calling timestamp() on a datetime object modifies the timestamp of a different datetime object.

2014-10-14 Thread Akira Li
Akira Li added the comment: Christopher, About your script http://paste.ubuntu.com/8562027/ dateutil may break if the local timezone had different UTC offset in the past. You could use tzlocal module to get pytz timezone that can handle such timezones. To get the correct time for

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-10-06 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: -- nosy: +akira ___ Python tracker <http://bugs.python.org/issue22524> ___ ___ Python-bugs-list mailing list

[issue22472] OSErrors should use str and not repr on paths

2014-09-30 Thread Akira Li
Akira Li added the comment: I meant, in general, repr() is better for an error message because it should be unambigous unlike str() but in your particular case you could use filename attribute to format the way you like it for your UI. -- ___ Python

[issue22472] OSErrors should use str and not repr on paths

2014-09-29 Thread Akira Li
Akira Li added the comment: OSError has *filename* attribute. Could it be passed to the UI instead? -- nosy: +akira ___ Python tracker <http://bugs.python.org/issue22

[issue22477] GCD in Fractions

2014-09-25 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: -- nosy: -akira ___ Python tracker <http://bugs.python.org/issue22477> ___ ___ Python-bugs-list mailing list

[issue22477] GCD in Fractions

2014-09-24 Thread Akira Li
Akira Li added the comment: Whether or not gcd(a, b) == gcd(|a|, |b|) depends on the definition if we believe to Stepanov of C++ STL fame who mentions in his lecture [1] [1] http://www.stepanovpapers.com/gcd.pdf that the current implementation that uses two operation __bool__ and __mod__

[issue22442] subprocess.check_call hangs on large PIPEd data.

2014-09-21 Thread Akira Li
Akira Li added the comment: Victor, the message in my patch is copied almost verbatim from the current subprocess' documentation [1] [1] https://hg.python.org/cpython/file/850a62354402/Doc/library/subprocess.rst#l57 People use `call(cmd, stdout=PIPE)` as a *broken* way to suppress o

[issue22442] subprocess.check_call hangs on large PIPEd data.

2014-09-21 Thread Akira Li
Akira Li added the comment: @juj: DeprecationWarning is generated if PIPE is passed to call() as any positional or keyword argument in particular stdin, stdout, stderr. It also applies to check_call() that uses call() internally. -- ___ Python

[issue21332] subprocess bufsize=1 docs are misleading

2014-09-21 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: Added file: http://bugs.python.org/file36679/subprocess-line-buffering-issue21332-ps5.patch ___ Python tracker <http://bugs.python.org/i

  1   2   3   4   5   >