[issue27861] sqlite3 type confusion and multiple frees

2016-08-27 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for the comments Serhiy. v3 now fixs all that. -- Added file: https://bugs.python.org/file44245/issue27861_conn_cursor_v3.patch ___ Python tracker

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2016-08-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: FWIW. Py_SIZE is used all over listobject.c. Are you saying that this could be improved? -- ___ Python tracker ___

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2016-08-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a toy example that exposes the problem, but the problem itself is not a toy problem. The key point is that calculating slice indices cause executing Python code and releases GIL. In multithread program a sequence can be changed not in toy __index__

[issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist

2016-08-27 Thread Emanuel Barry
New submission from Emanuel Barry: The function does definitely exist for me. Please make sure your Python version is up-to-date. Also, please post a short summary of the issue, and avoid screenshots whenever possible; it's more work for you, makes it harder for us to reproduce/follow (need

[issue27761] Private _nth_root function loses accuracy

2016-08-27 Thread Tim Peters
Tim Peters added the comment: Adding one more version of the last code, faster by cutting the number of extra digits used, and by playing "the usual" low-level CPython speed tricks. I don't claim it's always correctly rounded - although I haven't found a specific case where it isn't. I do

[issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist

2016-08-27 Thread Richard
Changes by Richard : Added file: https://bugs.python.org/file44244/docbugmathlog2.jpg ___ Python tracker ___

[issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist

2016-08-27 Thread Richard
Changes by Richard : -- title: Python docs on 9.52 Math module lists math.log2 as function but it does not exist -> Python docs on 9.2 Math module lists math.log2 as function but it does not exist ___ Python tracker

[issue27882] Python docs on 9.52 Math module lists math.log2 as function but it does not exist

2016-08-27 Thread Richard
Changes by Richard : -- title: Python docs on 3.52 Math module lists math.log2 as function but it does not exist -> Python docs on 9.52 Math module lists math.log2 as function but it does not exist ___ Python tracker

[issue27882] Python docs on 3.52 Math module lists math.log2 as function but it does not exist

2016-08-27 Thread Richard
Changes by Richard : -- assignee: docs@python components: Documentation nosy: PyRW, docs@python priority: normal severity: normal status: open title: Python docs on 3.52 Math module lists math.log2 as function but it does not exist versions: Python 3.5

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-08-27 Thread Wei-Cheng Pan
Changes by Wei-Cheng Pan : Removed file: https://bugs.python.org/file43596/json-add-an-option-to-bypass-non-ascii-characters.patch ___ Python tracker

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-08-27 Thread Wei-Cheng Pan
Wei-Cheng Pan added the comment: Added doc and test. -- Added file: https://bugs.python.org/file44243/json-add-an-option-to-bypass-non-ascii-characters-v3.patch ___ Python tracker

[issue26081] Implement asyncio Future in C to improve performance

2016-08-27 Thread INADA Naoki
INADA Naoki added the comment: There are only two weeks until 3.6 beta. Yury, could you review this again? Or should I implement freelist before review? Implementing freelist may be easy, but measuring the effect of freelist from realistic application is not easy. --

[issue14376] sys.exit documents argument as "integer" but actually requires "subtype of int"

2016-08-27 Thread Lucas Hoffmann
Changes by Lucas Hoffmann : -- nosy: +luc ___ Python tracker ___ ___ Python-bugs-list mailing

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2016-08-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: There is really one immediate issue: PySlice_GetIndicesEx in Objects/sliceobject.c takes as inputs a slice object and a sequence length, but not the sequence itself. It starts with "/* this is harder to get right than you might think */" Yep. It assumes

[issue26027] Support Path objects in the posix module

2016-08-27 Thread Brett Cannon
Brett Cannon added the comment: Thanks for fixing it, Berker! On Sat, Aug 27, 2016, 12:59 Berker Peksag wrote: > > Berker Peksag added the comment: > > Builtbots look happy now: > > * Windows 7 SP1: >

[issue26027] Support Path objects in the posix module

2016-08-27 Thread Berker Peksag
Berker Peksag added the comment: Builtbots look happy now: * Windows 7 SP1: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/8177 * Windows 8: http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/2476 * Windows 10:

[issue27740] Fix doc of Py_CompileStringExFlags

2016-08-27 Thread Xiang Zhang
Xiang Zhang added the comment: I am not a native speaker so I decide not to trap in the minor part. Could you just fix the first point if there is no doubt? I'm okay with the second part staying as now. -- Added file: https://bugs.python.org/file44242/issue27740.patch

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-27 Thread Xiang Zhang
Xiang Zhang added the comment: Delete by other test cases without restoring? Which is rather impossible to happen. But I'd like it to stay like now. It is not complex and straight when reading. I don't want to change it to swap_attr. -- ___ Python

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-08-27 Thread Xiang Zhang
New submission from Xiang Zhang: This is a follow up of issue27861 and means to fix the second issue mentioned in it. pysqlite_connection_set_isolation_level now does not check allowed values and when any part fails, it leaves the Connection object in an inconsistent state. I'll write a

[issue27880] cPickle fails on large objects (still - 2011 and counting)

2016-08-27 Thread Robert Pierce
New submission from Robert Pierce: cPickle fails on large objects, throwing a SystemError exception which is cryptic. The issue was fixed for pickle in python 3 back in 2011 (http://bugs.python.org/issue11564), but never addressed in 2.7. It seems to be a recurring complaint (e.g.,

[issue27861] sqlite3 type confusion and multiple frees

2016-08-27 Thread Xiang Zhang
Xiang Zhang added the comment: If decide to follow the behaviour of code rather than doc, it's a different story. issue27861_conn_cursor_v2.patch tries to solve the first issue. It now preserve the previous behaviour treating factory as a callable not a cursor type. -- Added file:

[issue26027] Support Path objects in the posix module

2016-08-27 Thread Eryk Sun
Eryk Sun added the comment: I wish the name was "pushCleanup" to emphasize that cleanup functions are popped and called in LIFO order. -- nosy: +eryksun ___ Python tracker

[issue26027] Support Path objects in the posix module

2016-08-27 Thread Berker Peksag
Berker Peksag added the comment: test_path_t_converter failure looks similar to http://bugs.python.org/issue27493#msg271047 (fixed by 5424252ce174.) I've tested a fix on my Windows box and the test passed for me. Hopefully 8ec5a00e5d75 will fix the problem on buildbots too :) --

[issue26027] Support Path objects in the posix module

2016-08-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8ec5a00e5d75 by Berker Peksag in branch 'default': Issue #26027: Fix test_path_t_converter on Windows https://hg.python.org/cpython/rev/8ec5a00e5d75 -- ___ Python tracker

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

[issue27861] sqlite3 type confusion and multiple frees

2016-08-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: About the first bug. Checking that a factory is a subclass of sqlite3.Cursor is not enough. I suppose that a subclass of sqlite3.Cursor with overridden __new__ could pass the check but cause a crash. class BadCursor(sqlite3.Cursor): def

[issue26027] Support Path objects in the posix module

2016-08-27 Thread Brett Cannon
Brett Cannon added the comment: It's still failing: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/8176/steps/test/logs/stdio . Don't have time to look at why right now and I'm on a Mac ATM so I can't test locally to try and fix it until I'm at work on Monday. If

[issue27861] sqlite3 type confusion and multiple frees

2016-08-27 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for the comments, Serhiy and palaviv. I left some questions in reply to them. -- ___ Python tracker ___

[issue12178] csv writer doesn't escape escapechar

2016-08-27 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3 ___ Python tracker

[issue26027] Support Path objects in the posix module

2016-08-27 Thread Brett Cannon
Brett Cannon added the comment: Hopefully https://hg.python.org/cpython/rev/775158408ecb will fix the problem. -- status: open -> closed ___ Python tracker

[issue27506] make bytes/bytearray translate's delete a keyword argument

2016-08-27 Thread Xiang Zhang
Xiang Zhang added the comment: Yay, thanks for your work, Martin. -- ___ Python tracker ___ ___

[issue12178] csv writer doesn't escape escapechar

2016-08-27 Thread Skip Montanaro
Skip Montanaro added the comment: The patch looked okay to me, and when applied to the 2.7 source, the new tests pass muster. I'm not going to pretend I know where this patch should be applied. That's for someone else to pronounce. -- ___ Python

[issue12178] csv writer doesn't escape escapechar

2016-08-27 Thread Skip Montanaro
Changes by Skip Montanaro : -- nosy: -skip.montanaro ___ Python tracker ___ ___

[issue27875] Syslogs /usr/sbin/foo as /foo instead of as foo

2016-08-27 Thread SilentGhost
Changes by SilentGhost : -- components: +Extension Modules nosy: +jafo stage: -> needs patch versions: +Python 3.5, Python 3.6 ___ Python tracker

[issue27878] Unicode word boundries

2016-08-27 Thread SilentGhost
SilentGhost added the comment: regex module is not in standard library, on the latest 3.6 branch re module breaks on curly apostrophe just fine. Perhaps, try reporting this issue on the bitbucket tracker? -- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open

[issue25847] CPython not using Visual Studio code analysis!

2016-08-27 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue27878] Unicode word boundries

2016-08-27 Thread mohammad aghanabi
New submission from mohammad aghanabi: According to [UAX #29](http://unicode.org/reports/tr29) - unicode word boundaries (rule WB5a), an apostrophe includes U+0027 ( ' ) APOSTROPHE and U+2019 ( ’ ) RIGHT SINGLE QUOTATION MARK (curly apostrophe). However regex module only implements U+0027 and

[issue27425] Tests fail because of git's newline preferences on Windows

2016-08-27 Thread Emanuel Barry
Emanuel Barry added the comment: Martin: Indeed, seems like it's backwards for some reason. I'm not sure what happened when I regenerated the index; I removed the patches now anyway. I think the .gitattributes patch would be fine to go on its own. It's my understanding that line endings don't

[issue27425] Tests fail because of git's newline preferences on Windows

2016-08-27 Thread Emanuel Barry
Changes by Emanuel Barry : Removed file: https://bugs.python.org/file44220/fix_newlines_1.patch ___ Python tracker ___

[issue27425] Tests fail because of git's newline preferences on Windows

2016-08-27 Thread Emanuel Barry
Changes by Emanuel Barry : Removed file: https://bugs.python.org/file44225/fix_newlines_2.patch ___ Python tracker ___

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-27 Thread John Hagen
New submission from John Hagen: Many programming languages allow the developer to define a enum without specifying values when there would be no significance to those values. Adding some kind of support in the stdlib itself was rejected due to the high degree of magic that would be needed:

[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-08-27 Thread Joseph Shen
Joseph Shen added the comment: thanks for the comment and make python work on Windows better :) I will trace the 3.6 source code. On Sat, Aug 27, 2016 at 8:58 PM Steve Dower wrote: > > Steve Dower added the comment: > > I don't entirely agree with the analysis or

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-08-27 Thread Demur Rumed
Demur Rumed added the comment: I don't think lack of precedence is a reason to say new opcodes are new features. More that generally new opcodes are created for new features -- ___ Python tracker

[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-08-27 Thread Steve Dower
Steve Dower added the comment: I don't entirely agree with the analysis or suggestions here, but I do intend to change this for 3.6 so I'll assign myself. At the very least, we won't fall back on totally relative paths - we'll make them absolute from the program directory. --

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-08-27 Thread Antti Haapala
Antti Haapala added the comment: So does this (new opcode) count as a new feature? It would be great to give f'' strings a flying start, saying that not only they're cool, they're also faster than anything that you've used before. Here some more mini-benchmarks with serhiy's patch2 applied,

[issue27858] Add identity function to functools

2016-08-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: rejected -> duplicate stage: -> resolved superseder: -> add identity function ___ Python tracker

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2016-08-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Even list suffers from this bug if slicing step is not 1. class X: def __index__(self): del a[:] return 1 a = [0] a[:X():2] -- ___ Python tracker

[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-08-27 Thread Joseph Shen
Joseph Shen added the comment: I don't know how to reopen this issue, please make some comments for what I added just now, thanks. -- status: closed -> open ___ Python tracker

[issue27863] multiple issues in _elementtree module

2016-08-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +various issues due to misuse of PySlice_GetIndicesEx ___ Python tracker ___

[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-08-27 Thread Joseph Shen
Joseph Shen added the comment: Yea, thanks for review, I knew the pyven. But the behavior right now is really what I think unnecessary complicated and confusing. What I think, we all knew the DLLs is used for python keep the *.pyd (actually just dll), so by default, why we want this directory

[issue27876] Add SSLContext.set_version_range(minver, maxver=None)

2016-08-27 Thread Christian Heimes
New submission from Christian Heimes: OpenSSL 1.1 has deprecated all version specific TLS/SSL methods in favor of auto-negotiation (formerly known as SSLv23). It also introduced two macros to set the minimal and maximum TLS version with SSL_CTX_set_min_proto_version() and

[issue27861] sqlite3 type confusion and multiple frees

2016-08-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agreed, there are two unrelated bugs. It would be better to discuss separate patches in separate issues. -- ___ Python tracker

[issue27506] make bytes/bytearray translate's delete a keyword argument

2016-08-27 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue27875] Syslogs /usr/sbin/foo as /foo instead of as foo

2016-08-27 Thread Fabian Pietsch
New submission from Fabian Pietsch: When calling syslog.syslog() without calling syslog.openlog() before, openlog() gets called with no arguments. Documentation says: "The optional ident keyword argument is a string which is prepended to every message, and defaults to sys.argv[0] with leading

[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-08-27 Thread Eryk Sun
Eryk Sun added the comment: Windows Python determines sys.prefix (i.e. the location of the standard library, \lib) via either the PYTHONHOME environment variable or by searching for the landmark "lib/os.py", starting in the application directory and reducing back to the root directory [1].

[issue27506] make bytes/bytearray translate's delete a keyword argument

2016-08-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ab1b54245d5 by Martin Panter in branch 'default': Issue #27506: Support bytes/bytearray.translate() delete as keyword argument https://hg.python.org/cpython/rev/6ab1b54245d5 -- nosy: +python-dev ___

[issue26040] Improve coverage and rigour of test.test_math

2016-08-27 Thread Jeff Allen
Jeff Allen added the comment: Mark: Thanks for validating the additional cases so carefully. If you still want to apply it in stages then I suppose the change to the comparison logic could go first (untested idea), although that's also where I could most easily have made a mistake.

[issue25825] AIX shared library extension modules installation broken

2016-08-27 Thread Martin Panter
Martin Panter added the comment: Okay, the second patch is committed to 3.5+. Is everything working now (on 2.7, 3.5, 3.6), or is there more to do? -- ___ Python tracker

[issue19884] Importing readline produces erroneous output

2016-08-27 Thread Martin Panter
Martin Panter added the comment: I committed my patch in full, so hopefully the Gnu Readline situation on OS X is also improved. Original fixes went into 3.4, but my patch only went into 3.5+. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions:

[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-08-27 Thread Joseph Shen
Joseph Shen added the comment: second snapshot -- Added file: https://bugs.python.org/file44239/2016-08-27_15-09-45.png ___ Python tracker ___

[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-08-27 Thread Joseph Shen
New submission from Joseph Shen: Found a inconsistent sys.path result when python packed with it's library with zip package. A. when NOT use zip package sys.path is base the python.exe's absolute path, result is 1. ABS_PATH\pythonXX.zip 2. ABS_PATH\DLLs 3.

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-08-27 Thread Martin Panter
Martin Panter added the comment: The documentation is in RST format in the Doc/ directory. For basic stuff, you can just copy the syntax from existing text, or see e.g. for more hints. For this change, I think we need

[issue27827] pathlib is_reserved fails for some reserved paths on Windows

2016-08-27 Thread Eryk Sun
Eryk Sun added the comment: Also, "CONIN$" and "CONOUT$" need to be added to the list of reserved names. Prior to Windows 8 these two names are reserved only for the current directory, which for the most part also applies to "CON". For Windows 8+, the redesign to use a real console device