[issue28855] Compiler warnings in _PyObject_CallArg1()

2016-12-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: I also think forcing callers to cast is fine. Most of our APIs require PyObject *. -- ___ Python tracker ___

[issue23507] Tuple creation is too slow

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: haypo: "status: open -> closed" Oops, it's a mistake, sorry. I only wanted to ask the question, not to close the issue. Serhiy Storchaka: "No, I'm referring to the crashing. The code that worked before your changes now are crashing." Sorry, I didn't notice

[issue28858] Fastcall uses more C stack

2016-12-01 Thread STINNER Victor
New submission from STINNER Victor: Serhiy Storchaka reported that Python 3.6 crashs earlier than Python 3.5 on calling json.dumps() when sys.setrecursionlimit() is increased. I tested the script he wrote. Results on Python built in release mode: Python 3.7: ... 58100 116204 Segmentation

[issue28740] Add sys.getandroidapilevel()

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: @Xavier: Cool, thanks for checking :-) I don't have access to an Android platform yet. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue28740] Add sys.getandroidapilevel()

2016-12-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: Here is the output of getandroidapilevel(), a verbose run of test_sys and a run of the test suite on the Android x86 emulator API 21. All the results are as expected, the failed tests are the usual ones, BTW all of the failed tests have either a patch ready

[issue28856] %b format for bytes does not support objects that follow the buffer protocol

2016-12-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +ethan.furman, serhiy.storchaka ___ Python tracker ___

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Will commit to 3.5-3.7 after releasing 3.6.0. -- versions: -Python 2.7 ___ Python tracker ___

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2016-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset a37cc3d926ec by Serhiy Storchaka in branch '2.7': Issue #5322: Fixed setting __new__ to a PyCFunction inside Python code. https://hg.python.org/cpython/rev/a37cc3d926ec -- nosy: +python-dev ___ Python

[issue28857] SyncManager and Main Process fail to communicate after reboot or stoping with Ctrl - C

2016-12-01 Thread Nagarjuna Arigapudi
New submission from Nagarjuna Arigapudi: "SyncManager" and "Main Process" and main process look at different directories and fail to communicate, causing shutdown of all process, immediately after start of program. This behavior is seen in both 2.7 and 3.5. The logging of 2.7 is more clear,

[issue28855] Compiler warnings in _PyObject_CallArg1()

2016-12-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: (Sorry, I noticed and landed a fix before completely reading the issue.) -- ___ Python tracker ___

[issue28855] Compiler warnings in _PyObject_CallArg1()

2016-12-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: It doesn't seem like the question is whether to use inline functions but whether to force all callers to cast. Your original code would work if you added all the casts in your static_inline.patch patch. -- ___

[issue26861] shutil.copyfile() doesn't close the opened files

2016-12-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue28855] Compiler warnings in _PyObject_CallArg1()

2016-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 96245d4af0ca by Benjamin Peterson in branch 'default': fix _PyObject_CallArg1 compiler warnings (closes #28855) https://hg.python.org/cpython/rev/96245d4af0ca -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open ->

[issue28847] dumbdbm should not commit if in read mode

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The first part is committed in 2.7. I'll commit it in 3.5-3.7 after releasing 3.6.0. -- versions: -Python 2.7 ___ Python tracker

[issue28847] dumbdbm should not commit if in read mode

2016-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0516f54491cb by Serhiy Storchaka in branch '2.7': Issue #28847: dubmdbm no longer writes the index file in when it is not https://hg.python.org/cpython/rev/0516f54491cb -- nosy: +python-dev ___ Python

[issue28847] dumbdbm should not commit if in read mode

2016-12-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue23507] Tuple creation is too slow

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, I'm referring to the crashing. The code that worked before your changes now are crashing. Please revert your changes and find a way to optimize a function calling without increasing stack consumption. -- resolution: fixed -> status: closed ->

[issue23224] LZMADecompressor object is only initialized in __init__

2016-12-01 Thread Aaron Hill
Aaron Hill added the comment: I've upload a patch which should address the issue in both the lzma and bz2 modules. -- keywords: +patch nosy: +Aaron1011 Added file: http://bugs.python.org/file45730/fix-lzma-bz2-segfaults.patch ___ Python tracker

[issue28856] %b format for bytes does not support objects that follow the buffer protocol

