[issue29438] SIGSEGV in PyObject_Malloc on python 3.6 and 3.7

2017-02-04 Thread INADA Naoki
INADA Naoki added the comment: This is use after free, not overflow. This patch is based on Python 3.6, but I think 3.5 has same issue. I'll check it. -- keywords: +patch Added file: http://bugs.python.org/file46514/29438-sharedkey-useafterfree.

[issue29438] SIGSEGV in PyObject_Malloc on python 3.6 and 3.7

2017-02-04 Thread INADA Naoki
INADA Naoki added the comment: (PYTHONMALLOC=malloc valgrind find it soon. :) -- ___ Python tracker <http://bugs.python.org/issue29438> ___ ___ Python-bugs-list m

[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-04 Thread INADA Naoki
INADA Naoki added the comment: At least, ordering of namespace dict and kwargs dict are language spec for 3.6. This option breaks it. When this option is set, CPython 3.6 is not Python 3.6. -- ___ Python tracker <http://bugs.python.org/issue29

[issue29438] use after free in key sharing dict

2017-02-04 Thread INADA Naoki
INADA Naoki added the comment: I can reproduce it on Python 3.5 with attached script. I think this bug is from Python 3.3, since key-sharing dict is implemented. "Trigger key sharing dict resize while callbacks (weakref or __del__) called from setitem" is step to reproduce. It

[issue29438] use after free in key sharing dict

2017-02-04 Thread INADA Naoki
INADA Naoki added the comment: It's similar to issue27945, but different. I confirmed this issue is in 3.4 too. https://github.com/python/cpython/blob/3.4/Objects/dictobject.c#L3798 // _PyObjectDict_SetItem() if ((tp->tp_flags & Py_TPFLAGS_HEAPTYPE) && (cac

[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-04 Thread INADA Naoki
INADA Naoki added the comment: see https://mail.python.org/pipermail/python-dev/2016-September/146348.html kwargs, __duct__, and namespace passed to metaclass are ordered by language design. order of other dicts are implementation detail

[issue29438] use after free in key sharing dict

2017-02-04 Thread INADA Naoki
Changes by INADA Naoki : -- keywords: +patch Added file: http://bugs.python.org/file46521/29438-sharedkey-useafterfree-py35.patch ___ Python tracker <http://bugs.python.org/issue29

[issue29453] Remove reference to undefined dictionary ordering in Tutorial

2017-02-05 Thread INADA Naoki
INADA Naoki added the comment: LGTM -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue29453> ___ ___ Python-bugs-list mailing list Unsub

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-06 Thread INADA Naoki
INADA Naoki added the comment: I've tried to update ast_opt.c[t] without changing AST. But I can't find clear way to solve "foo" + "bar" docstring problem. This patch adds only docstring to AST. -- Added file: http://bugs.python.org

[issue29463] Change docstring to attribute from first statement.

2017-02-06 Thread INADA Naoki
New submission from INADA Naoki: spin off of #11549. http://bugs.python.org/issue11549#msg130955 > b) Docstring is now an attribute of Module, FunctionDef and ClassDef, > > rather than a first statement. Docstring is a special syntactic > construction, it's not an execu

[issue29469] AST-level Constant folding

2017-02-06 Thread INADA Naoki
New submission from INADA Naoki: spin off of #11549. This patch uses code generator to traverse AST. -- files: ast-constant-folding.patch keywords: patch messages: 287186 nosy: inada.naoki priority: normal severity: normal status: open title: AST-level Constant folding versions: Python

[issue29469] AST-level Constant folding

2017-02-06 Thread INADA Naoki
Changes by INADA Naoki : -- dependencies: +Change docstring to attribute from first statement. ___ Python tracker <http://bugs.python.org/issue29469> ___ ___ Pytho

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-06 Thread INADA Naoki
INADA Naoki added the comment: I submit new issues: * #29463 for AST change (change docstring from first statement to attribute). * #29469 for constant folding Note that this issue contains more peephole -> AST optimization changes. But I want to start these two patch to ease review

[issue29438] use after free in key sharing dict

2017-02-07 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file46556/29438-sharedkey-useafterfree-py36.patch ___ Python tracker <http://bugs.python.org/issue29

[issue29469] AST-level Constant folding

2017-02-07 Thread INADA Naoki
INADA Naoki added the comment: Do you mean https://github.com/pypa/pip/blob/403e398330c8e841e4633aceda859430f5f7b913/pip/_vendor/distlib/markers.py ? This doesn't affect, maybe. Constant folding is executed right before producing bytecode. It doesn't affect to PyCF_ONLY_AST. BTW,

[issue29463] Change docstring to attribute from first statement.

2017-02-07 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file46567/ast-docstring-2.patch ___ Python tracker <http://bugs.python.org/issue29463> ___ ___ Python-bug

[issue29463] Change docstring to attribute from first statement.

2017-02-07 Thread INADA Naoki
INADA Naoki added the comment: lnotab is changed too. -0,0,0,115,12,0,0,0,8,4,4,2,8,8,8,12, -8,25,8,13,114,18,0,0,0,99,0,0,0,0,0,0, +0,0,0,115,10,0,0,0,12,6,8,8,8,12,8,25, +8,13,114,18,0,0,0,99,0,0,0,0,0,0,0,0, 115 is header for bytes type. next 4 bytes is it's length (l

[issue29463] Change docstring to attribute from first statement.

2017-02-07 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file46569/ast-docstring-3.patch ___ Python tracker <http://bugs.python.org/issue29463> ___ ___ Python-bug

[issue29463] Add `docstring` attribute to AST nodes

2017-02-07 Thread INADA Naoki
Changes by INADA Naoki : -- title: Change docstring to attribute from first statement. -> Add `docstring` attribute to AST nodes ___ Python tracker <http://bugs.python.org/issu

[issue29476] Simplify set_add_entry()

2017-02-07 Thread INADA Naoki
INADA Naoki added the comment: I like this idea. -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue29476> ___ ___ Python-bugs-list mailin

[issue29438] use after free in key sharing dict

2017-02-07 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file46572/29438-sharedkey-useafterfree-py36-2.patch ___ Python tracker <http://bugs.python.org/issue29

[issue29438] use after free in key sharing dict

2017-02-07 Thread INADA Naoki
INADA Naoki added the comment: to: Serhiy I can reproduce the issue by 29438-minimum.py, on Python 3.7 with pydebug. But since this issue is "use after free", it may and may not crash. It's up to how freed memory block is used from another part of Python. Deterministic test whi

[issue29438] use after free in key sharing dict

2017-02-08 Thread INADA Naoki
INADA Naoki added the comment: > Why res == 0 is added? If PyDict_SetItem() triggers recursive calling of > _PyObjectDict_SetItem() which calls PyDict_SetItem() it may be possible that > the first PyDict_SetItem() is failed while the dict is changed by the second > PyDict_S

[issue29463] Add `docstring` attribute to AST nodes

2017-02-08 Thread INADA Naoki
INADA Naoki added the comment: Oh, I misunderstood something. patched Python 3.7 and system's Python 3.5 shows same output for code below. I'll check what is actually changed. inada-n@x250 ~/w/p/ast-docstring> cat -n x.py 1 """module docstring""

[issue29476] Simplify set_add_entry()

2017-02-08 Thread INADA Naoki
INADA Naoki added the comment: I think it violates O(1). "s.add(x); s.discard(x);" loop creates dummy chain. Average chain length is determined by size of the set. So it is O(len(s)) rather than amortized O(1). -- ___ Python trac

[issue29463] Add `docstring` attribute to AST nodes

2017-02-08 Thread INADA Naoki
INADA Naoki added the comment: This patch affects firstlineno and lnotab of module and class, but not functions. module: - at 0x7f053a8f8b70, file "Lib/importlib/_bootstrap.py", line 8> + at 0x7fdefbf10340, file "Lib/importlib/_bootstrap.py", line 25> filename L

[issue29463] Add `docstring` attribute to AST nodes

2017-02-08 Thread INADA Naoki
INADA Naoki added the comment: So what's new entry may be: +* ``Module``, ``FunctionDef``, ``AsyncFunctionDef``, and + ``ClassDef`` AST nodes now have a new ``docstring`` attribute. + The first statement in their body is not considered as a docstring anymore. + This affects ``co_firstl

[issue29463] Add `docstring` attribute to AST nodes

2017-02-08 Thread INADA Naoki
INADA Naoki added the comment: Now I doubt about this patch is really good. docstring of Module and Class generates two bytecode. So it's a real, executed statement. LOAD_CONST 0 ("docstring") STORE_NAME 0 ("__doc__") -- _

[issue29509] redundant interning in PyObject_GetAttrString

2017-02-08 Thread INADA Naoki
New submission from INADA Naoki: PyObject_GetAttrString creates temporary unicode object and intern it. It totally redundant. -- files: getattrstring-nointern.patch keywords: patch messages: 287386 nosy: inada.naoki priority: normal severity: normal stage: patch review status: open

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: Maybe, we can skip Method object entirely using _PyObject_GetMethod(). Currently it is used only in LOAD_METHOD. But PyObject_CallMethod(), _PyObject_CallMethodId(), PyObject_CallMethodObjArgs(), _PyObject_CallMethodIdObjArgs() can use it too

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: We'll move to github soon. So no need for caring hgignore. While there is `.vscode` in gitignore already, I'm not fan of adding hundreds of IDE specific rule to gitignore. Why don't you use gitignore_global? -- nos

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: I agree with Berker. But some git/github tips are very useful for CPython core developers while they aren't CPython specific. And some of them are not in beginner's guide. I think it's worth enough to add link to such tips. * Use gitignore_globa

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: > But PyObject_CallMethod(), _PyObject_CallMethodId(), > PyObject_CallMethodObjArgs(), _PyObject_CallMethodIdObjArgs() can use it too. CallMethod[Id]ObjArgs() can use it easily. But format support is not so easy. -- Added file: http://bugs.pyth

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: callmethod.patch: + ../python.default -m perf compare_to default.json patched2.json -G --min-speed=1 Slower (5): - logging_silent: 717 ns +- 9 ns -> 737 ns +- 8 ns: 1.03x slower (+3%) - fannkuch: 1.04 sec +- 0.01 sec -> 1.06 sec +- 0.02 sec: 1.02x slow

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: I'm sorry, callmethod.patch is tuned other place, and causing SEGV. method_fastcall2.patch is tuning same function (call_method() in typeobject.c), and uses trick to bypass temporary method object (same to _PyObject_GetMethod()). $ ./python -m perf t

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: method_fastcall3.patch implement the trick in more general way. (I haven't ran test yet since it's midnight. I'll post result later.) -- Added file: http://bugs.python.org/file46610/method_fastcall3.patch ___

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: method_fastcall4.patch looks clean enough, and performance benefit seems nice. I don't know current test suite covers unusual special methods. Maybe, we can extend test_class to cover !unbound (e.g. @classmethod)

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: Thanks for finishing my draft patch, Victor. callmetohd2.patch is same trick for PyObject_CallMethod* APIs in abstract.c. It fixes segv in callmethod.patch. And APIs receiving format string can do same trick when format is empty too. As I grepping

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: > I'm not sure about the change on PyObject_CallMethod*() only for empty format > string. There are many place using _PyObject_CallMethodId() to call method without args. Maybe, we should recommend to use _PyObject_CallMethodIdObjArgs() when no arg

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-10 Thread INADA Naoki
INADA Naoki added the comment: performance benefit is small. https://gist.github.com/methane/32fe57cd4aaac1c5c37f75cbbfbe7562 -- Added file: http://bugs.python.org/file46619/callmethod3.patch ___ Python tracker <http://bugs.python.org/issue29

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-10 Thread INADA Naoki
INADA Naoki added the comment: Yes, I used --enable-optimization this time. But my patch is not good for branch prediction of my CPU in this time. I'm willing Object/call.c solves such placement issue. BTW, since benefit of GetMethod is small, how about this? * Add _PyMethod_FastCallKey

[issue29438] use after free in key sharing dict

2017-02-10 Thread INADA Naoki
INADA Naoki added the comment: Since Python 3.5's key sharing dict allows deletion, py35-2.patch is slightly different from py36-2.patch. Since dictresize won't happen in normal (no weakref/__del__ callback) deletion, I removed `CACHED_KEYS(tp) = NULL` entirely. -- Added f

[issue29438] use after free in key sharing dict

2017-02-10 Thread INADA Naoki
INADA Naoki added the comment: I'll send PR to github. Please continue there. -- ___ Python tracker <http://bugs.python.org/issue29438> ___ ___ Python-bugs-l

[issue29438] use after free in key sharing dict

2017-02-10 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +30 ___ Python tracker <http://bugs.python.org/issue29438> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29463] Add `docstring` field to AST nodes

2017-02-12 Thread INADA Naoki
INADA Naoki added the comment: Thanks. I don't familiar with language frontend. I'll check NEWS entry. -- title: Add `docstring` attribute to AST nodes -> Add `docstring` field to AST nodes ___ Python tracker <http://bugs.pytho

[issue29463] Add `docstring` field to AST nodes

2017-02-12 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +46 ___ Python tracker <http://bugs.python.org/issue29463> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29532] functools.partial is not compatible between 2.7 and 3.5

2017-02-13 Thread INADA Naoki
INADA Naoki added the comment: patch LGTM. -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue29532> ___ ___ Python-bugs-list mailing list Unsub

[issue29410] Moving to SipHash-1-3

2017-02-13 Thread INADA Naoki
INADA Naoki added the comment: Christian Heimes: Could you create pull request? https://github.com/tiran/cpython/tree/siphash13 is 404 now. -- ___ Python tracker <http://bugs.python.org/issue29

[issue29548] deprecate PyEval_Call*() functions.

2017-02-13 Thread INADA Naoki
New submission from INADA Naoki: As reading call.c, PyEval_Call* APIs are mostly duplicate of PyObject_Call* APIs. While they are not documented, they seems part of limited APIs. So we can't remove them easily. Let's deprecate them for now. -- components: Interpreter Cor

[issue29548] deprecate PyEval_Call*() functions.

2017-02-13 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +54 ___ Python tracker <http://bugs.python.org/issue29548> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29548] deprecate PyEval_Call*() functions.

2017-02-13 Thread INADA Naoki
INADA Naoki added the comment: Thanks, Lemburg to pointing it out. Here is detail of the difference. ## PyEval_CallFunction(), PyEval_CallMethod() They are very similar to PyObject_CallFunction() and PyObject_CallMethod(). difference are: * PyEval_Call...() doesn't respect Py_SSIZE_T_

[issue29548] deprecate PyEval_Call*() functions.

2017-02-13 Thread INADA Naoki
Changes by INADA Naoki : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue29548> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29438] use after free in key sharing dict

2017-02-13 Thread INADA Naoki
INADA Naoki added the comment: All pull requests are merged. https://github.com/python/cpython/pull/17 (master) https://github.com/python/cpython/pull/39 (3.6) https://github.com/python/cpython/pull/40 (3.5) -- resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue29548] deprecate PyEval_Call*() functions.

2017-02-13 Thread INADA Naoki
INADA Naoki added the comment: PR 87 fixes the regression in 3.6 branch -- pull_requests: +55 ___ Python tracker <http://bugs.python.org/issue29548> ___ ___ Pytho

[issue29548] deprecate PyEval_Call*() functions.

2017-02-14 Thread INADA Naoki
INADA Naoki added the comment: > The argument tuple can be NULL for PyEval_CallObject() (it then gets replaced > with an empty tuple), but will raise a segfault for PyObject_Call(). PyObject_CallObject() accepts NULL as args. Macro vs function is only difference of them. On the othe

[issue29548] deprecate PyEval_Call*() functions.

2017-02-14 Thread INADA Naoki
INADA Naoki added the comment: > I'm more in favor of modifying PyEval_xxx() to call PyObject_xxx() and > deprecate them. That's PR 75 :) -- ___ Python tracker <http://bugs.py

[issue29548] deprecate PyEval_Call*() functions.

2017-02-14 Thread INADA Naoki
INADA Naoki added the comment: > I would suggest to deprecate PyEval_Call*() functions first only in the > documentation. In 3.8 or 3.9 add the Py_DEPRECATED attribute. doesn't excluded by PEP 384. And these 3 functions and 1 macro is outside of "#ifndef Py_LIMITED_API&quo

[issue29548] deprecate PyEval_Call*() functions.

2017-02-14 Thread INADA Naoki
INADA Naoki added the comment: I stopped deprecating PyEval_Call APIs, and removing it's usage in PR 75. Summary of current pull requests: PR 87 contains fix regression of PyEval_CallObjectWithKeywords for Python 3.6. PR 75 is for master branch. It contains fix same to PR 87. Additio

[issue29529] Backport Travis configuration

2017-02-14 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +68 ___ Python tracker <http://bugs.python.org/issue29529> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24665] CJK support for textwrap

2017-02-14 Thread INADA Naoki
INADA Naoki added the comment: Sorry, I'm not unicode expert. Important usage of textwrap is printing in terminal. So I think we should learn from software relating terminal. tmux uses utf8proc. utf8proc calculates display width by script at here. https://github.com/JuliaLang/utf8proc

[issue24665] CJK support for textwrap

2017-02-14 Thread INADA Naoki
INADA Naoki added the comment: FYI, I had implemented textwrap respects EAW in Bazaar project. See here. http://bazaar.launchpad.net/~bzr-pqm/bzr/bzr.dev/revision/5874 -- ___ Python tracker <http://bugs.python.org/issue24

[issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs

2017-02-15 Thread INADA Naoki
INADA Naoki added the comment: I've stopped to deprecating. changed issue title. -- title: deprecate PyEval_Call*() functions. -> Recommend PyObject_Call* APIs over PyEval_Call*() APIs ___ Python tracker <http://bugs.python.org

[issue11165] Document PyEval_Call* functions

2017-02-15 Thread INADA Naoki
INADA Naoki added the comment: I think PyObject_Call* APIs should be preferred. As discussed in #29548, we can't remove or deprecate PyEval_Call*. But I don't think it's worth enough to document them. How about keep them undocumented? -- nos

[issue11165] Document PyEval_Call* functions

2017-02-15 Thread INADA Naoki
INADA Naoki added the comment: In PR 75, I added a comment in Include/ceval.h, right before PyEval_Call* APIs. https://github.com/python/cpython/pull/75/files#diff-da3df9def5eca3595399b0a5a7698eac -- ___ Python tracker <http://bugs.python.

[issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs

2017-02-15 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +82 ___ Python tracker <http://bugs.python.org/issue29548> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs

2017-02-15 Thread INADA Naoki
INADA Naoki added the comment: New changeset 72dccde884d89586b0cafd990675b7e21720a81f by GitHub in branch 'master': bpo-29548: Fix some inefficient call API usage (GH-97) https://github.com/python/cpython/commit/72dccde884d89586b0cafd990675b7

[issue26787] test_distutils fails when configured --with-lto

2017-02-17 Thread INADA Naoki
INADA Naoki added the comment: Would you send pull request on Github? -- ___ Python tracker <http://bugs.python.org/issue26787> ___ ___ Python-bugs-list mailin

[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2017-02-17 Thread INADA Naoki
INADA Naoki added the comment: LGTM, but would you send pull request on Github? -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue26

[issue29585] site.py imports relatively large `sysconfig` module.

2017-02-17 Thread INADA Naoki
New submission from INADA Naoki: site.py uses sysconfig (and sysconfigdata, _osx_support) module for user-site package. But sysconfig module is not so lightweight, and very rarely used. Actually speaking, only tests and distutils uses sysconfig in stdlibs. And it takes about 7% of startup

[issue29585] site.py imports relatively large `sysconfig` module.

2017-02-17 Thread INADA Naoki
INADA Naoki added the comment: Christian: I'm using macOS on office and Linux on home. sysconfig is imported even on Linux https://github.com/python/cpython/blob/master/Lib/site.py#L247-L248 https://github.com/python/cpython/blob/master/Lib/site.py#L263

[issue29585] site.py imports relatively large `sysconfig` module.

2017-02-17 Thread INADA Naoki
INADA Naoki added the comment: FYI, here is profile of site: https://gist.github.com/methane/1f1fe4385dad84f03eb429359f0f917b -- ___ Python tracker <http://bugs.python.org/issue29

[issue29585] site.py imports relatively large `sysconfig` module.

2017-02-17 Thread INADA Naoki
INADA Naoki added the comment: no-site python_startup_no_site: Median +- std dev: 9.13 ms +- 0.02 ms default: python_startup: Median +- std dev: 15.6 ms +- 0.0 ms GH-136 + skip abs_paths(). python_startup: Median +- std dev: 14.2 ms +- 0.0 ms profile of GH-136 + skip abs_paths(): https

[issue29592] abs_paths() in site.py is slow

2017-02-17 Thread INADA Naoki
New submission from INADA Naoki: abs_paths() is the another most slow parts of site module. We can speedup it if we have C implementation of os.path.abspath() or abs_paths(). But before trying it, is abs_paths() really needed for now? It only rewrite `__file__` and `__cached__` of modules

[issue29585] site.py imports relatively large `sysconfig` module.

2017-02-17 Thread INADA Naoki
INADA Naoki added the comment: I create #29592 for abs_paths(). Let's focus on sysconfig in this issue. PR 136 ports really needed part of sysconfig into site.py already. 'PYTHONFRAMEWORK' on macOS is the only variable we need import from sysconfig. Adding `site.cfg` like `p

[issue29592] abs_paths() in site.py is slow

2017-02-17 Thread INADA Naoki
INADA Naoki added the comment: path normalization was added by https://github.com/python/cpython/commit/38cb9f1f174415d3b37fbaeb5d152d65525839d2 -- ___ Python tracker <http://bugs.python.org/issue29

[issue29592] abs_paths() in site.py is slow

2017-02-17 Thread INADA Naoki
INADA Naoki added the comment: https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap_external.py#L1089-L1095 While '' in sys.path, it is converted to `getcwd()` before calling PathHook. Is there any chance relative / not normalized path is in sys.path before site

[issue29592] abs_paths() in site.py is slow

2017-02-17 Thread INADA Naoki
INADA Naoki added the comment: $ python2 -S Python 2.7.12+ (default, Sep 17 2016, 12:08:02) [GCC 6.2.0 20160914] on linux2 >>> import x >>> x.__file__ 'x.py' $ python3 -S Python 3.6.0 (default, Dec 30 2016, 20:49:54) [GCC 6.2.0 20161005] on linux >>> i

[issue29585] site.py imports relatively large `sysconfig` module.

2017-02-17 Thread INADA Naoki
INADA Naoki added the comment: PR 136 now adds `sys._framework` and 'PYTHONFRAMEWORK' macro in pyconfig.h. -- ___ Python tracker <http://bugs.python.o

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread INADA Naoki
INADA Naoki added the comment: I can reproduce it with Sphinx 1.5.2. Additonally, "None" is shown at top. -- nosy: +inada.naoki Added file: http://bugs.python.org/file46648/sphinx-1.5-pydoc.png ___ Python tracker <http://bugs.python.o

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread INADA Naoki
INADA Naoki added the comment: ref: https://github.com/sphinx-doc/sphinx/issues/2986 -- ___ Python tracker <http://bugs.python.org/issue29520> ___ ___ Python-bug

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +128 ___ Python tracker <http://bugs.python.org/issue29520> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread INADA Naoki
INADA Naoki added the comment: Could docs.python.org use new Sphinx, after fix this issue? Travis checks doc with Sphinx 1.5.2, but docs.python.org seems using 1.3.3. It's too old. -- ___ Python tracker <http://bugs.python.org/is

[issue29529] Backport Travis configuration

2017-02-18 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +129 ___ Python tracker <http://bugs.python.org/issue29529> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29592] abs_paths() in site.py is slow

2017-02-18 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +131 ___ Python tracker <http://bugs.python.org/issue29592> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29592] abs_paths() in site.py is slow

2017-02-19 Thread INADA Naoki
INADA Naoki added the comment: I got it. removeduppaths() may change relpath in sys.path to absolute path. abs_paths() changes __file__ and __cached__ for consistency with the changed sys.path. I updated PR 167 to call abs_paths() only if removeduppaths() modified sys.path. Strictly speaking

[issue29529] Backport Travis configuration

2017-02-19 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +144 ___ Python tracker <http://bugs.python.org/issue29529> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-19 Thread INADA Naoki
INADA Naoki added the comment: New changeset 3eea8c67fa870c6e2b7a521d292afe7fe3e95f58 by GitHub in branch 'master': bpo-29520: doc: fix deprecation warning from 'defindex' template (GH-165) https://github.com/python/cpython/commit/3eea8c67fa870c6e2b7a

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-19 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +145 ___ Python tracker <http://bugs.python.org/issue29520> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-19 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +146 ___ Python tracker <http://bugs.python.org/issue29520> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-19 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +147 ___ Python tracker <http://bugs.python.org/issue29520> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-19 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +151 ___ Python tracker <http://bugs.python.org/issue29520> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29529] Backport Travis configuration

2017-02-19 Thread INADA Naoki
INADA Naoki added the comment: New changeset 98604c7683f41f04c633935bb582399c50db838c by GitHub in branch '2.7': bpo-29529: Add .travis.yml to 2.7 branch (GH-27) https://github.com/python/cpython/commit/98604c7683f41f04c633935bb58239

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-19 Thread INADA Naoki
INADA Naoki added the comment: New changeset cf44d957ec177be62f5349ef88515190dcfccbd6 by GitHub in branch '2.7': bpo-29520: doc: fix deprecation warning from 'defindex' template (GH-180) https://github.com/python/cpython/commit/cf44d957ec177be62f53

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-19 Thread INADA Naoki
INADA Naoki added the comment: New changeset f0174c69b7b8bd27ee32d96e890d665da29472af by GitHub in branch '3.5': bpo-29520: doc: fix deprecation warning from 'defindex' template (GH-179) https://github.com/python/cpython/commit/f0174c69b7b8bd27ee32

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-19 Thread INADA Naoki
INADA Naoki added the comment: New changeset 7970cd483346dfd7723da214fb27399ecc574095 by GitHub in branch '3.6': bpo-29520: doc: fix deprecation warning from 'defindex' template (GH-178) https://github.com/python/cpython/commit/7970cd483346dfd7723d

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-19 Thread INADA Naoki
INADA Naoki added the comment: New changeset e395c4dbe19115aaab315c2a113b172e9fef307a by GitHub in branch 'master': bpo-29520: doc: add missing dot (GH-182) https://github.com/python/cpython/commit/e395c4dbe19115aaab315c2a113b17

[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-20 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue29529] Backport Travis configuration

2017-02-20 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue29529> ___

[issue28963] Use-after-free in _asyncio_Future_remove_done_callback() of _asynciomodule.c

2017-02-20 Thread INADA Naoki
INADA Naoki added the comment: 3.6.0 had been released? Yury, would you create pull request? -- ___ Python tracker <http://bugs.python.org/issue28963> ___ ___

[issue24274] erroneous comments in dictobject.c

2017-02-20 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +161 ___ Python tracker <http://bugs.python.org/issue24274> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    22   23   24   25   26   27   28   29   30   31   >