Change by INADA Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from INADA Naoki :
After 2aaf0c, _Py_REF_DEBUG_COMMA in Include/object.h is used only in
dictobject.c. Let's remove it.
--
messages: 329833
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: Remove _Py_REF_DEBUG_
INADA Naoki added the comment:
I meant 2aaf0c1.
--
___
Python tracker
<https://bugs.python.org/issue35230>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by INADA Naoki :
--
keywords: +patch
pull_requests: +9773
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35230>
___
___
Py
INADA Naoki added the comment:
New changeset a757649fd6535c5e65481eb1077e30687421b92b by INADA Naoki in branch
'master':
bpo-35230: dict: Remove some macros (GH-10513)
https://github.com/python/cpython/commit/a757649fd6535c5e65481eb1077e30
Change by INADA Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
INADA Naoki added the comment:
New changeset c2ccac7b9f9a1132ca36255b0ddfeecef4371aa3 by INADA Naoki (Andrés
Delfino) in branch 'master':
bpo-33816: Remove outdated metaclass example (GH-7566)
https://github.com/python/cpython/commit/c2ccac7b9f9a1132ca36255b0ddfeecef4371aa3
-
INADA Naoki added the comment:
I want to hear mypy developer's comment.
--
nosy: +gvanrossum, levkivskyi
___
Python tracker
<https://bugs.python.org/is
INADA Naoki added the comment:
> Guido van Rossum added the comment:
>
> This is runtime behavior, mypy doesn't care either way. It triggers on the
> presence of the decorator, not on what attributes it sets at runtime on the
> object.
>
>
But it's only motivat
Changes by INADA Naoki :
--
nosy: +naoki
___
Python tracker
<http://bugs.python.org/issue15216>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from INADA Naoki:
When I run following script:
def uncalled():
x = b'x' * (2**32)
print('Hello')
Python 3.4 consumes huge memory in spite of uncalled() function isn't called.
$ /usr/bin/time -l /usr/local/bin/python2 constant_folding.py
Hello
INADA Naoki added the comment:
For example. I want to write test like this:
@unittest.skip("This test requires huge memory")
def test_largebuf():
client = self.create_client()
data = b'x' * (2**32 - 1)
client.send(data)
--
__
INADA Naoki added the comment:
Maybe, shutil.copyfileobj() is good.
import gzip
import shutil
with open(src, 'rb') as f_in:
with gzip.open(dst, 'wb') as f_out:
shutil.copyfileobj(f_in, f_out)
--
nosy: +naoki
___
P
Changes by INADA Naoki :
--
nosy: +naoki
___
Python tracker
<http://bugs.python.org/issue10614>
___
___
Python-bugs-list mailing list
Unsubscribe:
INADA Naoki added the comment:
Could someone review this?
While this is not a regression or bug, I think this is an important
feature when writing HTTP clients.
--
nosy: +naoki
___
Python tracker
<http://bugs.python.org/issue19
New submission from INADA Naoki:
http://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator
> ABC for classes that provide the __iter__() and next() methods.
"next()" should be "__next__()" for Python 3.
--
assignee: docs@python
co
New submission from INADA Naoki:
http://docs.python.org/3.3/reference/datamodel.html#object.__reversed__
> Objects that support the sequence protocol should only provide
> __reversed__() if they can provide an implementation that is more efficient
> than the one provided by
New submission from INADA Naoki:
http://docs.python.org/3.3/glossary.html#term-sequence
__getitem__ and __len__ are required for sequence type.
(__iter__ is not required because types having __getitem__ are already
iterator.)
.__contains__(), .index() and .count() is not required for sequence
INADA Naoki added the comment:
In Python 3.3:
In [33]: issubclass(Foo, collections.abc.Sequence)
Out[33]: False
--
___
Python tracker
<http://bugs.python.org/issue16
INADA Naoki added the comment:
I think PySequence_Check() has same problem.
OTOH, mapping definition says:
> A container object that supports arbitrary key lookups and implements the
> methods specified in the Mapping or MutableMapping abstract base classes.
- http://docs.python.o
INADA Naoki added the comment:
Thanks, Nick.
I see that the "sequence" doesn't have strict definition.
Though, I think collections.abc module's document should describe
this manner. For example:
"But checking type with these abc may be too strict for most case.
For e
INADA Naoki added the comment:
So, I feel the 2nd meaning of "sequence" should be
collections.abc.(Mutable)Sequence.
"sequence types in stdlib" have richer API then the ABC. (e.g. comparison, +,
*, etc...)
They are "APIs that sequence may have" but not
INADA Naoki added the comment:
And nice symmetry with mapping entry.
--
___
Python tracker
<http://bugs.python.org/issue16728>
___
___
Python-bugs-list mailin
INADA Naoki added the comment:
I believe that using Sequence ABC as mix-in is recommended when implementing
custom sequence.
But mixing-in it violates "should only provide __reversed__() if they can
provide an implementation that is more efficient than the one
provided by rev
INADA Naoki added the comment:
__contains__ is required for Container.
So there is a clear reason to define it.
Additionaly,
http://docs.python.org/3.3/reference/datamodel.html#object.__contains__
doesn't discourage to implement slower pure-python method.
In case of __reversed__, I can
New submission from INADA Naoki:
http://docs.python.org/3.3/library/unittest.mock-examples.html#coping-with-mutable-arguments
"coping" should be "copying"?
--
assignee: docs@python
components: Documentation
messages: 207409
nosy: docs@python, naoki
priority: nor
New submission from INADA Naoki:
http://docs.python.org/3.3/library/unittest.mock-examples.html#mocking-chained-calls
> Let’s assume the object it returns is ‘file-like’, so we’ll ensure that our
> response object uses the builtin file as its spec.
and
> >>> mock_respons
New submission from INADA Naoki:
http://docs.python.org/3.3/library/xml.html#xml-vulnerabilities
> DTD retrieval
> Some XML libraries like Python’s mod:’xml.dom.pulldom’ retrieve document
mod: should be :mod:
--
assignee: docs@python
components: Documentation
messages: 20801
New submission from INADA Naoki:
http://docs.python.org/3.3/library/xml.html#defused-packages
"The courses of action are recommended for any server code that parses
untrusted XML data."
What this sentence means?
What "The courses" is?
--
assignee: do
New submission from INADA Naoki:
http://docs.python.org/3.3/library/ipaddress.html#ipaddress.IPv4Address.is_unspecified
> True if the address is unspecified. See RFC 5375 (for IPv4) or RFC 2373
> (for IPv6).
RFC 5375 is "IPv6 Unicast Address Assignment Con
INADA Naoki added the comment:
Is it 5735 ?
Next sentence may be wrong, too.
> True if the address is otherwise IETF reserved.
Is it "True if the address is IETF reserved." ?
--
___
Python tracker
<http://bugs.pytho
New submission from INADA Naoki:
> http://docs.python.org/3.3/library/ipaddress.html#ipaddress.IPv4Network.broadcast_address
Wrong attribute name: s/host mask/hostmask/
--
assignee: docs@python
components: Documentation
messages: 208078
nosy: docs@python, naoki
priority: nor
New submission from INADA Naoki:
http://docs.python.org/3.3/library/unittest.mock.html#magic-mock
> The two equality method, __eq__ and __ne__, are special. They do the default
> equality comparison on identity, using a side effect, unless you change their
> return value to return
New submission from INADA Naoki:
http://docs.python.org/3.3/library/socket.html#socket.getaddrinfo
> Changed in version 3.2: parameters can now be passed as single keyword
> arguments.
What *single* means?
I can use multiple keyword arguments:
In [3]: socket.getaddrinfo('www.pyth
New submission from INADA Naoki:
http://docs.python.org/3/library/base64.html
> The modern interface supports encoding and decoding ASCII byte string objects
> using all three alphabets.
What "all three alphabets" means?
I think it is about *altchars*. But the sentence is
INADA Naoki added the comment:
Here's patch.
--
keywords: +patch
Added file: http://bugs.python.org/file34272/base64.patch
___
Python tracker
<http://bugs.python.org/is
New submission from INADA Naoki :
http://docs.python.org/dev/library/simplexmlrpcserver.html#SimpleXMLRPCServer.SimpleXMLRPCServer
bind_and_activate parameter is described but not defined in directive.
--
messages: 105803
nosy: naoki
priority: normal
severity: normal
status: open
title
Changes by INADA Naoki :
--
assignee: -> d...@python
components: +Documentation
nosy: +d...@python
versions: +Python 2.6, Python 2.7
___
Python tracker
<http://bugs.python.org/iss
New submission from INADA Naoki :
http://docs.python.org/dev/library/test.html#test.test_support.captured_stdout
"This is a context manager than runs the with statement body using a
StringIO.StringIO object as sys.stdout."
I think "than" is typo of "that".
--
New submission from INADA Naoki :
http://docs.python.org/dev/whatsnew/2.7.html#new-and-improved-modules
"The XML-RPC client and server, provided by..." appears twice.
--
assignee: d...@python
components: Documentation
messages: 106875
nosy: d...@python, naoki
priority: norma
INADA Naoki added the comment:
I agree to close this bug without fix.
I hope that Python3 will be mainstream soon.
--
___
Python tracker
<http://bugs.python.org/issue7
INADA Naoki added the comment:
>What do you mean by "mainstream"? Python3 is available in Ubuntu (since
>Karmic), Fedora 13, Mandriva 2010.0, Gentoo, Debian (only Sid for now), ...
It means most of Pythonista uses Python3 rather than Python2 and
most of libraries supports Pyt
INADA Naoki added the comment:
Elvis agreed to add "Other Improvements" section.
(http://bugs.python.org/issue28635#msg281486)
Here is new patch.
--
Added file: http://bugs.python.org/file45608/vervose-version-doc2.patch
___
Python trac
Changes by INADA Naoki :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
INADA Naoki added the comment:
I can't get same C traceback yet.
But attached script segfaults by different C traceback.
I think this issue is dup of #1856
--
Added file: http://bugs.python.org/file45624/28673-reproduce.py
___
Python tracker
INADA Naoki added the comment:
I'm sorry, I had uploaded script with wrong parameter.
Additionally, this script fails by chance.
$ while true; do python2 28673-reproduce2.py || break; echo -n .; done
.Segmentation fault (core dumped)
--
Added file: http://bugs.python.org/file
INADA Naoki added the comment:
Python 3 would have #21963 too. If we can fix it, we can fix this issue
too.
--
___
Python tracker
<http://bugs.python.org/issue28
INADA Naoki added the comment:
This script can cause deadlock on Python 3.6.
1. Other threads can register traceback to sys module after sys module dict is
cleaned up.
2. In Py_Finalize, __del__ method of arbitrary object in the traceback can be
called.
3. The __del__ method calls
INADA Naoki added the comment:
> Where *exactly*?
See attached patch.
But python with this patch can deadlock in other state. Main thread wait GIL
but no other living threads have GIL. It seems caused by other issue around
finalization and multithreading.
> Py_FinalizeEx() first
New submission from INADA Naoki:
While investigating #28673, I found another deadlock relating to finalization
and threading.
deadlocked thread (holding gil / waiting head_mutex):
#0 0x7f35dd400a07 in futex_abstimed_wait_cancelable (private=0,
abstime=0x0, expected=0, futex_word
New submission from INADA Naoki:
This patch reduces indirect access to improve readability.
benchmark:
Slower (14):
- logging_format: 29.9 us +- 2.7 us -> 31.2 us +- 2.8 us: 1.04x slower
- scimark_monte_carlo: 227 ms +- 5 ms -> 235 ms +- 16 ms: 1.03x slower
- dulwich_log: 149 ms +- 10 ms
INADA Naoki added the comment:
> Can you make the patch without the unnecessary variable name change from
> "value_addr" to "pvalue". The former name is more communicative and is
> self-describing.
Done.
I have changed the variable name to distinguish `PyObje
New submission from INADA Naoki:
This patch delays initialization of dk_entries.
Entries are initialized when first use (when dk_netries is incremented).
Minimum dk_entries of 64bit arch is 5 * 8 * 3 = 120bytes.
So it can save 4 cache lines!
I'm running benchmark for now.
--
ass
INADA Naoki added the comment:
$ ./python-default -m perf compare_to default.json patched.json -G
Slower (2):
- xml_etree_iterparse: 328 ms +- 26 ms -> 350 ms +- 29 ms: 1.07x slower
- fannkuch: 1.58 sec +- 0.09 sec -> 1.65 sec +- 0.09 sec: 1.05x slower
Faster (9):
- scimark_sor: 870 ms
Changes by INADA Naoki :
Added file: http://bugs.python.org/file45699/default.json.gz
___
Python tracker
<http://bugs.python.org/issue28832>
___
___
Python-bugs-list m
INADA Naoki added the comment:
I ran pyperformance again on more large machine (Azure D2 -> D4) for more
robust result.
$ ./python-default -m perf compare_to default.json.gz patched.json.gz -G
Slower (4):
- xml_etree_generate: 425 ms +- 18 ms -> 442 ms +- 19 ms: 1.04x slower
- call_
INADA Naoki added the comment:
> I think that clearing 120 bytes at a time is faster than clear it later
> entry-by-entry.
Ah, my word was wrong. This patch skips zero clear entirely.
In pseudo code:
// When allocating PyDictKeyObject.
- memset(dk_entries, 0, sizeof(dk_entries));
/
INADA Naoki added the comment:
(reopen the issue to discuss about using Argument Clinic)
--
resolution: rejected ->
status: closed -> open
___
Python tracker
<http://bugs.python.org/i
INADA Naoki added the comment:
> That leads into my main comment on the AC patch: the files that are
> explicitly listed as triggering a new clinic run should be factored out into
> a named variable and that list commented accordingly.
done.
--
Added file: http://bugs.p
INADA Naoki added the comment:
I think external cache system introduces more complexity and startup overhead
than AC.
I think functools is the only "very common" module using namedtuple, because
`functools.wraps()` is used to create decorator functions.
But if general soluti
Changes by INADA Naoki :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12660>
___
___
Python-bugs-list
INADA Naoki added the comment:
3.6 branch is reopened
--
___
Python tracker
<http://bugs.python.org/issue28770>
___
___
Python-bugs-list mailing list
Unsubscribe:
INADA Naoki added the comment:
3.6rc1 is released.
What is status of this issue?
--
___
Python tracker
<http://bugs.python.org/issue28328>
___
___
Python-bug
Changes by INADA Naoki :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue28731>
___
___
Python-bugs-list
INADA Naoki added the comment:
It had been rolled back.
https://hg.python.org/cpython/rev/9dce0e41bedd
Can we close this issue? #27181 is still open.
--
___
Python tracker
<http://bugs.python.org/issue28
INADA Naoki added the comment:
dict has ma_version for now.
@haypo, how do you think about this patch?
Would you reimplement global cache? Or may I update this patch?
--
versions: +Python 3.7 -Python 3.3
___
Python tracker
<http://bugs.python.
INADA Naoki added the comment:
@rhettinger, could you review simplify-lookdict2.patch?
--
assignee: -> rhettinger
___
Python tracker
<http://bugs.python.org/issu
Changes by INADA Naoki :
--
assignee: rhettinger ->
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue28818>
___
___
INADA Naoki added the comment:
Thank you for review. And I'm sorry about I committed the patch
before seeing last comment.
--
___
Python tracker
<http://bugs.python.org/is
Changes by INADA Naoki :
--
versions: +Python 3.7 -Python 3.6
Added file: http://bugs.python.org/file45786/call_method_4.patch
___
Python tracker
<http://bugs.python.org/issue26
INADA Naoki added the comment:
$ ./python-default -m perf compare_to default.json callmethod4.json -G
Slower (7):
- pickle_dict: 66.0 us +- 4.6 us -> 77.0 us +- 5.9 us: 1.17x slower
- json_loads: 63.7 us +- 0.7 us -> 68.4 us +- 1.4 us: 1.07x slower
- unpack_sequence: 120 ns +- 2 ns -&g
Changes by INADA Naoki :
Added file: http://bugs.python.org/file45788/callmethod4.json.gz
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bugs-list m
INADA Naoki added the comment:
> Ned Deily added the comment:
>
> This issue seems to have slipped through. Should it be a release blocker for
> 3.6.0 final or can it wait for 3.6.1?
On Python 3.5, instance.__dict__.popitem() cause this issue.
On Python 3.6, instance.__dict__.p
INADA Naoki added the comment:
Which revision should I make patch based on? 3.6 branch? or 3.6rc1 tag?
After 3.6rc1 is tagged, I pushed optimization which contains same one line
change.
https://hg.python.org/cpython/rev/d03562dcbb82
-#define ESTIMATE_SIZE(n) (((n)*3) >> 1)
+#
INADA Naoki added the comment:
Here is patch for Python 3.6.
--
Added file: http://bugs.python.org/file45796/fix28147-py36.patch
___
Python tracker
<http://bugs.python.org/issue28
Changes by INADA Naoki :
Added file: http://bugs.python.org/file45797/fix28147-py36-2.patch
___
Python tracker
<http://bugs.python.org/issue28147>
___
___
Python-bug
INADA Naoki added the comment:
While dict is ordered, it doesn't support O(1) random access by index.
--
nosy: +inada.naoki
___
Python tracker
<http://bugs.python.org/is
INADA Naoki added the comment:
http://bugs.python.org/issue28894 was duplicate of this issue.
Since real world program suffered by this, I'm +1 to fix this by 3.6.0
--
___
Python tracker
<http://bugs.python.org/is
Changes by INADA Naoki :
--
nosy: +Julien.Palard, JulienPalard
___
Python tracker
<http://bugs.python.org/issue28331>
___
___
Python-bugs-list mailing list
Unsub
Changes by INADA Naoki :
--
stage: patch review -> resolved
___
Python tracker
<http://bugs.python.org/issue28818>
___
___
Python-bugs-list mailing list
Un
Changes by INADA Naoki :
--
dependencies: +"CPython implementation detail:" removed when content translated
___
Python tracker
<http://bugs.python.o
INADA Naoki added the comment:
Sorry for confusing.
I didn't meant defaulting LANG=C.UTF-8.
I meant use UTF-8 as default fsencoding, stdioencoding regardless locale,
and locale.getpreferredencoding() returns 'utf-8' when LC
Changes by INADA Naoki :
Added file: http://bugs.python.org/file45866/call_method_5.patch
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bugs-list m
INADA Naoki added the comment:
> Technically the patch LGTM. But we should find the cause of the regression in
> some benchmarks.
The benchmark is on Sandy Bridge (Core i5 2400) and I didn't use PGO build.
perf_event reported branch-miss rate increase at cpickle's save funct
INADA Naoki added the comment:
> And would be nice to extend the optimization to C functions.
I tried it but skipping creating PyCFunction seems impossible for now.
My current idea is adding new `tp_fastcall` slot which has same signature
to _PyFunction_FastCallDict
INADA Naoki added the comment:
I didn't know about PyObject_VAR_HEAD much.
The comment of the macro says:
/* PyObject_VAR_HEAD defines the initial segment of all variable-size
* container objects. These end with a declaration of an array with 1
* element, but enough space is malloc&
INADA Naoki added the comment:
I'm working on changing stack layout slightly
current patch: callable | NULL | arg1 | ...argN
next patch will: NULL | callable | arg1 | ...argN
After benchmark with PGO build, I'll post it.
--
___
Pyth
INADA Naoki added the comment:
I haven't noticed the patch is committed already.
Changing stack layout slightly is for easy to document, not for performance.
Please don't close this issue until adding document in Doc/library/dis.rst
--
Changes by INADA Naoki :
Added file: http://bugs.python.org/file45888/patched.json.gz
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bugs-list m
INADA Naoki added the comment:
PGO benchmark result
https://gist.github.com/methane/64ab60c38324423ef27af70cc6db1dfd
--
Added file: http://bugs.python.org/file45887/default.json.gz
___
Python tracker
<http://bugs.python.org/issue26
INADA Naoki added the comment:
This patch modify stack layout slightly and adds document in Doc/library/dis.rst
--
Added file: http://bugs.python.org/file45889/callmethod-doc.patch
___
Python tracker
<http://bugs.python.org/issue26
Changes by INADA Naoki :
Added file: http://bugs.python.org/file45890/callmethod-doc2.patch
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bug
Changes by INADA Naoki :
Removed file: http://bugs.python.org/file45890/callmethod-doc2.patch
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bug
Changes by INADA Naoki :
Added file: http://bugs.python.org/file45891/callmethod-doc2.patch
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bug
Changes by INADA Naoki :
Added file: http://bugs.python.org/file45896/callmethod-doc3.patch
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bug
INADA Naoki added the comment:
> Fixed fromkeys() in Py2.7. Stills needs to be forward ported to 3.4/3.5.
dict.fromkeys() is fixed already in 3.6+.
dict(l) doesn't presize the dict. If it's desirable, let's create a new issue.
--
nosy: +inada.naoki
resolution: -&g
Changes by INADA Naoki :
--
keywords: +patch
Added file: http://bugs.python.org/file45909/encoding_normalize_optimize.patch
___
Python tracker
<http://bugs.python.org/issue11
Changes by INADA Naoki :
Added file: http://bugs.python.org/file45910/fix28147-py36-3.patch
___
Python tracker
<http://bugs.python.org/issue28147>
___
___
Python-bug
INADA Naoki added the comment:
This patch updates the comment.
--
Added file: http://bugs.python.org/file45911/fix28147-comment-update.patch
___
Python tracker
<http://bugs.python.org/issue28
INADA Naoki added the comment:
Oh, I'm sorry. It seems I had failed to push the commit yesterday.
--
___
Python tracker
<http://bugs.python.org/is
2301 - 2400 of 3039 matches
Mail list logo