[issue28673] pyro4 with more than 15 threads often crashes 2.7.12

2016-11-26 Thread INADA Naoki
INADA Naoki added the comment: > Where *exactly*? See attached patch. But python with this patch can deadlock in other state. Main thread wait GIL but no other living threads have GIL. It seems caused by other issue around finalization and multithreading. > Py_FinalizeEx() first calls wait_for

[issue28739] PEP 498: docstrings as f-strings

2016-11-26 Thread Guido van Rossum
Guido van Rossum added the comment: I was just noticing that the formal grammar in the reference manual first defines a single string literal and then separately describes concatenation. -- ___ Python tracker _

[issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured

2016-11-26 Thread Ned Deily
Ned Deily added the comment: After discussing this offline with Łukasz, I'm going to take the risk of allowing the non-conforming 3.6 checkin to remain in for 3.6.0. -- nosy: +ned.deily ___ Python tracker

[issue28739] PEP 498: docstrings as f-strings

2016-11-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I considered concatenated string literals to be included in 'string literal'. If that is not obvious, then it should be made so. Replace 'string literal' with 'string literal or concatenated strings literals' and link each part to their respective (and succe

[issue28775] Option to set startup directory in IDLE

2016-11-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Raymond: yes, I am definitely open to collaboration on this issue. The timing is good as I just started, a month ago, expanding configure dialog testing beyond the trivial one of creating an instance without raising. Real tests are needed preparation for mak

[issue28804] file tell() report incorrect file position on Windows (but Linux is OK)

2016-11-26 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, it's a duplicate. The only valid operation on the value of calling tell() from a text-mode file is to pass it to seek(). As long as that works, there's no bug here. -- nosy: +eric.smith resolution: -> duplicate stage: -> resolved status: open ->

[issue28494] is_zipfile false positives

2016-11-26 Thread Thomas Waldmann
Thomas Waldmann added the comment: Well, if you have a better idea how to fix is_zipfile, go on. I even suggested an alternative, how about that? It is a miserable state when the is_zipfile function in the stdlib detects random crap as a zip file. -- _

[issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is this release critical for 3.6.0? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-b

[issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured

2016-11-26 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks for your patch! As you can see, 2.7 is no longer touched as the codebases diverged. I'll release a 3.6 backport on PyPI sometime this weekend that you can use. -- resolution: -> fixed status: open -> closed versions: +Python 3.5, Python 3.6, Pyth

[issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured

2016-11-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 40567b8e3478 by Łukasz Langa in branch '3.5': Fixes #24142: [configparser] always join multiline values to not leave the parser in an invalid state https://hg.python.org/cpython/rev/40567b8e3478 New changeset 306cfb866399 by Łukasz Langa in branch

[issue28739] PEP 498: docstrings as f-strings

2016-11-26 Thread Guido van Rossum
Guido van Rossum added the comment: I think such a patch is fine -- for 3.6.1. Also note that linking to the definition of "string literal" is insufficient, assuming we will want to continue supporting literal concatenation ( https://docs.python.org/3/reference/lexical_analysis.html#string-liter

[issue28739] PEP 498: docstrings as f-strings

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch makes f-strings not be accepted as docstrings. It also disallow f-strings in ast.literal_eval(). -- keywords: +patch Added file: http://bugs.python.org/file45658/fstring-no-docstring.patch ___ Python

[issue28739] PEP 498: docstrings as f-strings

2016-11-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I withdraw my previously suggested addition to the Docstring glossary entry (msg281740). It implies that trivial f-strings are acceptable and I agree that other implementations and future Cpython should be free to strictly follow the literal meaning of the fi

[issue28810] Document bytecode changes in 3.6

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think only the mention in What's News is needed. Elvis already provided a patch in issue28635. But the documentation of other opcodes may be missed or outdated. -- ___ Python tracker

[issue28635] Update What's New for 3.6

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Thanks Elvis! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue28635] Update What's New for 3.6

2016-11-26 Thread Elvis Pranskevichus
Elvis Pranskevichus added the comment: Here's a patch to add opcode changes to the What's New document. Thanks for pointing this out Serhiy. -- Added file: http://bugs.python.org/file45657/0001-Issue-28635-Document-Python-3.6-opcode-changes.patch _

[issue28810] Document bytecode changes in 3.6

2016-11-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: SETUP_ANNOTATIONS and STORE_ANNOTATION opcodes are documented in documentation for dis module. Should they be documented also somewhere else? -- nosy: +levkivskyi ___ Python tracker

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2016-11-26 Thread Bert JW Regeer
Bert JW Regeer added the comment: Unfortunately I need to spin another patch, the one I created didn't solve the issue for one of WebOb's users: https://github.com/Pylons/webob/pull/300 (Thanks Julien Meyer!) I have his permission to grab his test/patch and update this patch, I will get this

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2016-11-26 Thread Ned Deily
Ned Deily added the comment: Berker asks in IRC whether this change should go into 3.6.0 (at rc1). While it is affecting a relatively self-contained part of the standard library (cgi), the issue doesn't seem to be "release critical". Further, it is changing behavior that was changed barely a

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would suggest to use sys.maxsize for default value in Argument Clinic, but right now bisect functions don't support well hi > len(a). This needs adding an equivalent of hi = min(hi, len(a)) in C code. -1 could be explicitly supported for backward compatibi

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: [SS] > This is rather a random difference. Try to run the bench several times. I did run several times. The results were perfectly stable (+/- 1ns). It tells us that METH_FASTCALL is something we want to use as broadly as possible. [JP] > it yielded a co

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I left this issue open for documenting the wordcode. Now opened separate issue28810 for this. -- ___ Python tracker ___ _

[issue28635] Update What's New for 3.6

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please take a look at issue28810. Most bytecode changes are not documented. -- ___ Python tracker ___

[issue28810] Document bytecode changes in 3.6

2016-11-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: There are many bytecode changes in 3.6, but seems most of them are not documented (besides short line in _bootstrap_external.py). * The bytecode now uses 16 bit units (wordcode) (issue26647). * Added FORMAT_VALUE opcode (issue25483). * Added BUILD_CONST_K

[issue28809] mention asyncio.gather non-deterministic task starting order

2016-11-26 Thread Soren Solari
New submission from Soren Solari: https://github.com/python/asyncio/issues/432 asyncio.gather documentation states: "the returned future’s result is the list of results (in the order of the original sequence, not necessarily the order of results arrival)" An additional statement like "tasks ar

[issue28739] PEP 498: docstrings as f-strings

2016-11-26 Thread Guido van Rossum
Guido van Rossum added the comment: OK, clearly the code that sets __doc__ is too closely tied to the generated code (or to the reduced AST used to generate code). I still think code that uses any of these is on thin ice and should expect to be broken in the future. -- _

[issue28805] Add documentation for METH_FASTCALL

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Ah? Can you please elaborate your secret plan? :-) I already said about this. Move the part of parsing keyword argument outside of the function. The caller should unpack keyword arguments and pass just a raw array of PyObject*. Missed arguments are set to

[issue28805] Add documentation for METH_FASTCALL

2016-11-26 Thread Stefan Krah
Stefan Krah added the comment: There are a couple of problems with using Argument Clinic for third party projects. First, it makes no stability promises: "Currently Argument Clinic is considered internal-only for CPython. ..." Then, for large projects that already use some generated code (lik

[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45656/PyUnicode_CompareWithASCIIString-no-errors.patch ___ Python tracker ___ __

[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file45655/PyUnicode_CompareWithASCIIString-no-errors.patch ___ Python tracker ___

[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyUnicode_CompareWithASCIIString() never set an exception in 3.2 and earlier versions. Since 3.3 it sets an exception and returns -1 if the first argument is not ready Unicode object, but this was not documented until issue28701. Due to undocumenting this

[issue28758] UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in position 74: illegal multibyte sequence

2016-11-26 Thread Steve Dower
Steve Dower added the comment: Unless the reporter comes back with more information, I'll assume it's not a bug. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker _

[issue24339] iso6937 encoding missing

2016-11-26 Thread John Helour
John Helour added the comment: If I take the ISO_6937 file as a template for encoding table then increasing the range 0x20..0x7f to 0x00..0xA0 is the simplest solution. -- Added file: http://bugs.python.org/file45654/iso6937.py ___ Python tracker

[issue24339] iso6937 encoding missing

2016-11-26 Thread John Helour
John Helour added the comment: If I take the ISO_6937 file as a template for encoding table then increasing the range 0x20..0x7f to 0x00..0xA0 is the simplest solution. -- ___ Python tracker ___

[issue24339] iso6937 encoding missing

2016-11-26 Thread John Helour
Changes by John Helour : Removed file: http://bugs.python.org/file45647/iso6937.py ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue8145] Documentation about sqlite3 isolation_level

2016-11-26 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- nosy: +palaviv ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread STINNER Victor
STINNER Victor added the comment: Argument Clinic adds a signature and a better docstring. So I like it! Speedup for tiny lists is just a nice side effect. -- ___ Python tracker ___

[issue28805] Add documentation for METH_FASTCALL

2016-11-26 Thread STINNER Victor
STINNER Victor added the comment: Is it possible to use Argument Clinic for third party extensions? If yes, I suggest to use it. It would also be nice if Cython could use it automatically. So we can suggest to use Cython. I don't know well Cython, maybe your idea is very dumb :-) Serhiy Storcha

[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Proposing a patch. -- keywords: +patch Added file: http://bugs.python.org/file45653/issue26483.diff ___ Python tracker ___ __

[issue28807] [NetBSD] interpreter hangs on exit after call to subprocess.Popen()

2016-11-26 Thread Oskar Skog
Oskar Skog added the comment: I really need a "stupid"-helmet today. Reopen if you can experience the same bug on a different platform. -- resolution: -> third party status: open -> closed ___ Python tracker

[issue26363] __builtins__ propagation is misleading described in exec and eval documentation

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Hi Xavier, thanks for reporting, Your first point is right, the implementation being: if (PyDict_GetItemString(globals, "__builtins__") == NULL) { if (PyDict_SetItemString(globals, "__builtins__", PyEval_GetBuiltins()) != 0)

[issue24339] iso6937 encoding missing

2016-11-26 Thread Julien Palard
Julien Palard added the comment: According to https://webstore.iec.ch/preview/info_isoiec6937%7Bed3.0%7Den.pdf: > NOTE: The shaded positions 00/00 to 01/15 and 07/15 to 09/15 are outside the > scope of this International Standard. So it's clear to me that they are not undefined, they are just

[issue28807] [NetBSD] interpreter hangs on exit after call to subprocess.Popen()

2016-11-26 Thread Oskar Skog
New submission from Oskar Skog: This is a platform specific bug. Only noticed this on NetBSD 6.1 x86-32 on a VirtualBox machine. To me, the patches for NetBSD do not look relevant to subprocess or core stuff. http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/lang/python27/patches/?only_with_tag=MAIN

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Hi Serhiy, hi: Py_ssize_t(py_default="len(a)") = -1 Won't works, as pydoc will use the inspect module (_signature_fromstr) to get the signature. _signature_fromstr expects a valid python signature, but `def foo(a, x, lo=0, high=len(a)): pass` is not valid

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2016-11-26 Thread Berker Peksag
Changes by Berker Peksag : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28805] Add documentation for METH_FASTCALL

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suggest to keep it internal. It's meaning may be changed in future. I have some ideas about making it more convenient and faster (but I'm not sure that they would work). -- ___ Python tracker

[issue28763] Use en-dashes for ranges in docs

2016-11-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 77307437ae15 by Serhiy Storchaka in branch '3.5': Issue #28763: Use double hyphens (rendered as en-dashes) in numerical ranges https://hg.python.org/cpython/rev/77307437ae15 New changeset 59bd48afa1bc by Serhiy Storchaka in branch '2.7': Issue #2876

[issue28763] Use en-dashes for ranges in docs

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Terry. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker __

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Hi Serhiy, > Julien, you can declare the hi parameter as >hi: Py_ssize_t(py_default="len(a)") = -1 Looks like a good idea, I was aware of its existance but did not took the time to read the doc about it, kind of learning step by stpe. But as you provided t

[issue28780] netrc throws NetrcParseError for record without 'password'

2016-11-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- dependencies: +Improve the netrc library ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue28806] Improve the netrc library

2016-11-26 Thread Xiang Zhang
New submission from Xiang Zhang: netrc library now gets some problems: 1. All tokens are mandatory. (#28780) 2. Token values are limited to a limited set of characters. (#557704) 3. Does not complain about macro definition without a null line. 4. If the login name is anonymous, security check is

[issue28805] Add documentation for METH_FASTCALL

2016-11-26 Thread Stefan Krah
New submission from Stefan Krah: It looks like METH_FASTCALL gives nice speedups (#28754). Is this an internal interface or can it be documented like METH_KEYWORDS etc.? -- assignee: docs@python components: Documentation messages: 281766 nosy: docs@python, haypo, serhiy.storchaka, skrah

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Julien, you can declare the hi parameter as hi: Py_ssize_t(py_default="len(a)") = -1 if you want the signature be matching the documentation. In general, it is better to use converter names rather than format codes. > Curiously, this patch gives about a

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Hi Raymond, > Curiously, this patch gives about a 10% to 15% speedup. Any sense of how > that improvement arises? That's because Argument Clinic is generating methoddef with METH_FASTCALL: $ grep FASTCALL Modules/clinic/_bisectmodule.c.h {"bisect_right",

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Curiously, this patch gives about a 10% to 15% speedup. Any sense of how that improvement arises? $ py3.7 -m timeit -s 'from bisect import bisect' -s 'a=list(range(100))' 'bisect(a, 10)' 229 nsec # Clang baseline 202 nsec # Clang with patch 189

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Should we also update howto/clinic, bullet "11.", to be explicit about not adding per-parameter in the same patch? Like a: > If you're porting existing function to Argument clinic, skip this step to > simplify code review. ? -- __

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Here is the new patch, I ran a diff between "./python -m pydoc _bisect" before and after my patch, here it is: 13,15c13 < bisect_left(...) < bisect_left(a, x[, lo[, hi]]) -> index < --- > bisect_left(a, x, lo=0, hi=-1) 25,27c23 < bis

[issue28682] Bytes support in os.fwalk()

2016-11-26 Thread Antti Haapala
Antti Haapala added the comment: shouldn't this get in sooner, as the 3.5.2 documentation says that it behaves exactly like `os.walk`, with some additions, none of which says "bytes paths are not supported". This looks like a bug to me. -- nosy: +ztane

[issue28799] Drop CALL_PROFILE special build?

2016-11-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +Jeremy.Hylton ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue28739] PEP 498: docstrings as f-strings

2016-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Adding more confusion, the expression ``('This is a docstring')`` is accepted as a docstring despite the fact that it is not a string literal. The cases f'string' and ('string') looks similar to me. Both are simple expressions that become indistinguishable f