2016-12-01 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: Python 3.7.0a0 (default:be70d64bbf88, Dec 1 2016, 21:21:25) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from array import array >>> a = array('B', [1,

[issue23507] Tuple creation is too slow

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: > I opened a new issue #28852 to track this performance regression. So can I close again this issue? -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue28852] sorted(range(1000)) is slower in Python 3.7 compared to Python 3.5

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: On my laptop, the revision introducing the performance regression is: --- changeset: 101858:5a62d682636e user:Brett Cannon date:Fri Jun 10 14:37:21 2016 -0700 files: Doc/library/os.rst Lib/test/test_os.py Misc/NEWS

[issue28855] Compiler warnings in _PyObject_CallArg1()

2016-12-01 Thread STINNER Victor
New submission from STINNER Victor: _PyObject_CallArg1() is the following macro: --- #define _PyObject_CallArg1(func, arg) \ _PyObject_FastCall((func), &(arg), 1) --- It works well in most cases, but my change 8f258245c391 or change b9c9691c72c5 added compiler warnings, because an argument

[issue28740] Add sys.getandroidapilevel()

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: > The version > 0 check was done because sysconfig.get_config_var() returns 0 > when a variable is found as '#undef' in pyconfig.h. Oh right, I see. In this case, we don't need to have a special case in sys.getandroidapilevel(). I pushed

[issue28740] Add sys.getandroidapilevel()

2016-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset be70d64bbf88 by Victor Stinner in branch 'default': Add sys.getandroidapilevel() https://hg.python.org/cpython/rev/be70d64bbf88 -- nosy: +python-dev ___ Python tracker

[issue2771] Test issue

2016-12-01 Thread Ezio Melotti
Ezio Melotti added the comment: Testing that the link to PR 46 works. Pull Request 46 should also be a link. PullRequest 46 too. Generally you should just use PR46. -- ___ Python tracker

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

2016-12-01 Thread Xavier Combelle
Xavier Combelle added the comment: not an inconsisties but in the eval documentaion nothing specify that the builtins propagate between levels updates -- ___ Python tracker

[issue27779] Sync-up docstrings in C version of the the decimal module

2016-12-01 Thread Lisa Roach
Lisa Roach added the comment: This (should) be the patch with the python docstrings copied over to the C version. -- Added file: http://bugs.python.org/file45728/docstrings.patch ___ Python tracker

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

2016-12-01 Thread Julien Palard
Julien Palard added the comment: So, is there still an inconsistency in the documentation? -- ___ Python tracker ___

[issue28840] IDLE: Document tk's long line display limitation

2016-12-01 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed title: IDLE not handling long lines correctly -> IDLE: Document tk's long line display limitation versions: +Python 2.7, Python 3.6, Python 3.7 ___ Python tracker

[issue28840] IDLE not handling long lines correctly

2016-12-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Currently, the code displayed is the code saved and run when requested. Your idea would require that IDLE keep a 'true' copy of the code separate from the 'display' copy in the Text widget, with the two being kept in sync except in special situations such as

[issue28854] FIPS mode causes dead-lock in ssl module

2016-12-01 Thread Alex Gaynor
Changes by Alex Gaynor : -- nosy: +alex, dstufft, janssen ___ Python tracker ___ ___

[issue28854] FIPS mode causes dead-lock in ssl module

2016-12-01 Thread Christian Heimes
Christian Heimes added the comment: It's a dead lock in OpenSSL. :( if (n == CRYPTO_LOCK_RAND) { fprintf(stderr, "%s%s %i %s:%i\n", (mode & CRYPTO_READ) ? "R" : "W", (mode & CRYPTO_LOCK) ? "L" : "U", n, file, line); } test_random

[issue28740] Add sys.getandroidapilevel()

2016-12-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: > getandroidapilevel-3.patch: Updated version of getandroidapilevel.patch: > replace "runtime" with "build time" in the doc :-) Remove also "version > 0" > check in support/__init__.py. LGTM > About the version > 0 check: would it make sense to add the check

[issue28854] FIPS mode causes dead-lock in ssl module

2016-12-01 Thread Christian Heimes
New submission from Christian Heimes: Python's ssl module is dead-locking when OpenSSL is running in FIPS mode. I first noticed it with pip. The issue is also reproducible with Python's test suite. $ sudo touch /etc/system-fips $ OPENSSL_FORCE_FIPS_MODE=1 ./python -m test.regrtest -v

[issue28852] sorted(range(1000)) is slower in Python 3.7 compared to Python 3.5

2016-12-01 Thread Eric N. Vander Weele
Changes by Eric N. Vander Weele : -- nosy: +ericvw ___ Python tracker ___ ___

[issue28740] Add sys.getandroidapilevel()

2016-12-01 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Sorry for mixing different issues and proposing bad alternatives. My last hope is that someone looks into lemburg's msg281253: "I don't think the sys module is the right place to put the API, since it doesn't have anything to do with the Python system

[issue28853] locals() and free variables

2016-12-01 Thread Marco Buttu
New submission from Marco Buttu: The locals() documentation [1] says that "Free variables are returned by locals() when it is called in function blocks". A free variable inside a function has a global scope, and in fact it is not returned by locals():: >>> x = 33 >>> def foo(): ...

[issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore

2016-12-01 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue28843] asyncio.Task implemented in C loses __traceback__ for exceptions

2016-12-01 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks for reviewing the patch, Inada-san. Closing the issue. -- priority: release blocker -> normal resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue28852] sorted(range(1000)) is slower in Python 3.7 compared to Python 3.5

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: Benchmark: ./python -m perf timeit -s 'x=list(range(1000))' 'sorted(x)' Python 3.6 and 3.7 compared to Python 3.5: $ python3 -m perf compare_to 3.5.json.gz 3.6.json.gz 3.7.json.gz Median +- std dev: [3.5] 18.4 us +- 0.9 us -> [3.6] 20.5 us +- 0.9 us:

