INADA Naoki added the comment:
Before Python 3.6, instance.__dict__.pop(key) didn't trigger this.
But there are many way to trigger this. This bug is live from 3.3.
This script reproduce this issue on Python 3.5.
class C: pass
a = C()
a.a = 1
while True:
a.__dict__.popitem() # co
Changes by INADA Naoki :
Added file: http://bugs.python.org/file45963/call-method-doc4.patch
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bug
INADA Naoki added the comment:
LGTM
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/issue28383>
___
___
Python-bugs-list mailing list
Unsub
INADA Naoki added the comment:
I'll update this patch and #10401 and then run benchmark suite when I have time.
As far as I look quickly, #10401 uses namei as cache key
and this patch uses opcode index as cache key, am I right?
--
nosy: +inada.naoki
priority: critical ->
INADA Naoki added the comment:
I can't understand what's your problem.
> The inherent behaviour of python installations (local or global) is such that
> it expects to source system wide modules from the global python installation.
What local installation means?
What global in
Changes by INADA Naoki :
--
nosy: +inada.naoki
versions: +Python 3.7 -Python 3.6
___
Python tracker
<http://bugs.python.org/issue24165>
___
___
Python-bugs-list m
Changes by INADA Naoki :
Added file: http://bugs.python.org/file45968/fix-28147-py35-2.patch
___
Python tracker
<http://bugs.python.org/issue28147>
___
___
Python-bug
Changes by INADA Naoki :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
INADA Naoki added the comment:
Since `seq` is checked by PyDict_CheckExact(seq) already,
((PyDictObject*)seq)->ma_used may be better.
--
___
Python tracker
<http://bugs.python.org/issu
INADA Naoki added the comment:
> Actually, if you don't mind, I'd like to update the patch myself. I have a
> few ideas how to restructure it and add support for LOAD_ATTR.
Sounds interesting.
I'll wait to touch this patch. There are enough time by Python 3.7
and enou
INADA Naoki added the comment:
While the patch is trivial, I need LGTM from another comitter.
--
stage: -> patch review
Added file: http://bugs.python.org/file45974/fromkeys2.patch
___
Python tracker
<http://bugs.python.org/issu
Changes by INADA Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
INADA Naoki added the comment:
LGTM
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/issue28999>
___
___
Python-bugs-list mailing list
Unsub
INADA Naoki added the comment:
LGTM
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/issue28988>
___
___
Python-bugs-list mailing list
Unsub
INADA Naoki added the comment:
memo: http://bugs.python.org/issue26219 may be relating to this.
--
___
Python tracker
<http://bugs.python.org/issue28158>
___
___
INADA Naoki added the comment:
Performance version: 0.5.0
Python version: 3.7.0a0 (64-bit) revision 31df7d9863f3+
Report on Linux-4.8.0-30-generic-x86_64-with-debian-stretch-sid
Slower (13):
- nbody: 232 ms +- 3 ms -> 241 ms +- 6 ms: 1.04x slower
- unpack_sequence: 118 ns +- 3 ns -> 121 n
New submission from INADA Naoki:
Don't _PyObject_GC_TRACK(frame) before using it.
After evaluation is finished, do tracking only if refcnt is not one.
result without --enable-optimization:
$ ~/local/cpython/bin/pyperf compare_to default.json.gz patched.json.gz -G
Slowe
INADA Naoki added the comment:
--enable-optimizations:
$ ~/local/cpython/bin/pyperf compare_to -G default.json patched.json
Slower (12):
- pickle_dict: 42.0 us +- 0.2 us -> 42.9 us +- 0.2 us: 1.02x slower (+2%)
- regex_dna: 228 ms +- 1 ms -> 233 ms +- 2 ms: 1.02x slower (+2%)
- unpickl
Changes by INADA Naoki :
Added file: http://bugs.python.org/file46000/default.json.gz
___
Python tracker
<http://bugs.python.org/issue29049>
___
___
Python-bugs-list m
Changes by INADA Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
INADA Naoki added the comment:
(Rietveld shows 500 error when replying.)
> Minor style note: Use Py_REFCNT here to simplify?
Fixed when committing.
--
___
Python tracker
<http://bugs.python.org/issu
INADA Naoki added the comment:
> Please wrap private functions in #ifndef Py_LIMITED_API/#endif.
No problem. Whole Include/frameobject.h is wrapped by Py_LIMITED_API.
--
___
Python tracker
<http://bugs.python.org/issu
INADA Naoki added the comment:
1. remove `.. module:: hashlib` from Doc/library/hashlib-blake2.rst
2. merge Doc/library/hashlib-blake2.rst content into Doc/library/hashlib.rst
Hmm, which is better?
--
nosy: +inada.naoki
___
Python tracker
<h
INADA Naoki added the comment:
Is it a global state, or application specific state?
In other words, if Python enables VT100, doesn't it remain after os._exit(1)?
If it is global state of console, why Python should change it?
Shouldn't user who want to use VT100 enable it before start
INADA Naoki added the comment:
LGTM for re_cache_ordered_dict_popitem.patch
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/issue28293>
___
___
Changes by INADA Naoki :
Added file: http://bugs.python.org/file46038/29049-fix-generator-refleak.patch
___
Python tracker
<http://bugs.python.org/issue29049>
___
___
INADA Naoki added the comment:
> It seems to me, that the part with Py_DECREF should be pushed to older
> branches.
PyCoro_New() and PyGen_NewWithQualName() steals f reference, and DECREF when
error.
So Py_DECREF is not needed when (gen == NULL). My patch was
INADA Naoki added the comment:
I like currentmodule directive.
--
keywords: +patch
Added file: http://bugs.python.org/file46040/29062-currentmodule.patch
___
Python tracker
<http://bugs.python.org/issue29
Changes by INADA Naoki :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue29049>
___
___
Python-bugs-list mailing list
Unsubscrib
INADA Naoki added the comment:
I can't write long English document.
Can I quote Guido's mail instead?
--
keywords: +patch
Added file: http://bugs.python.org/file46041/faq-function-method.patch
___
Python tracker
<http://bugs.python.o
Changes by INADA Naoki :
--
components: +Library (Lib) -Extension Modules
stage: -> patch review
versions: +Python 3.6, Python 3.7 -Python 3.2, Python 3.3
Added file: http://bugs.python.org/file46042/10614-zipfile-encoding.patch
___
Python trac
Changes by INADA Naoki :
Removed file: http://bugs.python.org/file46042/10614-zipfile-encoding.patch
___
Python tracker
<http://bugs.python.org/issue10614>
___
___
Pytho
Changes by INADA Naoki :
Added file: http://bugs.python.org/file46043/10614-zipfile-encoding.patch
___
Python tracker
<http://bugs.python.org/issue10614>
___
___
Pytho
INADA Naoki added the comment:
Thanks. Patch posted in issue28080 looks better than mine.
--
stage: patch review ->
superseder: -> Allow reading member names with bogus encodings in zipfile
___
Python tracker
<http://bugs.python.org/i
Changes by INADA Naoki :
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/issue28080>
___
___
Python-bugs-list mailing list
Unsubscribe:
INADA Naoki added the comment:
LGTM
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/issue26787>
___
___
Python-bugs-list mailing list
Unsub
INADA Naoki added the comment:
fixed via https://hg.python.org/cpython/rev/adcd9131b7c6
--
nosy: +inada.naoki
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by INADA Naoki :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
INADA Naoki added the comment:
LGTM
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/issue29028>
___
___
Python-bugs-list mailing list
Unsub
INADA Naoki added the comment:
While section level of Module, Examples, and Credits is fixed,
https://docs.python.org/3/library/crypto.html seems still weird.
It looks like there are two `hashlib` modules.
Now I think hashlib-blake2 should be merged into hashlib.
--
resolution: fixed
INADA Naoki added the comment:
> That is because hashlib-blake2.rst is explicitly added to the TOC list in
> Doc/library/crypto.rst.
Yes. All rst should be explicitly added by `toctree` or `include`.
In this case, I feel there are no reason to use `include` directive
instead of mergi
INADA Naoki added the comment:
> INADA, 3.6 branch also suffers the problems here, I didn't see you patch it.
Oh, I'm sorry.
I'll update 3.6 branch in next time.
--
___
Python tracker
<http://bugs.
Changes by INADA Naoki :
Added file: http://bugs.python.org/file46051/merge-hashlib-blake2.patch
___
Python tracker
<http://bugs.python.org/issue29062>
___
___
Python-bug
INADA Naoki added the comment:
http://bugs.python.org/issue28427#msg284101
> Sidenote: all branches now have a different version of dict object each,
> which makes maintenance really painful...
Large difference between py36 and py37 is this patch.
Can I backport this to py36 t
INADA Naoki added the comment:
> It's the tutorial. Probably better to just leave it alone. Precise
> understanding can come later.
I agree.
Beginner should start using dict with builtin immutable type as key.
hashable is too complex at this point.
--
nosy: +
INADA Naoki added the comment:
> If precision is the problem, could it be reworded to be more vague?
"can be any immutable" seems vague enough to me. It doesn't say "cannot be any
mutable type.".
> Users are likely to assume documentation from any official so
INADA Naoki added the comment:
Update patch for Python 2.7
--
nosy: +inada.naoki
versions: +Python 3.7 -Python 3.6
Added file: http://bugs.python.org/file46063/listobject_CPython2-2.patch
___
Python tracker
<http://bugs.python.org/issue26
Changes by INADA Naoki :
Added file: http://bugs.python.org/file46066/listobject_CPython3-2.patch
___
Python tracker
<http://bugs.python.org/issue26382>
___
___
Python-bug
INADA Naoki added the comment:
I know PyMem and PyObject allocator is same by default. But it's configurable.
How should I choose right allocator?
--
___
Python tracker
<http://bugs.python.org/is
INADA Naoki added the comment:
Maybe, PyObject_MALLOC remains only for backward compatibility?
--
___
Python tracker
<http://bugs.python.org/issue26382>
___
___
INADA Naoki added the comment:
OK. I didn't know PyMem and PyObject allocators are always same.
No reason to change Python 3.
How about Python 2?
Off topic: I want to know which of PyMem and PyObject allocator is preferred
when writing new code.
--
versions: -Pytho
INADA Naoki added the comment:
May I commit merge-hashlib-blake2.patch to 3.6 branch?
--
___
Python tracker
<http://bugs.python.org/issue29062>
___
___
Python-bug
INADA Naoki added the comment:
I read PEP 538 but I can't understand why just using UTF-8 when locale is C
like macOS is bad idea.
--
___
Python tracker
<http://bugs.python.org/is
INADA Naoki added the comment:
I prefer ".inplace_translate" to ".mtranslate", but I'm not sure about it's
worth enough to add it to bytearray.
In last year, I proposed adding `bytes.frombuffer()` constructor to avoid
unnecessary memory copy.
https://mail.python
INADA Naoki added the comment:
> That isn't the case on other *nix systems - there, we need CPython to be
> consistent with the configured C/C++ locale, *and* we need it to be using
> something other than ASCII as the default encoding.
Isn't using UTF-8 as filesystem encodi
INADA Naoki added the comment:
I'm sorry.
I must search old discussion about why we can't simply use utf-8
for fsencoding when C locale, instead of asking here.
--
___
Python tracker
<http://bugs.python.o
Changes by INADA Naoki :
--
keywords: +patch
Added file: http://bugs.python.org/file46147/29159-index-fallback.patch
___
Python tracker
<http://bugs.python.org/issue29
INADA Naoki added the comment:
On Linux, I think most people wants UTF-8:surrogateescape by default, without
fighting against locale and environment variables.
There are already `#if defined(__APPLE__) || defined(__ANDROID__)` path for it.
How about adding configure option to use same logic
INADA Naoki added the comment:
@belopolsky
It is backported behavior from Python 3.5, to fix regression.
See code review discussion in #27704.
The first patch kept the behavior, but we simplified it in second patch.
That cause this regression
New submission from INADA Naoki:
https://docs.python.org/2.7/extending/newtypes.html#the-basics uses
PyObject_HEAD_INIT for type object header.
static PyTypeObject noddy_NoddyType = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
This code isn't compatible
INADA Naoki added the comment:
> Anything purely on the Python side of things doesn't work in a traditional C
> environment - CPython relies on the C lib to do conversions during startup,
> so we need the C locale to be set correctly.
What I propose is non't use mbstowc
INADA Naoki added the comment:
Why I want to add configure option to ignore locale is:
1. C.UTF-8 is not supported by RHEL7
(https://bugzilla.redhat.com/show_bug.cgi?id=1361965)
RHEL7 will be used for a long time.
And many people uses new Python instead of distro's Python, via pye
INADA Naoki added the comment:
> patch LGTM except that arguments of assertEqual are in reversed order.
fixed.
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python
New submission from INADA Naoki:
# Summary
## 1. Making bytes from slice of bytearray easy and efficient.
bs = bytes(memoryview(bytelike)[start:end]) works fine on CPython,
but it will cause issue on PyPy.
Since memoryview is not closed explicitly, exception like
"BufferError: Exi
INADA Naoki added the comment:
>> stderr is used to log errors. Getting a new error when trying to log
>> an error is kind of annoying.
>
> Hm, what bad surprise/error could appear that would not appear with
> backslashescape?
$ cat badfilename.py
badfn = "こんにちは&quo
INADA Naoki added the comment:
> I'm -1 if the intention is about easiness and efficiency.
Do you +1 when adding it to stdlib (say "bufferlib")?
> Creating a memoryview is not cheap enough in such a case.
Actually speaking, it's 5 calls + 2 temporary memoriview.
INADA Naoki added the comment:
Updated the patch for default branch.
--
versions: +Python 3.7 -Python 3.6
Added file: http://bugs.python.org/file46204/set_encoding-7.patch
___
Python tracker
<http://bugs.python.org/issue15
INADA Naoki added the comment:
You're right! How difficult working with memoryview!
> The memoryview constructor could take start, stop, and step keyword-only
> arguments to avoid having to immediately slice a new view.
Maybe, memoryview.to_bytes() is better place to add s
INADA Naoki added the comment:
> I'm wondering why new dict implementation don't keep the array of items
> compact? Original Raymond's implementation did not preserve the order after
> deletions, but saved items in an array without gaps. This could simplify and
>
INADA Naoki added the comment:
patch LGTM.
> Since the table is usually dense packed to the left, this will give fewer
> loops and fewer memory accesses.
Since dk_nentries is "right end of active entries", this patch doesn't
affect for "dence packed to the left&quo
INADA Naoki added the comment:
While this isn't bugfix, I'm +1 to commit this to 3.6 branch to reduce
future maintenance cost.
--
___
Python tracker
<http://bugs.python.o
INADA Naoki added the comment:
LGTM
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/issue28969>
___
___
Python-bugs-list mailing list
Unsub
INADA Naoki added the comment:
I had not read the patch carefully when updating.
Now I'm reading pure Python part of the patch.
For writing side, this patch is very simple.
For reading side, this patch is very complex, because TextIOWrapper.tell()
and .seek() is complex already.
How
INADA Naoki added the comment:
This patch doesn't change current behavior of "decode by chunk".
It's difficult to support changing encoding via header, like
Python's encoding cookie.
>>> import io
>>> buff = io.BytesIO("hello\nこんにちは".enc
INADA Naoki added the comment:
> Inada, I think you messed up the positioning of bits of the patch. E.g. there
> are now test methods declared > inside a helper function (rather than a test
> class).
I'm sorry. `patch -p1` merged previous patch into wrong place, and test p
INADA Naoki added the comment:
set_encoding-8.patch dropped support of changing encoding after read.
It is based on set_encoding-newline.patch
--
Added file: http://bugs.python.org/file46259/set_encoding-8.patch
___
Python tracker
<h
Changes by INADA Naoki :
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/issue29240>
___
___
Python-bugs-list mailing list
Unsubscribe:
INADA Naoki added the comment:
> Hum, pep540-3.patch doesn't work if the locale encoding is different than
> ASCII and UTF-8. argv must be reencoded:
I want to skip reencoding.
On UTF-8 mode, arbitrary bytes in cmdline (e.g. broken filename passed by xarg)
should be able to roundtr
INADA Naoki added the comment:
How about locale.getpreferredencoding() returns 'utf-8' in utf8 mode?
--
___
Python tracker
<http://bugs.python.o
INADA Naoki added the comment:
@christian.heimes Would you look merge-hashlib-blake2.patch?
This is blocker of our document translation project.
--
___
Python tracker
<http://bugs.python.org/issue29
INADA Naoki added the comment:
Thanks.
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
INADA Naoki added the comment:
https://www.python.org/dev/peps/pep-0007/#c-dialect says
"designated initializers (especially nice for type declarations)"
So I think it's allowed explicitly.
To minimize diff, I think we can start using it when adding
slot at bottom of type
INADA Naoki added the comment:
LGTM
--
___
Python tracker
<http://bugs.python.org/issue29271>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
INADA Naoki added the comment:
This is proof of concept patch to support LOAD_METHOD & CALL_METHOD for
METH_FASTCALL methods.
(This patch should be applied after fastcall.patch)
$ ./python -m perf timeit --compare-to `pwd`/python-fastcall -s "d = b''" --
&quo
INADA Naoki added the comment:
Maybe, we should do
* Make clinic use more METH_FASTCALL
* Use clinic more in builtin methods
before trying this optimization.
--
___
Python tracker
<http://bugs.python.org/issue29
INADA Naoki added the comment:
1. _PyCFunction_FastCallKeywords() calls _PyStack_AsDict(), then calls
_PyCFunction_FastCallDict().
2. _PyCFunction_FastCallDict() calls _Py_FastCall_FromArgs() when METH_FASTCALL.
3. _Py_FastCall_FromArgs() calls _PyStack_UnpackDict(), then calls fastcall().
Can
INADA Naoki added the comment:
Martin, thank you for pointing it out.
I hadn't know about suspicious check.
--
___
Python tracker
<http://bugs.python.org/is
Changes by INADA Naoki :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue29062>
___
___
Python-bugs-list mailing list
Unsubscrib
INADA Naoki added the comment:
I've created pull request about it:
https://github.com/haypo/cpython/pull/1
--
___
Python tracker
<http://bugs.python.org/is
INADA Naoki added the comment:
Updated patch for unicodeobject.
@taleinat, could you confirm it?
--
nosy: +inada.naoki
Added file: http://bugs.python.org/file46292/unicodeobject.c.v6.patch
___
Python tracker
<http://bugs.python.org/issue20
INADA Naoki added the comment:
transmogrify.h uses hack to share docstring.
I can't find straightforward way.
--
___
Python tracker
<http://bugs.python.org/is
INADA Naoki added the comment:
Isn't it a OOM killer?
How much memory your machine has?
How about make -j4? (you can use number of cores instead of 4).
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/is
INADA Naoki added the comment:
Yury, could you review this?
--
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bugs-list mailing list
Unsub
INADA Naoki added the comment:
I feel this is a problem of balance between speed and debugger usability.
I prefer default to -Og because:
* It's recommended by gcc for this purpose.
* --pydebug option is not only for gdb. I use debug build to run various
programs with many assertion.
Yo
INADA Naoki added the comment:
LGTM
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/issue29029>
___
___
Python-bugs-list mailing list
Unsub
INADA Naoki added the comment:
Serhiy Storchaka, would you review again?
Merging unicodeobject.c.v5.patch into default branch was almost straightforward.
But there was one place I should rewrite. Here is the part of diff -u v5.patch
v6.patch
-- is old docstring w/o AC
+- is current docstring
Changes by INADA Naoki :
Added file: http://bugs.python.org/file46294/call-method-doc5.patch
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bug
Changes by INADA Naoki :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by INADA Naoki :
Added file: http://bugs.python.org/file46297/unicodeobject.c.v7.patch
___
Python tracker
<http://bugs.python.org/issue20180>
___
___
Python-bug
INADA Naoki added the comment:
Thank you, Martin and Serhiy.
As http://bugs.python.org/issue20180#msg247987 , remained module to converted
is transmogrify.h.
But docstrings of methods in transmogrify.h were moved to bytes_methods.c in
issue26765.
May I close this issue for now
2401 - 2500 of 3039 matches
Mail list logo