[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

Re: How to run self-contained Python scripts who don't need Python installation?

2017-06-09 Thread Akira Li
"Juan C." writes: > I need to run some Python 3.6.0 scripts on the users' machines (W7 and > W10) in an enterprise environment, but I can't install Python on those > machines. I tried looking for those "py to exe", but sadly they don't > support Python 3.6.0. I've

Re: Is An Element of a Sequence an Object?

2017-06-04 Thread Akira Li
Jon Forrest writes: > I'm learning about Python. A book I'm reading about it > says "... > a string in Python is a sequence. correct. > A sequence is an ordered collection of objects". correct. https://docs.python.org/3/glossary.html#term-sequence > This implies that each

Re: Transitioning from Linux to Windows

2017-06-04 Thread Akira Li
chitt...@uah.edu writes: > ... > Ideally, I would like to set up the user on their Windows 7/10 system > so that they can "login" to the ubuntu system (say putty) - change > working directory (to where desired) - run the script (on the ubuntu > system) - and scp the file back to the windows

Re: Top Python Interview Questions

2017-05-26 Thread Akira Li
Terry Reedy writes: > On 5/26/2017 1:03 AM, Aarusha wrote: >> PYTHON INTERVIEW QUESTIONS >> >> Mindmajix has compiled Python Interview questions which would >> benefit the learners to attend the Python interviews. >> >> Q. How is Python executed? > > It depends on the

[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 <rep...@bugs.python.org> <http://bugs.python.org/issue29352> ___ __

[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 <rep...@bugs.python.org> <http://bugs.p

[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 <rep...@bugs.python.org> <http://bugs.python.or

[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 <rep...@bugs.python.org> <http://bugs.python.org/issue28876> ___ __

[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 "len(s

[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://bugs.pytho

[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.html

[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 <rep...@bugs.python.org> <http://bugs.python.org/issue28180> ___ ___ Python

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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/range_bool.patch

Re: User Interface Suggestions? (newbie)

2016-10-05 Thread Akira Li
Beverly Howard writes: >...snip... > A primary question would be, "What are options for building a display > that would update displayed values without scrolling?" To rewrite only the last character, you could use '\b': import os import itertools import time for c

[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 want

[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 subprocess.run() code

[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 l

[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 <

Re: Interacting with Subprocesses

2016-05-04 Thread Akira Li
Terry Reedy writes: > On 5/4/2016 2:41 PM, Dick Holmes wrote: >> I am attempting to write a Python program that will interact with >> a (non-Python) process. The programs will run under MinGW. The >> process can use stdin/stdout commands and responses and can work >> with

Re: Interacting with Subprocesses

2016-05-04 Thread Akira Li
ule useful http://stackoverflow.com/tags/subprocess/info Akira -- https://mail.python.org/mailman/listinfo/python-list

[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() shouldn't raise

[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'" for choosing asy

Re: threading bug in strptime

2015-10-07 Thread Akira Li
Larry Martell writes: > We have been trying to figure out an intermittent problem where a > thread would fail with this: > > AttributeError: 'module' object has no attribute '_strptime' > > Even though we were importing datetime. After much banging our heads > against

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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

[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.: M

[issue24773] Implement PEP 495 (Local Time Disambiguation)

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

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

2015-09-29 Thread Akira Li
Akira Li added the comment: Marc-Andre Lemburg <rep...@bugs.python.org> 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

Re: Idiosyncratic python

2015-09-24 Thread Akira Li
Mark Lawrence writes: > On 24/09/2015 07:02, Steven D'Aprano wrote: >> I was looking at an in-house code base today, and the author seems to have a >> rather idiosyncratic approach to Python. For example: >> >> for k, v in mydict.items(): >> del(k) >> ... >> >>

Re: Modify environment variable for subprocess

2015-09-23 Thread Akira Li
loial writes: > I need to modify the LIBPATH environment variable when running a > process via subprocess, but otherwise retain the existing environment. > > Whats the best way to do that? Pass env=dict(os.environ, LIBPATH=value) parameter: import os import subprocess

Re: A little test for you Guys

2015-09-22 Thread Akira Li
Python_Teacher via Python-list writes: ... > Let's define the function plural : > > def plural(words): > plurals = [] > for word in words: >plurals.append(word + 's') > return plurals > > for word in plural(['cabagge','owl','toy']): > print word

Re: Lightwight socket IO wrapper

2015-09-20 Thread Akira Li
"James Harris" writes: > I guess there have been many attempts to make socket IO easier to > handle and a good number of those have been in Python. > > The trouble with trying to improve something which is already well > designed (and conciously left as is) is that the

Re: Lightwight socket IO wrapper

2015-09-20 Thread Akira Li
"James Harris" writes: ... > There are a few things and more crop up as time goes on. For example, > over TCP it would be helpful to have a function to receive a specific > number of bytes or one to read bytes until reaching a certain > delimiter such as newline or zero

Re: Shutting down a cross-platform multithreaded app

2015-09-18 Thread Akira Li
"James Harris" writes: ... > Needless to say, on a test Windows machine AF_UNIX is not present. The > only cross-platform option, therefore, seems to be to use each > subthread's select()s to monitor two AF_INET sockets: the one to the > client and a control one from

Re: Terminology: "reference" versus "pointer"

2015-09-14 Thread Akira Li
Random832 writes: ... > Why can't it describe range(1)? A range object in my model would include > the start, stop, and step; _not_ the contents of what you would get by > iterating over it; since that's not part of the physical structure of > the object, but the

Re: Terminology: "reference" versus "pointer"

2015-09-14 Thread Akira Li
Steven D'Aprano <st...@pearwood.info> writes: > On Mon, 14 Sep 2015 01:23 pm, Akira Li wrote: > >> Steven D'Aprano <st...@pearwood.info> writes: >> >>> On Mon, 14 Sep 2015 11:22 am, Akira Li wrote: >>>> Look at the last example: >>>>

Re: Terminology: "reference" versus "pointer"

2015-09-14 Thread Akira Li
Ned Batchelder <n...@nedbatchelder.com> writes: > On Monday, September 14, 2015 at 3:32:46 PM UTC-4, Akira Li wrote: >> Ned Batchelder <n...@nedbatchelder.com> writes: >> ... >> > What do you feel is missing from Steven's diagram? >> >> I do

Re: Terminology: "reference" versus "pointer"

2015-09-14 Thread Akira Li
Random832 <random...@fastmail.com> writes: > On Mon, Sep 14, 2015, at 10:48, Akira Li wrote: >> start, stop, step attributes (corresponding Python ints) may not exist >> ("the objects we've talking about have never been created") until you >> request

Re: Terminology: "reference" versus "pointer"

2015-09-14 Thread Akira Li
Random832 <random...@fastmail.com> writes: > On Mon, Sep 14, 2015, at 13:45, Akira Li wrote: >>[box + arrow pointing to] + object == parcel tag + object > > The problem is that if there are multiple namespaces, or if you've also > got to include references f

Re: Terminology: "reference" versus "pointer"

2015-09-14 Thread Akira Li
Ned Batchelder writes: ... > What do you feel is missing from Steven's diagram? I don't feel anything missing because I don't expect the model to be more detailed. -- https://mail.python.org/mailman/listinfo/python-list

Re: Terminology: "reference" versus "pointer"

2015-09-13 Thread Akira Li
Random832 <random...@fastmail.com> writes: > Akira Li <4kir4...@gmail.com> writes: >>Rustom Mody <rustompm...@gmail.com> writes: >>> viz. I have two variables (or names!) say a and b which look the same >>>>>> a >>> [[1,2],[1,2]] >

Re: Terminology: "reference" versus "pointer"

2015-09-13 Thread Akira Li
Chris Angelico <ros...@gmail.com> writes: > On Mon, Sep 14, 2015 at 9:17 AM, Akira Li <4kir4...@gmail.com> wrote: >> If you mean this quote from [1]: >> >> Although we commonly refer to "variables" even in Python (because it's >> common ter

Re: Terminology: "reference" versus "pointer"

2015-09-13 Thread Akira Li
Random832 <random...@fastmail.com> writes: > Akira Li <4kir4...@gmail.com> writes: >> I'm not sure what "parcel tags" model is but if you mean these >> pictures[1] than it works in this case as well as any other (take *a*, >> *b* nametags, put them on

Re: Terminology: "reference" versus "pointer"

2015-09-13 Thread Akira Li
Chris Angelico <ros...@gmail.com> writes: > On Mon, Sep 14, 2015 at 11:22 AM, Akira Li <4kir4...@gmail.com> wrote: >> Steven D'Aprano <st...@pearwood.info> writes: >> >>> On Mon, 14 Sep 2015 09:17 am, Akira Li wrote: >>> >>>> I d

Re: Terminology: "reference" versus "pointer"

2015-09-13 Thread Akira Li
Steven D'Aprano <st...@pearwood.info> writes: > On Mon, 14 Sep 2015 09:17 am, Akira Li wrote: > >> I don't see why the model that can't describe range(1) in Python 3 >> pretends to be complete. > > > Please explain. > > range(1) returns a range instance. Wha

Re: Terminology: "reference" versus "pointer"

2015-09-13 Thread Akira Li
Steven D'Aprano <st...@pearwood.info> writes: > On Mon, 14 Sep 2015 11:22 am, Akira Li wrote: >> Look at the last example: >> http://thread.gmane.org/gmane.comp.python.general/782626/focus=782704 > > > I'm afraid that page is broken in my browser. Can you not summar

Re: Are there any "correct" implementations of tzinfo?

2015-09-12 Thread Akira Li
Random832 writes: > I was trying to find out how arithmetic on aware datetimes is "supposed > to" work, and tested with pytz. When I posted asking why it behaves this > way I was told that pytz doesn't behave correctly according to the way > the API was designed. The

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Akira Li
Rustom Mody writes: > On Saturday, September 12, 2015 at 8:11:49 PM UTC+5:30, Laura Creighton wrote: >> In a message of Sat, 12 Sep 2015 05:46:35 -0700, Rustom Mody writes: >> >How about lay-English ontology in which "point to" and "refer to" are fairly >> >synonymous? >>

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Akira Li
Rustom Mody <rustompm...@gmail.com> writes: > On Saturday, September 12, 2015 at 11:26:18 PM UTC+5:30, Akira Li wrote: >> Rustom Mody writes: >> >> > On Saturday, September 12, 2015 at 8:11:49 PM UTC+5:30, Laura Creighton >> > wrote: >> >&

Re: Context-aware return

2015-09-10 Thread Akira Li
Grant Edwards writes: > On 2015-09-10, Steven D'Aprano wrote: > >> I have a function which is intended for use at the interactive interpreter, >> but may sometimes be used non-interactively. I wish to change it's output >> depending on the context

Re: passing double quotes in subprocess

2015-09-08 Thread Akira Li
loial writes: > I need to execute an external shell script via subprocess on Linux. > > One of the parameters needs to be passed inside double quotes > > But the double quotes do not appear to be passed to the script > > I am using : > > myscript = '/home/john/myscript' >

Re: Python handles globals badly.

2015-09-08 Thread Akira Li
Vladimir Ignatov writes: >>> I had some experience programming in Lua and I'd say - that language >>> is bad example to follow. >>> Indexes start with 1 (I am not kidding) >> >> What is so bad about that? > > It's different from the rest 99.9% of languages for no particular

[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() w

[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*

Re: Sandboxing Python

2015-08-23 Thread Akira Li
Mark Lawrence breamore...@yahoo.co.uk writes: I was always led to believe that the subject was a difficult thing to do, but here https://www.reddit.com/r/learnpython/comments/3huz4x/how_to_do_math_inside_raw_input/ is a safe solution in only 23 characters, or are there any discernable flaws

Re: asyncio, coroutines, etc. and simultaneous execution

2015-08-23 Thread Akira Li
Charles Hixson charleshi...@earthlink.net writes: If I understand correctly asyncio, coroutines, etc. (and, of course, Threads) are not simultaneously executed, and that if one wants that one must still use multiprocessing. But I'm not sure. The note is still there at the start of

[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 corresponding test should

[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

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-07 Thread Akira Li
Terry Reedy tjre...@udel.edu writes: There have been discussions, such as today on Idle-sig , about who uses Idle and who we should design it for. If you use Idle in any way, or know of or teach classes using Idle, please answer as many of the questions below as you are willing, and as are

Re: Convert between timezones

2015-07-31 Thread Akira Li
Thomas 'PointedEars' Lahn pointede...@web.de writes: [X-Post F'up2 comp.unix.shell] Chris Angelico wrote: On Fri, Jul 31, 2015 at 6:15 PM, Cameron Simpson c...@zip.com.au wrote: Actually, bash has no timezone support but the date command _does_, and probably neither better nor worse than

[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 rep...@bugs.python.org http://bugs.python.org/issue19007 ___ ___ Python-bugs-list mailing list

Re: Matplotlib X-axis timezone trouble

2015-07-03 Thread Akira Li
Peter Pearson pkpearson@nowhere.invalid writes: The following code produces a plot with a line running from (9:30, 0) to (10:30, 1), not from (8:30, 0) to (9:30, 1) as I desire. If I use timezone None instead of pacific, the plot is as desired, but of course that doesn't solve the general

[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 return None? It is how it is done

[issue10482] subprocess and deadlock avoidance

2015-03-22 Thread Akira Li
Changes by Akira Li 4kir4...@gmail.com: -- nosy: +akira ___ Python tracker rep...@bugs.python.org 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 datetime, timedelta

[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 rep...@bugs.python.org http://bugs.python.org/issue21619

[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 + timedelta

[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 fixed

[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 rep...@bugs.python.org http://bugs.python.org/issue22799

[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 fail

[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 rep...@bugs.python.org http

[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'\u20ac'.encode(sys.getfilesystemencoding()) # non-ascii if not os.path.isdir(d

[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. -- components

[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 last sentence should

[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 during the sleep

[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: docs@python

[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 recommended 80

[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/issue22798

[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 rep...@bugs.python.org http://bugs.python.org/issue22932 ___ ___ Python-bugs-list mailing list

[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 practice. 2. you

Re: Simple background sound effect playback

2014-12-21 Thread Akira Li
other library that provides similar feature list while being less complex; do tell. -- Akira. -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating interactive command-line Python app?

2014-12-13 Thread Akira Li
distribution i.e., you could ship your executable with a bundled Python interpreter. -- Akira -- https://mail.python.org/mailman/listinfo/python-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 that returns

Re: How to make subprocess run for 60 sec?

2014-12-12 Thread Akira Li
It's in C, and is the product of considerable real-world use. It exits almost immediately after its subprocess exits, FWIW. -- Akira -- https://mail.python.org/mailman/listinfo/python-list

Re: time.monotonic() roll over

2014-12-05 Thread Akira Li
()) that allows us to choose whether we need a relative delay (e.g., kill a subprocess if it hasn't finished in 10 seconds) or an absolute deadline (e.g., these lights should be on 9pm-6am local time). *Both* use cases are valid. -- Akira -- https://mail.python.org/mailman/listinfo/python-list

Re: Do you like the current design of python.org?

2014-12-04 Thread Akira Li
old error message? I see that pythondotorg accepts pull requests and allows to report issues. https://github.com/python/pythondotorg -- Akira -- https://mail.python.org/mailman/listinfo/python-list

Re: time.monotonic() roll over

2014-12-04 Thread Akira Li
-virtualized PCs connected to AC are (becoming) minority. -- Akira -- https://mail.python.org/mailman/listinfo/python-list

[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 choice of epoch. Encoding is how the bytes in memory

[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 enumerates some

[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 something that is defined

  1   2   3   4   5   6   >