[issue28843] asyncio.Task implemented in C loses __traceback__ for exceptions

2016-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset c9f68150cf90 by Yury Selivanov in branch '3.6': Issue #28843: Fix asyncio C Task to handle exceptions __traceback__. https://hg.python.org/cpython/rev/c9f68150cf90 New changeset a21a8943c59e by Yury Selivanov in branch 'default': Merge 3.6 (issue

[issue28851] namedtuples field_names sequence preferred

2016-12-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the reminder. I'll make the doc updates after 3.6 is released (we're trying to not make any changes at all right now). -- resolution: -> later versions: -Python 3.3, Python 3.4, Python 3.5 ___

[issue23507] Tuple creation is too slow

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: "Victor, your changes introduced a regression." I suppose that you are refering to sorted(list) which seems to be slower. Do you have a specific change in mind? As I wrote, it doesn't use a key function, and so should not be impacted by my

[issue28852] sorted(range(1000)) is slower in Python 3.7 compared to Python 3.5

2016-12-01 Thread STINNER Victor
New submission from STINNER Victor: Follow-up of my comment http://bugs.python.org/issue23507#msg282187 : "sorted(list): Median +- std dev: [3.5] 17.5 us +- 1.0 us -> [3.7] 19.7 us +- 1.1 us: 1.12x slower (+12%)" "(...) sorted(list) is slower. I don't know why sorted(list) is slower. It

[issue28740] Add sys.getandroidapilevel()

2016-12-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: @Chi Hsuan Yen And please, let us not waste any more time on lost battles, this suggestion of using sys.implementation has already been rejected at issue 27442 (see msg269748) as you must know since you were involved in the discussion there. --

[issue18971] Use argparse in the profile/cProfile modules

2016-12-01 Thread Wolfgang Maier
Wolfgang Maier added the comment: oops, typing in wrong window. Very sorry. -- nosy: +wolma title: calendar -> Use argparse in the profile/cProfile modules ___ Python tracker

[issue18971] calendar

2016-12-01 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- title: Use argparse in the profile/cProfile modules -> calendar ___ Python tracker

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

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: I pushed th echange b9c9691c72c5 to replace PyObject_CallFunctionObjArgs() with _PyObject_CallNoArg() or _PyObject_CallArg1(). These functions are simpler and don't allocate memory on the C stack. I made similar to PyObject_CallFunctionObjArgs() in Python 3.6

[issue23507] Tuple creation is too slow

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Victor, your changes introduced a regression. -- resolution: fixed -> status: closed -> open ___ Python tracker ___

[issue28740] Add sys.getandroidapilevel()

2016-12-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: > How about renaming sys.implementation._multiarch to > sys.implementation.target_architecture and make it public? > sys.androidapilevel() sounds too specific to me. Please do not hijack this issue. The removal of sys.implementation._multiarch for Android is

