[issue34087] django: segmentation fault on random places

2018-07-13 Thread INADA Naoki
Change by INADA Naoki : -- title: django: segmentation fault on garbage collection in visit_decref() -> django: segmentation fault on random places ___ Python tracker <https://bugs.python.org/issu

[issue34087] django: segmentation fault on garbage collection in visit_decref()

2018-07-13 Thread INADA Naoki
INADA Naoki added the comment: I received two core files ("core" and "core.23") from fenrrir, thank you. But I can't investigate well, sorry. I think someone breaks memory, and SEGV happened later. I need to reproduce it on my machine... In core.23, SEGV happens in

[issue34087] django: segmentation fault on random places

2018-07-13 Thread INADA Naoki
INADA Naoki added the comment: @jonash Thanks! Would you give me concrete step to run the project and reproduce the segfault? -- ___ Python tracker <https://bugs.python.org/issue34

[issue34087] django: segmentation fault on random places

2018-07-13 Thread INADA Naoki
INADA Naoki added the comment: I tried it but I can't reproduce... -- ___ Python tracker <https://bugs.python.org/issue34087> ___ ___ Python-bugs-list m

[issue34087] django: segmentation fault on random places

2018-07-13 Thread INADA Naoki
INADA Naoki added the comment: @jonash What Python binary do you use? * OS (distro and version) * Installed from package? if so, complete package name and version. * Installed from source? if so, step you used to install Python 3.7 (e.g. pyenv install 3.7

[issue34087] float(unicode) may cause segmentation fault

2018-07-13 Thread INADA Naoki
INADA Naoki added the comment: Very thanks! I found I set `export PYTHONMALLOC=pymalloc_debug`. That's why I can't reproduce it. Now I can reproduce and I get where memory is broken, and understood what cause: Python traceback is: Traceback (most recent call first): File "

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
Change by INADA Naoki : -- title: float(unicode) may cause segmentation fault -> int(s), float(s) and others may cause segmentation fault ___ Python tracker <https://bugs.python.org/issu

[issue31979] Simplify converting non-ASCII strings to int, float and complex

2018-07-13 Thread INADA Naoki
Change by INADA Naoki : -- pull_requests: +7810 ___ Python tracker <https://bugs.python.org/issue31979> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +7809 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34087> ___ ___ Py

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
INADA Naoki added the comment: When I commented out the fix: $ ./python -c 'int("こんにちは")' python: Objects/unicodeobject.c:484: _PyUnicode_CheckConsistency: Assertion `PyUnicode_READ(kind, data, ascii->length) == 0' failed. Aborted

[issue34093] Reproducible pyc: FLAG_REF is not stable.

2018-07-13 Thread INADA Naoki
INADA Naoki added the comment: > Would it not be easy to add a named optional keyword > argument, like "stable=True"? My pull request did it. But for now, I get hint on ML and overwrote my PR with another way: Use FLAG_REF for all

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
INADA Naoki added the comment: New changeset 16dfca4d829e45f36e71bf43f83226659ce49315 by INADA Naoki in branch 'master': bpo-34087: Fix buffer overflow in int(s) and similar functions (GH-8274) https://github.com/python/cpython/commit/16dfca4d829e45f36e71bf43f83226

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 ___ Python tracker <https://bugs.python.or

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
Change by INADA Naoki : -- pull_requests: +7815 ___ Python tracker <https://bugs.python.org/issue34087> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-14 Thread INADA Naoki
INADA Naoki added the comment: New changeset b2f8aa0c998d331ab2b4c701756a6427c0e91d48 by INADA Naoki in branch '3.6': bpo-34087: Backport tests for int/float/complex (GH-8274) https://github.com/python/cpython/commit/b2f8aa0c998d331ab2b4c701756a64

[issue34114] Build failing: use of undeclared identifier '_Py_END_SUPPRESS_IPH' & '_Py_BEGIN_SUPPRESS_IPH'

2018-07-14 Thread INADA Naoki
INADA Naoki added the comment: Sometime, you need to run `make distclean` or `git clean -fdx` to remove wrong caches. -- nosy: +inada.naoki resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracke

[issue34123] ambiguous documentation for dict.popitem

2018-07-15 Thread INADA Naoki
INADA Naoki added the comment: I think it is implementation detail yet. Only iteration order is guaranteed. -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue34

[issue34123] ambiguous documentation for dict.popitem

2018-07-16 Thread INADA Naoki
INADA Naoki added the comment: @Armin Rigo How do you think about this? Is there no possible optimizations by breaking LIFO dict.popitem()? -- nosy: +arigo ___ Python tracker <https://bugs.python.org/issue34

[issue34093] Reproducible pyc: FLAG_REF is not stable.

2018-07-16 Thread INADA Naoki
Change by INADA Naoki : -- pull_requests: +7827 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34093> ___ ___ Python-bugs-list mai

[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread INADA Naoki
Change by INADA Naoki : -- pull_requests: +7840 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issue33967> ___ ___ Python-

[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread INADA Naoki
Change by INADA Naoki : -- pull_requests: +7840, 7841 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issue33967> ___ ___ Py

[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread INADA Naoki
INADA Naoki added the comment: New changeset 56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2 by INADA Naoki in branch 'master': bpo-33967: Fix wrong use of assertRaises (GH-8306) https://github.com/python/cpython/commit/56d8f57b83a37b05a6f2fbc3e141bb

[issue34134] multiprocessing memory huge usage

2018-07-16 Thread INADA Naoki
INADA Naoki added the comment: Do you imap or imap_unorderd? They are intended for use with iterator, including generator. -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue34

[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34134] multiprocessing memory huge usage

2018-07-16 Thread INADA Naoki
INADA Naoki added the comment: > I think we should add something like "if you are using generator, consider > use imap instead" I think it's not good hint. There are short generator. And there are long (or infinite) iterator other than generator too. Maybe, "i

[issue34100] Same constants in tuples are not merged while compile()

2018-07-19 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +7875 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue34100] Same constants in tuples are not merged while compile()

2018-07-19 Thread INADA Naoki
INADA Naoki added the comment: Counting object types in logging/__pycache__/__init__.cpython-38.pyc: master: [('r', 1815), (')', 467), ('Z', 339), ('s', 314), ('z', 273), ('c', 157), ('N', 154), ('a', 24), (&#

[issue34100] Same constants in tuples are not merged while compile()

2018-07-19 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +needs review -3.7regression stage: needs patch -> patch review type: enhancement -> resource usage ___ Python tracker <https://bugs.python.org/i

[issue34100] Same constants in tuples are not merged while compile()

2018-07-20 Thread INADA Naoki
INADA Naoki added the comment: This is another memory overhead comparison. It seems merging constants reduces 2~3% memory usage. import sys, django, flask sys._debugmallocstats() ### master branch class size num pools blocks in use avail blocks

[issue29336] merge tuples in module

2018-07-22 Thread INADA Naoki
Change by INADA Naoki : -- resolution: postponed -> duplicate stage: -> resolved status: pending -> closed superseder: -> Same constants in tuples are not merged while compile() ___ Python tracker <https://bugs.python

[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-07-23 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +7956 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34177> ___ ___ Py

[issue27671] FAQ: len() is still function for good reason.

2018-07-23 Thread INADA Naoki
Change by INADA Naoki : -- pull_requests: +7957 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue27671> ___ ___ Python-bugs-list mai

[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-07-23 Thread INADA Naoki
Change by INADA Naoki : -- pull_requests: +7958 ___ Python tracker <https://bugs.python.org/issue34177> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-07-24 Thread INADA Naoki
INADA Naoki added the comment: Maybe, vsts machine installs Homebrew's Python. Homebrew's Python installes /usr/local/lib/python3.7/sitecustomize.py https://github.com/Homebrew/homebrew-core/blob/0ce9a5a481b3472608fe4e4188cb5d243deebb99/Formula/python.rb#L295-L329 When running te

[issue34209] racecondition

2018-07-24 Thread INADA Naoki
INADA Naoki added the comment: https://docs.python.org/3/library/os.html#os.access It is already documented. What's point of this issue? -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/is

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-07-24 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-07-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 6cf8255912c36fec6f87f62513034d0818f61390 by INADA Naoki (erikjanss) in branch 'master': bpo-34217: Use lowercase header for Windows (GH-8453) https://github.com/python/cpython/commit/6cf8255912c36fec6f87f62513034d0818f61390 -

[issue34167] Standard library docs: prev/next skip right over 16.11

2018-07-25 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34167> ___ ___

[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-07-27 Thread INADA Naoki
Change by INADA Naoki : -- pull_requests: +8014 ___ Python tracker <https://bugs.python.org/issue34177> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-07-27 Thread INADA Naoki
INADA Naoki added the comment: New changeset 777cdd94b9bebd5b22df0fc293aa078d5537b988 by INADA Naoki in branch '3.6': bpo-34177: vsts: Avoid conflict with Homebrew Python (GH-8430) https://github.com/python/cpython/commit/777cdd94b9bebd5b22df0fc293aa07

[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-07-27 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34242] configparser: SectionProxy.get is silent on missing options

2018-07-27 Thread INADA Naoki
INADA Naoki added the comment: I don't think it's worth enough to break backward compatibility. Additionally, "section.get(key) returns None if key is not exist" is consistent with dict's behavior. On the other hand, "parser.get(section, key)" has differen

[issue34242] configparser: SectionProxy.get is silent on missing options

2018-07-27 Thread INADA Naoki
Change by INADA Naoki : -- nosy: +lukasz.langa ___ Python tracker <https://bugs.python.org/issue34242> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34245] Python library should be installed writable

2018-07-27 Thread INADA Naoki
INADA Naoki added the comment: Isn't it useful to avoid accidental change while open files with editor for just reading? Is there any real world problem about read-only library? -- nosy: +inada.naoki ___ Python tracker <https://bugs.py

[issue34209] racecondition

2018-07-27 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34209> ___ ___

[issue24085] large memory overhead when pyc is recompiled

2018-07-27 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue24085> ___ ___

[issue33666] Document removal of os.errno

2018-07-27 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +8015 stage: resolved -> patch review ___ Python tracker <https://bugs.python.org/issue33666> ___ _

[issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258)

2018-07-27 Thread INADA Naoki
INADA Naoki added the comment: We ignores several crashes caused by exposing internal object through gc or weakref module. This case is not special enough to care. -- resolution: -> wont fix stage: -> resolved status: open -> closed _

[issue34245] Python library should be installed writable

2018-07-27 Thread INADA Naoki
INADA Naoki added the comment: On Fri, Jul 27, 2018 at 6:25 PM Jeroen Demeyer wrote: > > Isn't it useful to avoid accidental change while open files with editor for > > just reading? > > Why would that argument apply to a binary file (and only to binary files)? I

[issue2651] Strings passed to KeyError do not round trip

2018-07-27 Thread INADA Naoki
INADA Naoki added the comment: Even if we fixed stdlib, there are many KeyError(missing) idiom used in 3rd party code. KeyError: '42' KeyError: '42\n' KeyError: 42 All of the above are looks different. I think it's good. Is it really worth enough to break it?

[issue33666] Document removal of os.errno

2018-07-29 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue27671] FAQ: len() is still function for good reason.

2018-07-30 Thread INADA Naoki
INADA Naoki added the comment: New changeset c48e26dcadbff8620bb5881d3bd148fc8894d0ef by INADA Naoki in branch 'master': bpo-27671: Update FAQ about why len is function (GH-8432) https://github.com/python/cpython/commit/c48e26dcadbff8620bb5881d3bd148

[issue27671] FAQ: len() is still function for good reason.

2018-07-31 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2018-07-31 Thread INADA Naoki
INADA Naoki added the comment: FYI, _lsprof uses PyObject_Call() https://github.com/python/cpython/blob/ea68d83933e6de6cabfb115ec1b301947369/Modules/_lsprof.c#L120-L123 If PyObject_Call() trigger profiler, lsprof should avoid recursion

[issue34303] micro-optimizations in functools.reduce()

2018-08-01 Thread INADA Naoki
Change by INADA Naoki : -- type: enhancement -> performance versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue34303> ___ ___ Python-

[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-08-02 Thread INADA Naoki
INADA Naoki added the comment: Same fix can be applied to buildbot. This is caused by (a) Homebrew installs Python to /usr/local with (hacky) sitecustomize, and (b) Python's default prefix is /usr/local. I think test should be run without conflicting with another install

[issue34287] bufferedio.c uses unused argument of METH_NOARGS functions

2018-08-02 Thread INADA Naoki
INADA Naoki added the comment: New changeset fc512e3e0663f7f325862fcd42aef765fd34a453 by INADA Naoki (jdemeyer) in branch 'master': bpo-34287: Do not use second argument of METH_NOARGS functions (GH-8582) https://github.com/python/cpython/commit/fc512e3e0663f7f325862fcd42aef7

[issue34287] bufferedio.c uses unused argument of METH_NOARGS functions

2018-08-02 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34320] Creating dict from OrderedDict doesn't preserve order

2018-08-02 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +8129 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34320> ___ ___ Py

[issue34296] Speed up python startup by pre-warming the vm

2018-08-06 Thread INADA Naoki
Change by INADA Naoki : -- nosy: +inada.naoki versions: -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue34296> ___ ___ Python-bug

[issue34296] Speed up python startup by pre-warming the vm

2018-08-06 Thread INADA Naoki
INADA Naoki added the comment: > i did 2 implementations in both python and pure bash, python takes about > 500ms to run while bash is more than 10 times faster. VM startup + `import site` are done in 10~20ms on common Linux machine. It won't take 500ms. While Python VM sta

[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2018-08-06 Thread INADA Naoki
INADA Naoki added the comment: New changeset b2499669ef2e6dc9a2cdb49b4dc498e078167e26 by INADA Naoki (Anthony Sottile) in branch 'master': bpo-19891: Ignore error while writing history file (GH-8483) https://github.com/python/cpython/commit/b2499669ef2e6dc9a2cdb49b4dc498

[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2018-08-06 Thread INADA Naoki
Change by INADA Naoki : -- components: +Library (Lib) -Extension Modules resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 3.3, Python 3.4 ___ Python tracke

[issue34296] Speed up python startup by pre-warming the vm

2018-08-06 Thread INADA Naoki
INADA Naoki added the comment: > In my tests, a helloworld python script generally takes about 30-40 ms. [snip] > Finally, for simple and quick user scrips, the 30-40 ms startup time without > any import statements may not be a huge problem, but it's still tangible and >

[issue34296] Speed up python startup by pre-warming the vm

2018-08-06 Thread INADA Naoki
INADA Naoki added the comment: > I understand many things can happen while importing a library. But for a > specific program, its imports are usually fixed and very much likely the same > between runs. That's why I believe a zygote/fork/snapshot feature would still > b

[issue34296] Speed up python startup by pre-warming the vm

2018-08-06 Thread INADA Naoki
INADA Naoki added the comment: * While this issue is "pre warming VM", VM startup is not significant part of your 500ms. * You're talking about application specific strategy now. It's different of this issue. And many ideas like yours are already discussed on ML, agai

[issue34296] Speed up python startup by pre-warming the vm

2018-08-07 Thread INADA Naoki
INADA Naoki added the comment: On Wed, Aug 8, 2018 at 6:40 AM Cyker Way wrote: > > Cyker Way added the comment: > > > While this issue is "pre warming VM", VM startup is not significant part > > of your 500ms. > > 10-20ms should be OK for shel

[issue34296] Speed up python startup by pre-warming the vm

2018-08-08 Thread INADA Naoki
INADA Naoki added the comment: On Thu, Aug 9, 2018 at 3:17 AM Cyker Way wrote: > > Cyker Way added the comment: > > I'm fine with stdlib, 3rd party tools, or whatever. My focus is to understand > is whether this idea can be correctly implemented on the python VM

[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-08-10 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed status: open -> closed ___ Python tracker <https://bugs.python.org/issue34177> ___ ___ Python-bugs-list

[issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section

2018-08-11 Thread INADA Naoki
INADA Naoki added the comment: New changeset 9e840848510d20e644a19c723b803877377d3765 by INADA Naoki (Evan Allrich) in branch 'master': bpo-34379: Doc: Move note for json.dump (GH-8730) https://github.com/python/cpython/commit/9e840848510d20e644a19c723b803877377d3765 -

[issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section

2018-08-11 Thread INADA Naoki
INADA Naoki added the comment: New changeset eb6ed12f486f184cb00fc35662d012dbb1f30d2e by INADA Naoki (Miss Islington (bot)) in branch '3.6': bpo-34379: Doc: Move note for json.dump (GH-8730) https://github.com/python/cpython/commit/eb6ed12f486f184cb00fc35662d012

[issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section

2018-08-11 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.8 ___ Python tracker <https://bugs.python.or

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-08-15 Thread INADA Naoki
INADA Naoki added the comment: New changeset e6a4755e6793942b950c1595e0c34bd66a0ee13e by INADA Naoki (Erik Janssens) in branch 'master': bpo-34217: Use lowercase for windows headers (GH-8472) https://github.com/python/cpython/commit/e6a4755e6793942b950c1595e0c34b

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-08-16 Thread INADA Naoki
INADA Naoki added the comment: New windows will support case sensitive filesystem too. Stop relying to case insensitive filesystem makes sense to me. -- ___ Python tracker <https://bugs.python.org/issue34

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-08-17 Thread INADA Naoki
INADA Naoki added the comment: I googled and checked what MSDN uses before I merged these PRs. For example: https://msdn.microsoft.com/ja-jp/library/bb394814.aspx -- ___ Python tracker <https://bugs.python.org/issue34

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-08-20 Thread INADA Naoki
INADA Naoki added the comment: I'm sorry about that. I won't merge PR like that next time. -- ___ Python tracker <https://bugs.python.org/issue34217> ___ __

[issue34487] enum _sunder_ names mix metaclass and enum class attributes

2018-08-27 Thread INADA Naoki
INADA Naoki added the comment: Is it really need to be documented? How is it important when using enum? If there are no problem, I prefer keeping it implementation detail and don't make document fatter. -- nosy: +inada.naoki ___ Python tr

[issue34355] SIGSEGV (Address boundary error)

2018-08-27 Thread INADA Naoki
INADA Naoki added the comment: I think so. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> int(s), float(s) and others may cause segmentation fault ___ Python tracker <https://bugs.python

[issue34538] Remove encouragement to author a base class for all Exception subclasses in a module

2018-08-29 Thread INADA Naoki
INADA Naoki added the comment: I agree with you. -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue34538> ___ ___ Python-bugs-list mailin

[issue34538] Remove encouragement to author a base class for all Exception subclasses in a module

2018-08-29 Thread INADA Naoki
INADA Naoki added the comment: > Also, it mirrors practices in the standard library (decimal.DecimalException > and sqlite3.DatabaseError). As Nathaniel said, "it's good idea in the particular circumstances of a particular module's implementation, but generally no

[issue34538] Remove encouragement to author a base class for all Exception subclasses in a module

2018-08-31 Thread INADA Naoki
INADA Naoki added the comment: I didn't claim this pattern is not used anymore. My point is "should we suggest this pattern for tutorial readers?" * Is this pattern recommended blindly? -- I think no. * How / when this pattern is recommended? -- When there is use case people

[issue34538] Remove encouragement to author a base class for all Exception subclasses in a module

2018-08-31 Thread INADA Naoki
INADA Naoki added the comment: > https://github.com/search?q=%22except+TemplateError%22&type=Code For example, I found flask_mako's TemplateException in this search result. Strictly speaking, this is not base exception class. It is wraps exception during template rendering. B

[issue34608] gc.get_referrers behavior change 3.6 to 3.7

2018-09-09 Thread INADA Naoki
INADA Naoki added the comment: Benjamin is right. This is very implementation detail. We shouldn't rely on such edge case. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https:

[issue34320] Creating dict from OrderedDict doesn't preserve order

2018-09-25 Thread INADA Naoki
INADA Naoki added the comment: > Perhaps another good test of the same thing would be with a metaclass that > returns an OrderedDict from __prepare__(): It is not relating to this issue: there are no conversion happened. Should I add the test in t

[issue34320] Creating dict from OrderedDict doesn't preserve order

2018-09-25 Thread INADA Naoki
INADA Naoki added the comment: Conversion is happens when type() (or metaclass()) is called. And I added test for it already. https://github.com/python/cpython/pull/8624/files#diff-7ba610fbe5686a1d67c5504312be4817R1977 Why regression test for this bugfix need to use __prepare__

[issue34320] Creating dict from OrderedDict doesn't preserve order

2018-09-25 Thread INADA Naoki
Change by INADA Naoki : -- dependencies: -Add tests for PEP 468 and PEP 520 resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-27 Thread INADA Naoki
Change by INADA Naoki : -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue34776> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34538] Remove encouragement to author a base class for all Exception subclasses in a module

2018-10-01 Thread INADA Naoki
INADA Naoki added the comment: Thanks, Nathaniel. I totally concur with you. This is tutorial section. We should focus on readers of the tutorial. -- ___ Python tracker <https://bugs.python.org/issue34

[issue30167] site.main() does not work on Python 3.6 and superior if PYTHONSTARTUP is set

2018-10-01 Thread INADA Naoki
INADA Naoki added the comment: New changeset d4c76d960b8b286b75c933780416ace9cda682fd by INADA Naoki in branch 'master': bpo-30167: Add test for module.__cached__ is None (GH-7617) https://github.com/python/cpython/commit/d4c76d960b8b286b75c933780416ac

[issue34871] test_site fails if run after test_inspect

2018-10-04 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +9083 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34871> ___ ___ Py

[issue28441] Change sys.executable to include executable suffix

2018-10-05 Thread INADA Naoki
INADA Naoki added the comment: New changeset 7a7693e9cb12e5571c76331db56a28eef9acb6e0 by INADA Naoki (E. M. Bray) in branch 'master': bpo-28441: Ensure `.exe` suffix in `sys.executable` on MinGW and Cygwin (GH-4348) https://github.com/python/cpyt

[issue28441] Change sys.executable to include executable suffix

2018-10-05 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 ___ Python tracker <https://bugs.python.or

[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-10-20 Thread INADA Naoki
INADA Naoki added the comment: I agree with Serhiy. For static hinting, `@property` should be enough. I think tools like mypy should support this pattern: class MyABC(metaclass=ABCMeta): @property @abstractmethod def myprop(self): ... class MyConcrete(MyABC

[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-23 Thread INADA Naoki
INADA Naoki added the comment: Is performance overhead negligible? -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue35053> ___ ___ Pytho

[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-10-25 Thread INADA Naoki
INADA Naoki added the comment: > I like the idea of using @functools.cached_property in an abstract class as > "documentation". To announce that the property will be cached, even if > technically it will not be cached. It's more to use the code as documentation &g

[issue35075] Doc: pprint example uses dead URL

2018-10-26 Thread INADA Naoki
New submission from INADA Naoki : https://mail.python.org/pipermail/docs/2018-October/037913.html Dead URL: http://pypi.org/project/Twisted/json Valid URL: https://pypi.org/pypi/Twisted/json But JSON returned by the valid URL seems too long for the example. Is there a better sample JSON we

[issue33578] cjkcodecs missing getstate and setstate implementations

2018-11-01 Thread INADA Naoki
INADA Naoki added the comment: New changeset 488c0a6cdf09e21774e63c2a430ecc0de804d147 by INADA Naoki (Christopher Thorne) in branch 'master': bpo-33578: Fix getstate/setstate for CJK decoder (GH-10290) https://github.com/python/cpython/commit/488c0a6cdf09e21774e63c2a430ecc

[issue35075] Doc: pprint example uses dead URL

2018-11-01 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue33462] reversible dict

2018-11-05 Thread INADA Naoki
INADA Naoki added the comment: New changeset 6531bf6309c8fda1954060a0fb5ea930b1efb656 by INADA Naoki (Rémi Lapeyre) in branch 'master': bpo-33462: Add __reversed__ to dict and dict views (GH-6827) https://github.com/python/cpython/commit/6531bf6309c8fda1954060a0fb5ea9

[issue33462] reversible dict

2018-11-05 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

<    18   19   20   21   22   23   24   25   26   27   >