[issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace

2017-01-10 Thread Elvis Stansvik
Changes by Elvis Stansvik : -- keywords: +patch Added file: http://bugs.python.org/file46241/fix-install-lib-with-inplace-ext.patch ___ Python tracker

[issue1294959] Problems with /usr/lib64 builds.

2017-01-10 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace

2017-01-10 Thread Elvis Stansvik
Changes by Elvis Stansvik : -- versions: +Python 3.7 ___ Python tracker ___ ___

[issue29223] Settable defaulting to decimal instead of float

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: You are not the first one to propose the idea. 2012: "make decimal the default non-integer instead of float?" https://mail.python.org/pipermail/python-ideas/2012-September/016250.html 2014: "Python Numbers as Human Concept Decimal System"

[issue29223] Settable defaulting to decimal instead of float

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: Jim is right, I close the bug. The *bug* tracker is not the best place to propose ideas: please use the python-ideas mailing list ;-) -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue28870] Reduce stack consumption of PyObject_CallFunctionObjArgs() and like

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: no_small_stack-2.patch has a very bad impact on performances: haypo@speed-python$ python3 -m perf compare_to 2017-01-04_12-02-default-ee1390c9b585.json no_small_stack-2_refee1390c9b585.json -G --min-speed=5 Slower (59): - telco: 15.7 ms +- 0.5 ms -> 23.4 ms

[issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace

2017-01-10 Thread Elvis Stansvik
New submission from Elvis Stansvik: I noticed the following strange behavior: estan@newton:~/testdist$ find . ./testext.c ./setup.cfg ./setup.py estan@newton:~/testdist$ cat setup.py from distutils.core import setup, Extension setup( name='testdist', version='1.0.0', ext_modules =

[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
New submission from Simon Grantham: Placing the word "coding:" in a hash tag comment in a file causes a syntax error. Eg: ~ $ cat tst.py # coding: Wow! How odd! ~ $ python tst.py File "tst.py", line 2 SyntaxError: encoding problem: Wow ~ $ -- components: Interpreter Core

[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
Changes by Simon Grantham : -- type: -> compile error ___ Python tracker ___ ___

[issue29223] Settable defaulting to decimal instead of float

2017-01-10 Thread George Fischhof
New submission from George Fischhof: Hi There, Settable defaulting to decimal instead of float It would be good to be able to use decimal automatically instead of float if there is a setting. For example an environment variable or a flag file. Where and when accuracy is more important than

[issue29223] Settable defaulting to decimal instead of float

2017-01-10 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: This issue (and your other issue29223) would probably be a better for the python-ideas mailing list rather than the bug tracker. See the FAQ in the Developer Guide for Python https://docs.python.org/devguide/faq.html#suggesting-changes Both issues

[issue29223] Settable defaulting to decimal instead of float

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: > This issue (and your other issue29223) ... I guess that you mean issue #29224 "OS related file operations (copy, move, delete, rename...) should be placed into one module". -- ___ Python tracker

[issue29208] BlockingIOError during system startup

2017-01-10 Thread Dustin Spicuzza
Dustin Spicuzza added the comment: I'm able to confirm that the patch does indeed fix the problem. Thanks everyone! -- ___ Python tracker ___

[issue28870] Reduce stack consumption of PyObject_CallFunctionObjArgs() and like

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: Stack used by each C function of test_python_call. 3.4: (a) method_call: 64 (b) PyObject_Call: 48 (b) function_call: 160 (b) PyEval_EvalCodeEx: 176 (c) PyEval_EvalFrameEx: 256 (c) call_function: 0 (c) do_call: 0 (c) PyObject_Call: 48 (d) slot_tp_call: 64

[issue29226] Comment generates syntax error

2017-01-10 Thread Ammar Askar
Ammar Askar added the comment: This is because the "coding:" in a comment is a special syntax used to define the encoding of the file. The only documentation I could find for it on the official docs is a brief mention here: https://docs.python.org/3/howto/unicode.html#the-string-type More

[issue28885] Python 3.5.2 strange-behavior issues (from PyPy)

2017-01-10 Thread Armin Rigo
Armin Rigo added the comment: > Armin, it would help if you report all cases as separate issues. I asked on python-dev before creating these three issues, and got the opposite answer. If you decide it was a bad idea after all, I will open separate issues in the future. --

[issue22107] tempfile module misinterprets access denied error on Windows

2017-01-10 Thread Rocco Matano
Rocco Matano added the comment: I just experienced the described problem using Python 3.6.0 (Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32), but i do not understand the current status of this issue: On the one hand it is marked as 'open', which

[issue29226] encoding comment generates a SyntaxError

2017-01-10 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: If you use an encoding declaration the encoding must be recognized by Python. This is clearly stated in the documentation: https://docs.python.org/3/reference/lexical_analysis.html#encoding-declarations -- nosy: +Jim Fasarakis-Hilliard title:

[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
Simon Grantham added the comment: Thanks Ammar. Curiously, the comment I had put in my code was a note regarding usage and actually didn't contain the word "coding:" but the word "encoding:". # curl -v --header "Transfer-Encoding: chunked" -d @somefile.txt "http://localhost:80/; Perhaps

[issue22107] tempfile module misinterprets access denied error on Windows

2017-01-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Library (Lib) resolution: fixed -> stage: resolved -> versions: +Python 3.7 -Python 3.4 ___ Python tracker

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch makes mock sentinels supporting pickling and copying. This allows passing them in multiprocessing. I'm not sure whether this is a bug fix or a new feature. The patch works only with 3.5+. Older versions need more complex solution. --

[issue29232] Quiet Install

2017-01-10 Thread Earl Maier
New submission from Earl Maier: On quiet and passive Installs of Python 3.6 and 3.5 in windows 7 and 10 (x64), Python successfully installs but does not appear in programs and features. It would also appear that the append path and python launcher switches do not work for quiet install. If

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, I had wrote this patch for issue29229 and didn't read the above discussion. Copying and pickling preserve identity of some objects: functions, classes, enums, builtin singletons (None, False, True, ...). It was not obvious to me that this shouldn't

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

2017-01-10 Thread Christian Heimes
Christian Heimes added the comment: Victor, you are correct. That was exactly my point. The most secure way is to tighten security and set umask to 0o077. It's basically a white list or locked down approach. With umask 0o077 all subsequent files, directories and other resources will be

[issue29219] TracebackException(capture_locals=True) may fail with RecursionError

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch fixes an infinite recursion in a repr of uninitialized CDLL instance. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file46246/ctypes_cdll_uninitialized_repr.patch

[issue29113] modulefinder no longer finds all required modules for Python itself, due to use of __import__ in sysconfig

2017-01-10 Thread Matthias Klose
Matthias Klose added the comment: the idea is that we load a different _sysconfigdata module when we are cross building packages. So we don't know the name in advance. An ugly alternative would be a big if statement with conditional imports for all known cross build targets. Not sure if

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

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: I don't understand the problem with umask(). It's standard and affect all code even C extension calling directly or indirectly open(). It is more secure to use umask() than setting mode on a few Python open() calls no? For example, Python creates .pyc files.

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-10 Thread Davin Potts
Davin Potts added the comment: Serhiy: The above discussion seemed to converge on the perspective that object identity should not survive pickling and that the point of a sentinel is object identity. While your proposed patch may mechanically work, I believe it is in conflict with the

[issue29230] Segfault in sqlite3

2017-01-10 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. From a quick look at the macOS crash report, I'm guessing you are running with the Apple-supplied system Python 2.7 but with a virtualenv. In any case, the Apple-supplied libsqlite3 is in use and there are previously reported problems

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: Oh wow! I'm impressed that Python 3 is better at each release! On 2 tests, Python 3.7 is faster than Python 2.7, but on test_python_iterator Python 3.7 is still slower. It seems like this specific test became much slower (+19%) on Python 3.4 compared to 2.7.

[issue29231] Broken MSIs in Python 3.5+

2017-01-10 Thread KeyWeeUsr
New submission from KeyWeeUsr: In versions _lower_ than 3.5.0 there was a `.MSI` installer for Windows, which had a really nice hidden option. That option looked like this: msiexec.exe /a "file.msi" /qb /L*V "file.log" ALLUSERS=0 TARGETDIR="target" CURRENTDIRECTORY="%cd%" which

[issue29231] Broken MSIs in Python 3.5+

2017-01-10 Thread KeyWeeUsr
Changes by KeyWeeUsr : -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue29233] call_method(): call _PyObject_FastCall() rather than _PyObject_VaCallFunctionObjArgs()

2017-01-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset b9404639a18c by Victor Stinner in branch 'default': call_method() now uses _PyObject_FastCall() https://hg.python.org/cpython/rev/b9404639a18c -- nosy: +python-dev ___ Python tracker

[issue29237] Create enum for pstats sorting options

2017-01-10 Thread Ethan Furman
Ethan Furman added the comment: To keep backwards compatibility and lesson the burden on new code, simply make the value of the duplicate names be the same: cumulative = 'cumulative' cumtime = 'cumulative' This way the standard name is 'cumulative' but 'cumtime' works as well.

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: I plan to run a benchmark when all my patches to reduce the stack consumption will be ready. I'm still trying all the various options to reduce the stack consumption. I'm trying to avoid hacks and reduce the number of changes. I'm already better than Python

[issue29233] call_method(): call _PyObject_FastCall() rather than _PyObject_VaCallFunctionObjArgs()

2017-01-10 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue29233] call_method(): call _PyObject_FastCall() rather than _PyObject_VaCallFunctionObjArgs()

2017-01-10 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Interpreter Core type: -> performance versions: +Python 3.7 ___ Python tracker ___

[issue2771] Test issue

2017-01-10 Thread Brett Cannon
Changes by Brett Cannon : -- pull_requests: +14 ___ Python tracker ___ ___ Python-bugs-list

[issue29229] incompatible: unittest.mock.sentinel and multiprocessing.Pool.map()

2017-01-10 Thread Jason Curtis
Jason Curtis added the comment: sounds right; closing as a duplicate of issue20804 -- resolution: -> duplicate status: open -> closed ___ Python tracker

[issue29236] 'an ASCII string of one or more PEM-encoded certificates' needs to be unicode

2017-01-10 Thread Maciej Piechorka
New submission from Maciej Piechorka: In documentation it is specified that cadata parameter in load_verify_locations is 'an ASCII string of one or more PEM-encoded certificates'. However the code is actually determining it based on PyUnicode_Check function so the 'ASCII string' actually

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-10 Thread STINNER Victor
New submission from STINNER Victor: While working on the issue #28870, I noticed that _PyStack_AsTuple() is inlined. Compared to Python 3.5 which didn't have this function, it seems like _PyStack_AsTuple() is responsible for an increase of the stack consumption. -- components:

[issue2771] Test issue

2017-01-10 Thread Brett Cannon
Changes by Brett Cannon : -- pull_requests: +11 ___ Python tracker ___ ___ Python-bugs-list

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8481c379e2da by Victor Stinner in branch 'default': Inline call_function() https://hg.python.org/cpython/rev/8481c379e2da -- nosy: +python-dev ___ Python tracker

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6478e6d0476f by Victor Stinner in branch 'default': Disable _PyStack_AsTuple() inlining https://hg.python.org/cpython/rev/6478e6d0476f -- nosy: +python-dev ___ Python tracker

[issue28870] Reduce stack consumption of PyObject_CallFunctionObjArgs() and like

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: Result of attached bench_recursion-2.py comparing before/after the 3 changes reducing the stack consumption: test_python_call: Median +- std dev: [a30cdf366c02] 512 us +- 12 us -> [6478e6d0476f] 467 us +- 21 us: 1.10x faster (-9%) test_python_getitem: Median

[issue29235] Allow profile/cProfile to be used as context managers

2017-01-10 Thread Thane Brimhall
New submission from Thane Brimhall: The `enable` and `disable` methods on the profilers fit the description of a context manager very well. The following code: pr = cProfile.Profile() pr.enable() # ... do something ... pr.disable() pr.print_stats() Would turn into

[issue29233] call_method(): call _PyObject_FastCall() rather than _PyObject_VaCallFunctionObjArgs()

2017-01-10 Thread STINNER Victor
New submission from STINNER Victor: Recently, I modified call_method() and call_maybe() of Objects/typeobject.c to avoid the creation of a temporary tuple: replace Py_VaBuildValue()+PyObject_Call() with the new _PyObject_VaCallFunctionObjArgs(). But while working on the issue #28870, I

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: noinline_msvs.patch: implement _Py_NO_INLINE for Microsoft Visual Studio #elif defined(_MSC_VER) # define _Py_NO_INLINE __declspec(noinline) I didn't push this change because I don't have access to a Windows VM yet. @Steve: Does noinline_msvs.patch look good

[issue2771] Test issue

2017-01-10 Thread Brett Cannon
Changes by Brett Cannon : -- pull_requests: +13 ___ Python tracker ___ ___ Python-bugs-list

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I didn't provide results with less_stack.patch because they were almost the same, just 1-3% faster. That might be just a random noise or compiler artifact. But may be an effect of inlining call_function(). Could you run full Python benchmarks? Decreasing

[issue28870] Reduce stack consumption of PyObject_CallFunctionObjArgs() and like

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: I pushed 3 changes: * rev b9404639a18c: Issue #29233: call_method() now uses _PyObject_FastCall() * rev 8481c379e2da: Issue #29227: inline call_function() * rev 6478e6d0476f: Issue #29234: disable _PyStack_AsTuple() inlining Before (rev a30cdf366c02):

[issue2771] Test issue

2017-01-10 Thread Brett Cannon
Changes by Brett Cannon : -- pull_requests: +12 ___ Python tracker ___ ___ Python-bugs-list

[issue29233] call_method(): call _PyObject_FastCall() rather than _PyObject_VaCallFunctionObjArgs()

2017-01-10 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue28839] _PyFunction_FastCallDict(): replace PyTuple_New() with PyMem_Malloc()

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: Ok, I give up on that one. I don't think that it's worth it. -- resolution: -> rejected status: open -> closed ___ Python tracker

[issue29237] Create enum for pstats sorting options

2017-01-10 Thread Thane Brimhall
New submission from Thane Brimhall: When using the cProfile and pstats modules, I often forget which string keys are available for sorting. It would be nice to add an enum for these so a user could have their linter and IDE check that value pre-runtime. By subclassing both `str` and `Enum`

[issue29238] Add more kwargs to cProfile's print_stats

2017-01-10 Thread Thane Brimhall
New submission from Thane Brimhall: Using the pstats class to print off profiler results is helpful when you want to filter, order, and limit the number of returned lines. I'd rather see the most commonly-used subset of pstats functionality included in the profiler's print_stats

[issue28870] Reduce stack consumption of PyObject_CallFunctionObjArgs() and like

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Awesome! You are great Victor! -- ___ Python tracker ___ ___

[issue28231] zipfile does not support pathlib

2017-01-10 Thread Jeremy Freeman
Jeremy Freeman added the comment: I have reviewed the code and docs for the public API that should take a pathlib.Path object: - zipfile.is_zipfile(filename) - filename - zipfile.ZipFile(file) - file - ZipFile.extract(member, path=None) - path - ZipFile.extractall(path=None) - path -

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2017-01-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Not sure if this is related, but I have a simple Cache class that gets a recursion error at a depth of about 166 calls (a sixth of the expected 1000). I suspect that the reason is the many of the steps individually add to the recursion depth causing the

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2017-01-10 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file46251/cache_example.py ___ Python tracker ___

[issue29125] Shell injection via TIX_LIBRARY when using tkinter.tix

2017-01-10 Thread Larry Hastings
Larry Hastings added the comment: Well, clearly I'm not qualified to review the patch. Could someone please review it? I want to cherry-pick the fix for this issue for 3.5.3 final, which I tag in about four days. -- ___ Python tracker

[issue29220] Python 3.6 regression/change using logging.addLevelName() to clear a name

2017-01-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 99ad6e871459 by Vinay Sajip in branch 'default': Closes #29220: Fixed regression in logging.getLevelName(). https://hg.python.org/cpython/rev/99ad6e871459 -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed

[issue29215] pyport.h uses non C90-style comment

2017-01-10 Thread Xiang Zhang
Xiang Zhang added the comment: About the comment style confliction, I opened an issue on Github and assigned to you Benjamin. https://github.com/python/peps/issues/176 -- ___ Python tracker

[issue27603] Migrate IDLE context menu items to shell extension

2017-01-10 Thread Vedran Čačić
Vedran Čačić added the comment: Even worse: I had both 3.5 and 3.6 installed, and then uninstalled 3.5 when 3.6 was final (I suppose I'm not the only one). Now I have the nested menu with only one item, Open with IDLE 3.6. :-\ -- nosy: +veky ___

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-10 Thread Steve Dower
Steve Dower added the comment: I'm fairly sure dllexport implies noinline, and it certainly does for the exported function (but maybe PGO will inline it within the module? hard to know). In any case, I agree with keeping it private as it's purely about optimization. Do you have a test that

[issue29238] Add more kwargs to cProfile's print_stats

2017-01-10 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___

[issue29235] Allow profile/cProfile to be used as context managers

2017-01-10 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman stage: -> needs patch ___ Python tracker ___

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2017-01-10 Thread Anthony Scopatz
Anthony Scopatz added the comment: It certainly seems related. Attached is an image that displays the scaling of the cache example. The full notebook that generated this image is at [1]. The notebook shows that it does seem to converge towards a value of 1/6th. 1.

[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2017-01-10 Thread Thomas Nyberg
Thomas Nyberg added the comment: I'm attaching a small patch (against the current hg master branch) that I believe solves the problem, however, I think it was quite hacky. Here is a walk-through of the logic. 1) If '--system-site-packages' is requested, then it is overrided initially in the

[issue29006] 2.7.13 _sqlite more prone to "database table is locked"

2017-01-10 Thread Larry Hastings
Larry Hastings added the comment: Ping. Hoping to resolve this in time for 3.5.3, which I tag in about four days. -- ___ Python tracker ___

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is a stack usage effect of disabling inlining _PyStack_AsTuple()? Does it impact performance? Should inlining _PyStack_AsDict() be disabled too? Is it worth to extract slow paths of _PyObject_FastCallDict() and _PyObject_FastCallKeywords() into

[issue29233] call_method(): call _PyObject_FastCall() rather than _PyObject_VaCallFunctionObjArgs()

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: Full commit message: changeset: 106081:b9404639a18c tag: tip user:Victor Stinner date:Wed Jan 11 00:07:40 2017 +0100 files: Include/abstract.h Objects/abstract.c Objects/typeobject.c description:

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

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

[issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace

2017-01-10 Thread Elvis Stansvik
Elvis Stansvik added the comment: Not really related to this fix, but a colleague also prudently pointed out that perhaps an assert file[:prefix_len] == build_dir + os.sep before the outputs.append(os.path.join(self.install_dir, file[prefix_len:])) in the helper for pure modules

[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
Simon Grantham added the comment: My googling skills are a bit amiss too. I searched for some kind of encoding pragma before reporting. Perhaps just a footnote in the basic documentation of a python comment is the easiest solution. Simon On 1/10/2017 12:58 PM, Ammar Askar wrote: > Ammar

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread STINNER Victor
New submission from STINNER Victor: Attached patch reduce C stack consumption in function calls. It's the follow-up of the issue #28870. Reference (rev a30cdf366c02): test_python_call: 7175 calls before crash, stack: 1168 bytes/call test_python_getitem: 6235 calls before crash, stack: 1344

[issue29228] sqlite3 OperationalError on changing into WAL transaction mode

2017-01-10 Thread yadayada
New submission from yadayada: Running sqlite3.connect('foo.db').execute("PRAGMA journal_mode = WAL") will throw sqlite3.OperationalError: cannot change into wal mode from within a transaction on Python 3.6.0, but not with older versions. -- messages: 285141 nosy: yadayada priority:

[issue28870] Reduce stack consumption of PyObject_CallFunctionObjArgs() and like

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: I created the issue #29227 "Reduce C stack consumption in function calls" which contains a first simple patch with a significant effect on the C stack. -- ___ Python tracker

[issue28870] Reduce stack consumption of PyObject_CallFunctionObjArgs() and like

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: It seems like subfunc.patch approach using the "no inline" attribute helps. -- ___ Python tracker ___

[issue29226] Comment generates syntax error

2017-01-10 Thread Ammar Askar
Ammar Askar added the comment: Thanks for the link Jim, looks like my googling skills are a bit amiss. I believe the reason the matching allows "encoding" is because a recommended format in the documentation is: # vim:fileencoding= I think changing the behavior of the matching to be stricter

[issue28231] zipfile does not support pathlib

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I am not sure what "Shouldn't the ZipFile.filename attribute be converted to > str?" means, can you elaborate? If you pass a Path object to ZipFile constructor, should the filename attribute be a Path object or a str? --

[issue29220] Python 3.6 regression/change using logging.addLevelName() to clear a name

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you provide a working example of using your trick Mark? I think that even with empty name the output contains extra separators. -- nosy: +serhiy.storchaka ___ Python tracker

[issue29220] Python 3.6 regression/change using logging.addLevelName() to clear a name

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As for the patch itself, I would add an indentation for the second "if": result = _levelToName.get(level) if result is None: result = _nameToLevel.get(level) if result is None: result = "Level %s" % level return result

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

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: > @haypo, suppose, one thread wants file with permissions A, and other thread > wants permissions B. If they will "set" them through umask(), race condition > may occur. Ok, let's say thta you want file "x" with permission A=0o777 and file "y" with

[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2017-01-10 Thread Thomas Nyberg
Thomas Nyberg added the comment: Now that I look over this thread again, I realize that my patch ended up basically evolving to being extremely similar to Mark Haase's. The only thing that I don't understand though is that he says that his shebangs are somehow messed up. For me the shebangs

[issue29125] Shell injection via TIX_LIBRARY when using tkinter.tix

2017-01-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +terry.reedy, zach.ware ___ Python tracker ___

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

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you needs non-default permission for particular file, you can use one of available ways mentioned above. I think this issue can be closed. The original issues are resolved: 1. os.open() (corresponding to syscall open()) allows this. 2. There are other

[issue29224] OS related file operations (copy, move, delete, rename...) should be placed into one module

2017-01-10 Thread Eryk Sun
Changes by Eryk Sun : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list

[issue1294959] Problems with /usr/lib64 builds.

2017-01-10 Thread jan matejek
jan matejek added the comment: at this again, when porting SUSE patches to 3.6.0 :) ( :( ) Last time there was a discussion, Barry suggested using sysconfig variables to find the proper libdir. Trouble is, to fill out the variables, sysconfig itself uses two sources: a) compiled-in

[issue29224] OS related file operations (copy, move, delete, rename...) should be placed into one module

2017-01-10 Thread George Fischhof
New submission from George Fischhof: Hi There, OS related file operations (copy, move, delete, rename...) should be placed into one module... As it quite confusing that they are in two moduls (os and shutil). I have read that one is higher level than other, but actually to use them I have

[issue28870] Reduce stack consumption of PyObject_CallFunctionObjArgs() and like

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thus Python 3.6 stack usage is about 20% larger than Python 3.5 and about 40% larger than Python 3.4. This is significant. :-( no_small_stack-2.patch decreases it only by 6% (with possible performance loss). --

[issue29224] OS related file operations (copy, move, delete, rename...) should be placed into one module

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: You can design your own "oshutil" module which combines both modules. They are technical reasons to have two separated modules. -- nosy: +haypo ___ Python tracker

[issue29224] OS related file operations (copy, move, delete, rename...) should be placed into one module

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: As Jim Fasarakis-Hilliard wrote in msg285117, the *bug* tracker is not the best place to propose changes, so I close this issue. -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue28870] Reduce stack consumption of PyObject_CallFunctionObjArgs() and like

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: > no_small_stack-2.patch decreases it only by 6% (with possible performance > loss). Yeah, if we want to come back to Python 3.4 efficiency, we need to find the other functions which now uses more stack memory ;-) The discussed "small stack" buffers are only

[issue29228] sqlite3 OperationalError on changing into WAL transaction mode

2017-01-10 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. This is a duplicate of issue 28518. -- components: +Library (Lib) nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> execute("begin immediate") throwing OperationalError type:

[issue28885] Python 3.5.2 strange-behavior issues (from PyPy)

2017-01-10 Thread Brett Cannon
Brett Cannon added the comment: I think if you're up for doing individual issues, Armin, that's preferred. But if it's too much work we will take it all in this single issue instead of risking the loss of the information. And if you want to use this issue as a meta one to track everything you

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

2017-01-10 Thread Brett Cannon
Brett Cannon added the comment: The point Serhiy is trying to make is that not everyone needs or cares about setting specific file permissions. Python's built-in open() function has not supported this for 26 years and so there's obviously not that much of a need if this has not consistently

[issue29113] modulefinder no longer finds all required modules for Python itself, due to use of __import__ in sysconfig

2017-01-10 Thread Brett Cannon
Brett Cannon added the comment: The limitation is unavoidable as modulefinder inspects bytecode for its inferencing, so any code that calls __import__() or importlib.import_module() will simply not work. So unless sysconfig can be updated reasonably back to a statically defined import this is

[issue29229] incompatible: unittest.mock.sentinel and multiprocessing.Pool.map()

2017-01-10 Thread Jason Curtis
New submission from Jason Curtis: When a sentinel object from unittest.mock.sentinel is passed through a multiprocessing.Pool.map, I expect it to still be comparable. As a user, I'd like to be able to write a unit test using sentinels on my unparallelized code, and then see that the test

[issue29227] Reduce C stack consumption in function calls

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: $ ./python -m perf timeit -s "from bench_recursion import test_python_call as test" -- "test(1000)" Python 2.7: 5.10 ms +- 0.37 ms Python 3.4: 4.38 ms +- 0.28 ms Python 3.5: 4.19 ms +- 0.26 ms Python 3.6: 3.93 ms +- 0.32 ms Python 3.7: 3.26 ms +- 0.27 ms

  1   2   >