[issue23507] Tuple creation is too slow

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "I don't propose to commit this complicated patch, but these results can be used as a guide to the optimization of tuple creating. It is surprising to me that this patch has any effect at all." A new "fast call" calling convention was added to Python

[issue23507] Tuple creation is too slow

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: I rewrote bench_builtins.py to use my new perf module. Python 3.7 is between 1.27x and 1.42x faster than Python 3.6, but sorted(list) is slower. I don't know why sorted(list) is slower. It doesn't use a key function, and so should not be impacted by FASTCALL

[issue23507] Tuple creation is too slow

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is an example that shows increased stack consumption. With old code it counts to 74700, with the patch it counts only to 65400. Please revert your changes. -- Added file: http://bugs.python.org/file45725/stack_overflow.py

[issue10444] A mechanism is needed to override waiting for Python threads to finish

2016-12-01 Thread Emanuel Barry
Emanuel Barry added the comment: Let's just close this. -- nosy: +ebarry resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: It seems like a regression of Python 3.6, probably introduced by myself with add addition of warnings._showwarningmsg() and the source parameter. -- nosy: +haypo, ned.deily priority: normal -> release blocker ___

[issue10444] A mechanism is needed to override waiting for Python threads to finish

2016-12-01 Thread Michael Hughes
Michael Hughes added the comment: Given that this is from five years ago, and I've moved on, I honestly can't say I care too deeply about this. My use case was for handling threads: * created by inexperienced python programmers that don't know about daemons * using third party python scripts

[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2016-12-01 Thread Nick Coghlan
Nick Coghlan added the comment: The concern with using the "generate a private module that can be cached" approach is that it doesn't generalise well - any time you want to micro-optimise a new module that way, you have to add a custom Makefile rule. By contrast, Argument Clinic is a general

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

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem with C stack overflow is not new, but your patch may make it worse (I don't know if it actually make it worse). Py_EnterRecursiveCall() is used for limiting Python stack. It can't prevent C stack overflow. --

[issue28851] namedtuples field_names sequence preferred

2016-12-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___

[issue23507] Tuple creation is too slow

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it would be better to optimize PyObject_CallFunctionObjArgs(). -- ___ Python tracker ___

[issue23507] Tuple creation is too slow

2016-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset b9c9691c72c5 by Victor Stinner in branch 'default': Replace PyObject_CallFunctionObjArgs() with fastcall https://hg.python.org/cpython/rev/b9c9691c72c5 -- nosy: +python-dev ___ Python tracker

[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Argument Clinic is not needed, since we can use Makefile. -- Added file: http://bugs.python.org/file45724/functools-CacheInfo-Makefile.patch ___ Python tracker

[issue28851] namedtuples field_names sequence preferred

2016-12-01 Thread Francesco Grondona
New submission from Francesco Grondona: A change by mhettinger in the doc of Python 2 years ago implicitely stated a sequence of strings as preferred way to provide 'field_names' to a namedtuple: https://github.com/python/cpython/commit/7be6326e09f2062315f995a18ab54baedfd0c0ff Same change

[issue28733] Show how to use mock_open in modules other that __main__

2016-12-01 Thread Michał Bultrowicz
Michał Bultrowicz added the comment: One more update - I had the problem, because I was using monkeypatch.setattr() from Pytest, and assumed that it will work the same as patch(). This assumption turned out to be wrong. -- ___ Python tracker

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

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: > I agree with Josh, PyTuple_New() can be faster than PyMem_Malloc() due to > tuple free list. According to benchmarks, PyTuple_New() is slower than PyMem_Malloc(). It's not surprising for me, using a tuple object requires extra work: * Track and then

[issue27172] Undeprecate inspect.getfullargspec()

2016-12-01 Thread Nick Coghlan
Nick Coghlan added the comment: Updated patch adding What's New and NEWS entries, and addressing Martin's review comments (mostly by accepting his suggestions). I ended up leaving `inspect.getcallargs()` deprecated, and instead added a comment to issue 20438 noting how to achieve the bound

[issue20438] inspect: Deprecate getfullargspec?

2016-12-01 Thread Nick Coghlan
Nick Coghlan added the comment: Noting for the record, as the general way of querying an unbound method for the name of the first parameter and adding it to the bound arguments: def add_instance_arg(callable, bound_args): try: self = callable.__self__ func =

[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2016-12-01 Thread INADA Naoki
INADA Naoki added the comment: (reopen the issue to discuss about using Argument Clinic) -- resolution: rejected -> status: closed -> open ___ Python tracker

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-12-01 Thread fiete
fiete added the comment: Since the only thing I know about the multiprocessing internals is what I just read in the source code trying to debug my imap_unordered call, I'll add the following example, not knowing whether this is already covered by everything you have until now. import

[issue28847] dumbdbm should not commit if in read mode

2016-12-01 Thread Jonathan Ng
Jonathan Ng added the comment: #1 makes sense to be backported. On Thu, Dec 1, 2016 at 8:41 PM, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > This example is too artificial. > > But there is a real issue: opening read-only files in read mode.

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

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "small_stack increases C stack consumption even for calls without keyword arguments. This is serious problem since we can't control stack overflow." This problem is not new and is worked around by Py_EnterRecursiveCall() macro which counts the depth

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

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: > Note: Using a simple printf() in the C code, I noticed that it is not > uncommon that _PyFunction_FastCallDict() is called with an empty dictionary > for keyword arguments. Simplified Python example where _PyFunction_FastCallDict() is called with an empty

[issue28847] dumbdbm should not commit if in read mode

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This example is too artificial. But there is a real issue: opening read-only files in read mode. Currently this causes a PermissionError on closing. For backward compatibility flags 'r' and 'w' are ignored. I.e. opening with 'r' and 'w' creates a file if

[issue28847] dumbdbm should not commit if in read mode

2016-12-01 Thread Jonathan Ng
Jonathan Ng added the comment: I'm not sure how to create an OSError. But perhaps something like this: ''' from dbm import dumb import os db = dumb.open('temp', flag='n') db['foo'] = 'bar' db.close() db = dumb.open('temp', flag='r') print(len(db.keys())) db.close os.rename('temp.dir',

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

2016-12-01 Thread Xavier Combelle
Xavier Combelle added the comment: Hi Julien, You are fully right that it is the builtin module dictionnary which is inserted in eval or exec context. However, if a "__builtins__" entry is passed to eval or exec, this builtin module dictionnary is modified hence the following work: >>>

[issue17490] Improve ast.literal_eval test suite coverage

2016-12-01 Thread Nick Coghlan
Nick Coghlan added the comment: Right, the only reason this is still open is because I thought the extra test cases might be interesting in their own right (just not interesting enough to sit down and apply). -- ___ Python tracker

[issue28755] Rework syntax highlighing in howto/clinic.rst

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > (Ned asked for only release-critical changes to go into 3.6 at the moment.) Except the documentation changes. -- nosy: +serhiy.storchaka ___ Python tracker

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

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: (Oops, I attached the wrong benchmark script. It's now fixed.) -- Added file: http://bugs.python.org/file45721/bench_fastcalldict.py ___ Python tracker

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

2016-12-01 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file45720/bench_fastcalldict.py ___ Python tracker ___

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

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: bench_fastcalldict.py: hardcore microbenchmark on _PyFunction_FastCallDict(). Pass keyword arguments to the tp_init slot of a Python constructor. Result for 1, 5 and 10 keyword arguments: kw1: Median +- std dev: [ref] 329 ns +- 21 ns -> [patch] 306 ns +- 17

[issue17490] Improve ast.literal_eval test suite coverage

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agreed with Raymond, the current version of the code looks clearer. -- nosy: +serhiy.storchaka ___ Python tracker

[issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore

2016-12-01 Thread Michael Enßlin
New submission from Michael Enßlin: This issue was previously addressed and fixed here: http://bugs.python.org/issue1351692 When subclassing PrettyPrinter, overriding the format() method should allow users to define custom pretty-printers. However, for objects whose repr is short, format()

[issue28847] dumbdbm should not commit if in read mode

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you have concrete example when not ignoring an OSError in _update causes an issue? This is needed for writing tests. -- components: +Library (Lib) nosy: +serhiy.storchaka ___ Python tracker

[issue28833] cross compilation of third-party extension modules

2016-12-01 Thread Matthias Klose
Matthias Klose added the comment: > Hum, you still need to provide the native python interpreter > with the _path_ to the -python-config executable that > can be anywhere on the file system No, it's found in the same path. No contradiction. > So I suggest we start with this patch as it works

[issue28849] do not define sys.implementation._multiarch on Android

2016-12-01 Thread Matthias Klose
Matthias Klose added the comment: > An idea is renaming it to something like target_architecture > to make things clearer Yes, that was my intent, and I think it is the right solution. using $(MACHDEP)_$(MULTIARCH) in the sysconfigdata name and probably in other places was not a good idea

[issue28833] cross compilation of third-party extension modules

2016-12-01 Thread Matthias Klose
Matthias Klose added the comment: again, I don't think relying on a specific target path for a cross target is a good idea. and now deciding that the last possibility to use a target id to identify is better is internal doesn't make it better. I'd appreciate if we could sit together where

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

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: Patch version: fix the "if (0)" to use the small stack allocated on the C stack. -- Added file: http://bugs.python.org/file45719/fastcalldict-3.patch ___ Python tracker

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

2016-12-01 Thread Julien Palard
Julien Palard added the comment: “digits which do not form decimal radix forms” > “forming a form” seems a long way of saying very little. The difference seems > a bit vague > I gather that digits not in the Unicode “decimal digit” category are often > (always?) still decimal digits I

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

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree with Josh, PyTuple_New() can be faster than PyMem_Malloc() due to tuple free list. small_stack increases C stack consumption even for calls without keyword arguments. This is serious problem since we can't control stack overflow. --

[issue28840] IDLE not handling long lines correctly

2016-12-01 Thread piotr.sk
piotr.sk added the comment: Thank you for explanation of the background problem. Updating documentation as you mention is a good next step. Thanks as well for the proposed solution of splitting the input string, but as long as it is just a display issue, this is not needed for test strings.

[issue28740] Add sys.getandroidapilevel()

2016-12-01 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: How about renaming sys.implementation._multiarch to sys.implementation.target_architecture and make it public? sys.androidapilevel() sounds too specific to me. -- ___ Python tracker

[issue28849] do not define sys.implementation._multiarch on Android

2016-12-01 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Actually all UNIX-like platforms now have non-empty sys.implementation._multiarch now (msg273875). An idea is renaming it to something like target_architecture to make things clearer. It will be a triplet on all system, whether cross-built or not. --

[issue27286] str object got multiple values for keyword argument

2016-12-01 Thread Shai Berger
Shai Berger added the comment: Following the last comment, and just as clarification for anyone else running into this and thinking like me: The bumped code is not included in v3.5.2, and v3.5.3 hasn't been released yet. Should it be undone? No, because the bump which was encountered by John

[issue11145] '%o' % user-defined instance

2016-12-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28833] cross compilation of third-party extension modules

2016-12-01 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I know. I guess it can be determined without manually specifying but haven't investigated into details. Maybe some patches are necessary. -- ___ Python tracker

[issue28838] Uniformize argument names of "call" functions (C API)

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > * Callable object: callable, o, callable_object => func The original names better describes the argument type in functions like PyObject_Call(). It works not just with functions, but with arbitrary callables. For example it is used with type objects for

[issue11145] '%o' % user-defined instance

2016-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset adb296e4bcaa by Serhiy Storchaka in branch '2.7': Issue #11145: Fixed miscellaneous issues with C-style formatting of types https://hg.python.org/cpython/rev/adb296e4bcaa -- nosy: +python-dev ___ Python

[issue28833] cross compilation of third-party extension modules

2016-12-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: $ _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_aarch64-linux-android PYTHONHOME=~/Projects/python3-android/build/21-aarch64-linux-android-4.9/usr python3.7 setup.py build_ext > Variables prefixed by an underscore such as '_PYTHON_SYSCONFIGDATA_NAME' are

[issue28740] Add sys.getandroidapilevel()

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: I suggest to start to add sys.getandroidapilevel(), and then discuss how to expose (or not) the runtime version. Reminder: The first step is to have a working Python on Android. I opened this issue to fix the issue #28596. Getting the runtime version is a new

[issue28740] Add sys.getandroidapilevel()

2016-12-01 Thread STINNER Victor
STINNER Victor added the comment: getandroidapilevel-3.patch: Updated version of getandroidapilevel.patch: replace "runtime" with "build time" in the doc :-) Remove also "version > 0" check in support/__init__.py. About the version > 0 check: would it make sense to add the check in

  1   2   >