New submission from Inada Naoki :
I think the UTF-8 mode is very useful for Windows users.
Let's add section for the UTF-8 mode in the using/windows.
--
assignee: docs@python
components: Documentation
messages: 359722
nosy: docs@python, inada.naoki
priority: normal
severity: normal
Inada Naoki added the comment:
Does the name "locale.localize" have some origin?
I feel the name doesn't represent well about it is for formatting numeric based
on LC_NUMERIC.
--
nosy: +inada.naoki
___
Python tracker
<https://bu
Inada Naoki added the comment:
> The tutorial currently mentions its special role only briefly [7], saying:
>
>> * The installation-dependent default.
>
> We should explain that part. I'll give it a shot replacing my earlier
> proposal.
I don't think so. At there,
Inada Naoki added the comment:
It is tempting that putting some paragraphs to the tutorial when you think
"this should be documented!" but there is no good place in the library
reference.
HOWTOs is the document for advanced topics. But it doesn't cover wide area
yet. There i
Inada Naoki added the comment:
New changeset ca94677a6216e2d41b04574986ce49d31a0b329c by Inada Naoki in branch
'master':
bpo-38623: Doc: Add section for site module CLI. (GH-17858)
https://github.com/python/cpython/commit/ca94677a6216e2d41b04574986ce49d31a0b329c
Change by Inada Naoki :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue37537>
___
Inada Naoki added the comment:
> I've tried writing some Python code to reproduce this bug, but I'm unable to
> -- I should be missing something. Is there a simple snippet showing the
> issue?
Note that this is a bug from long ago. Why this bug had lived long is it can
n
Inada Naoki added the comment:
> There is a specific question this change attempts to answer: "Where is the
> module I imported located in the file system?"
So `print(the_module.__file__)` is better answer. (or `pip list -v` if the
module is third party package installed vi
Change by Inada Naoki :
--
pull_requests: +17278
pull_request: https://github.com/python/cpython/pull/17858
___
Python tracker
<https://bugs.python.org/issue38
Inada Naoki added the comment:
There is a document about it in Doc/library/site.rst already.
I'm not sure this should be documented in the tutorial.
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue38
Inada Naoki added the comment:
I can not get what you say. If "unicodedata.normalize() produces the correct
sequence", isn't it just a your terminal behavior?
If you think it is Python's issue, could you be more specific and write a
simple sample code?
--
nosy: +i
Inada Naoki added the comment:
If we support more types by default, user can not customize serialization of
the type using `default` option.
That's why we don't accept "any iterable" but only list and tuple.
--
nosy: +inada.naoki
Change by Inada Naoki :
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue39196>
___
___
Inada Naoki added the comment:
> ProcessPoolExecutor does not properly spin down and spin up new processes.
It is because Process "Pool" is for reusing processes.
If you don't want to reuse process, you can use the Process.
https://docs.python.org/3/library/multiprocessing.htm
Inada Naoki added the comment:
> (slowdowns because releasing/acquiring the GIL is not free, particularly when
> contended)
Yes, it's relatively high. We shouldn't release the GIL only for ~0.5ms.
That's why 1MB~ seems nice threshold.
> If the threshold is too low then users c
Inada Naoki added the comment:
> In the single-threaded case, the benchmark seems to show that for 64K+,
> performance is improved by dropping the GIL (which I'm guessing must be
> statistical noise, since there shouldn't be anything contending for it),
> which is my reas
Change by Inada Naoki :
--
resolution: -> wont fix
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
> 2. If the thread tries to change the size of the bytearrays during the join
> (ba1 += b'123'), it'll die with a BufferError that wasn't previously possible
Makes sense. We shouldn't drop GIL while having buffer of arbitrary o
Inada Naoki added the comment:
New changeset dfef986f12dd92bd6434117bba0db3cbb4e65243 by Inada Naoki in branch
'master':
bpo-38588: Optimize list comparison. (GH-17766)
https://github.com/python/cpython/commit/dfef986f12dd92bd6434117bba0db3cbb4e65243
Inada Naoki added the comment:
>> This makes list comparison 2x slower.
>
> This is affected by PR 17734? or PyObject_RichCompare patched?
Caused by PR 17734.
> Would you like to revert PR 17734? Calling Py_INCREF and Py_DECREF in
> PyObject_RichCompare or do_richcompare
Change by Inada Naoki :
--
pull_requests: +17202
pull_request: https://github.com/python/cpython/pull/17766
___
Python tracker
<https://bugs.python.org/issue38
Inada Naoki added the comment:
$ ./python -m pyperf timeit -s 'a = ["a"]*100; b = ["a"]*100;' -- 'a == b'
master : Mean +- std dev: 276 ns +- 1 ns
patched: Mean +- std dev: 572 ns +- 3 ns
This makes list comparison 2x slower.
--
__
Change by Inada Naoki :
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue33777>
___
___
Inada Naoki added the comment:
If we can not add INCREF and DECREF in the PyObject_RichCompare, we can add v
== w check in the caller side.
--
___
Python tracker
<https://bugs.python.org/issue38
Inada Naoki added the comment:
Would you benchmark the performance?
How about calling Py_INCREF and Py_DECREF in PyObject_RichCompare or
do_richcompare?
It is safer than checking all caller of the PyObject_RichCompare and
PyObject_RichCompareBool.
And it would be faster when
Inada Naoki added the comment:
I'm not sure the usage should be covered by "Abstract" syntax tree.
Isn't it a "Concrete" syntax tree?
--
nosy: +inada.naoki
___
Python tracker
<https://bug
Inada Naoki added the comment:
This is implemented in #26219.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
This is implemented in #26219.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
GH-9807 fixed it.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
> I like this idea, but I think that we should at least notify Python-Dev about
> all additions to the public C API. If somebody have objections or better
> idea, it is better to know earlier.
I created a post about this issue in discuss.python.o
Change by Inada Naoki :
--
pull_requests: +17140
pull_request: https://github.com/python/cpython/pull/17683
___
Python tracker
<https://bugs.python.org/issue39
Inada Naoki added the comment:
Is this regression is large enough to revive the free_list for bound methods?
--
___
Python tracker
<https://bugs.python.org/issue39
Inada Naoki added the comment:
https://github.com/python/cpython/blob/068768faf6b82478de239d7ab903dfb249ad96a4/Objects/stringlib/join.h#L105-L126
It seems we can release GIL during iterating the buffer array.
Even though there is no one big chunk, it would be beneficial if the output
size
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +17127
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17659
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
> Don't you need to DECREF bytes somehow, at least, in case of failure?
Thanks. I will create a pull request with suggested changes.
--
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
s/return NULL/return -1/g
--
___
Python tracker
<https://bugs.python.org/issue39087>
___
___
Python-bugs-list mailing list
Unsub
Inada Naoki added the comment:
> Would it be possible to use a "container" object like a Py_buffer? Is there a
> way to customize the code executed when a Py_buffer is "released"?
It looks nice idea! Py_buffer.obj is decref-ed when releasing the buffer.
https
New submission from Inada Naoki :
Assume you are writing an extension module that reads string. For example,
HTML escape or JSON encode.
There are two courses:
(a) Support three KINDs in the flexible unicode representation.
(b) Get UTF-8 data from the unicode.
(a) will be the fastest
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -Python 3.8
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
New changeset 75bb07e92baa7267a61056d03d7e6b475588e793 by Inada Naoki
(Sebastian Berg) in branch 'master':
bpo-39028: Performance enhancement in keyword extraction (GH-17576)
https://github.com/python/cpython/commit/75bb07e92baa7267a61056d03d7e6b475588e793
gt; Notice that memory usage increases noticeably specially on files 4 and
> 5, the biggest ones, and doesn't come down as I would expect it to. But
> the loading time is constant, so I think I can disregard any pickle
> caching mechanisms.
>
> So I guess now my question is: can anyone give me any pointers as to why
> is this happening? Any help is appreciated.
>
> Thanks,
>
> --
> José María (Chema) Mateos || https://rinzewind.org/
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Inada Naoki
--
https://mail.python.org/mailman/listinfo/python-list
Change by Inada Naoki :
--
pull_requests: +17093
pull_request: https://github.com/python/cpython/pull/17623
___
Python tracker
<https://bugs.python.org/issue39
Change by Inada Naoki :
--
pull_requests: +17092
pull_request: https://github.com/python/cpython/pull/17622
___
Python tracker
<https://bugs.python.org/issue39
Inada Naoki added the comment:
Many files and directories in the "C:\Developing\Python\Lib" are disappeared.
I don't know why. But since you tried clean install, I suppose your antivirus
killed Python.
--
___
Python track
Inada Naoki added the comment:
Where did you install the portion?
What is in the C:\Developing\Python and C:\Developing\Python\Lib?
What happen when you unset both environment variables?
Do you use any antivirus software?
--
___
Python tracker
Inada Naoki added the comment:
The most common cause of this error is the PYTHONPATH and PYTHONHOME
environment variables.
You can see what environment variables are set by the "set" command.
--
nosy: +inada.naoki
___
Python track
Inada Naoki added the comment:
New changeset de4481339dec395d70e350aa2e22d7990d2b3635 by Inada Naoki in branch
'2.7':
bpo-39035: travis: Don't use beta group (GH-17605)
https://github.com/python/cpython/commit/de4481339dec395d70e350aa2e22d7990d2b3635
Inada Naoki added the comment:
New changeset be7489cb43e25b6d8bfa077589c18cc0a2367efd by Inada Naoki in branch
'3.7':
bpo-39035: travis: Don't use beta group (GH-17604)
https://github.com/python/cpython/commit/be7489cb43e25b6d8bfa077589c18cc0a2367efd
Inada Naoki added the comment:
New changeset 5c5d8f63d7d235e557ad20e7d722b22772681759 by Inada Naoki in branch
'3.8':
bpo-39035: travis: Don't use beta group (GH-17603)
https://github.com/python/cpython/commit/5c5d8f63d7d235e557ad20e7d722b22772681759
Change by Inada Naoki :
--
pull_requests: +17074
pull_request: https://github.com/python/cpython/pull/17605
___
Python tracker
<https://bugs.python.org/issue39
Change by Inada Naoki :
--
pull_requests: +17073
pull_request: https://github.com/python/cpython/pull/17604
___
Python tracker
<https://bugs.python.org/issue39
Change by Inada Naoki :
--
pull_requests: +17072
pull_request: https://github.com/python/cpython/pull/17603
___
Python tracker
<https://bugs.python.org/issue39
Inada Naoki added the comment:
New changeset 94d2c8df1a7657015a2fcdb4c4d43392f91f8348 by Inada Naoki in branch
'master':
bpo-39035: travis: Don't use beta group (GH-17602)
https://github.com/python/cpython/commit/94d2c8df1a7657015a2fcdb4c4d43392f91f8348
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +17071
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17602
___
Python tracker
<https://bugs.python.org/issu
Regards,
--
Inada Naoki
--
https://mail.python.org/mailman/listinfo/python-list
Change by Inada Naoki :
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue39028>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Inada Naoki :
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue36054>
___
___
Python-bugs-list mailing list
Unsubscribe:
Inada Naoki added the comment:
New changeset 15fb7fa88187f5841088721a43609bffe64a8dc7 by Inada Naoki (Daniel
Himmelstein) in branch 'master':
bpo-29636: json.tool: Add document for indentation options. (GH-17482)
https://github.com/python/cpython/commit
Inada Naoki added the comment:
New changeset efefe25443c56988841ab96cdac01352123ba268 by Inada Naoki (wim
glenn) in branch 'master':
bpo-27413: json.tool: Add --no-ensure-ascii option. (GH-17472)
https://github.com/python/cpython/commit/efefe25443c56988841ab96cdac01352123ba268
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.7
___
Python tracker
<https://bugs.python.or
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.9
___
Python tracker
<https://bugs.python.or
Change by Inada Naoki :
--
components: +Library (Lib) -Unicode
___
Python tracker
<https://bugs.python.org/issue33684>
___
___
Python-bugs-list mailing list
Unsub
Inada Naoki added the comment:
New changeset e0f148e6635480521036415bd782c3424fe6c619 by Inada Naoki in branch
'3.7':
bpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460)
https://github.com/python/cpython/commit/e0f148e6635480521036415bd782c3424fe6c619
Change by Inada Naoki :
--
pull_requests: +16944
pull_request: https://github.com/python/cpython/pull/17465
___
Python tracker
<https://bugs.python.org/issue33
Inada Naoki added the comment:
New changeset 808769f3a4cbdc47cf1a5708dd61b1787bb192d4 by Inada Naoki in branch
'master':
bpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460)
https://github.com/python/cpython/commit/808769f3a4cbdc47cf1a5708dd61b1787bb192d4
--
nosy
Change by Inada Naoki :
--
pull_requests: +16941
pull_request: https://github.com/python/cpython/pull/17460
___
Python tracker
<https://bugs.python.org/issue33
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.8
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
New changeset 03257949bc02a4afdf2ea1eb07a73f8128129579 by Inada Naoki (Daniel
Himmelstein) in branch 'master':
bpo-29636: Add --(no-)indent arguments to json.tool (GH-345)
https://github.com/python/cpython/commit/03257949bc02a4afdf2ea1eb07a73f8128129579
Inada Naoki added the comment:
> Do we need to explicitly document the return value change of _file which is
> documented with a separate versionchanged directive for 3.7 and 3.8?
I feel it is too detailed.
Note that the _file attribute may be TextIOWrapper after rollover()
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 e65b3fa9f16537d20f5f37c25673ac899fcd7099 by Inada Naoki in branch
'3.7':
bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400)
https://github.com/python/cpython/commit/e65b3fa9f16537d20f5f37c25673ac899fcd7099
Change by Inada Naoki :
--
pull_requests: +16887
pull_request: https://github.com/python/cpython/pull/17407
___
Python tracker
<https://bugs.python.org/issue26
Inada Naoki added the comment:
New changeset ea9835c5d154ab6a54eed627958473b6768b28cc by Inada Naoki in branch
'master':
bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400)
https://github.com/python/cpython/commit/ea9835c5d154ab6a54eed627958473b6768b28cc
Change by Inada Naoki :
--
pull_requests: +16880
pull_request: https://github.com/python/cpython/pull/17400
___
Python tracker
<https://bugs.python.org/issue26
Inada Naoki added the comment:
@Serhiy, would you create a pull request based on your patch? Or may I?
@James it doesn't make sense at all. It breaks the file even when only ASCII
characters are used.
f = SpooledTemporaryFile(mode="w+")
f.write("foobar")
f.seek(3)
Inada Naoki added the comment:
But poor performance is better than silent data corruption.
If we can not fix the rollover right now, stop the spooling is a considerable
option for next bugfix release.
--
___
Python tracker
<ht
Inada Naoki added the comment:
Creating files is slow on Windows too.
But I think we should fix the data corruption ASAP.
While Serhiy's patch looks good to me, there is a more quick and safe way to
fix the data corruption. Use TemporaryFile at first if it is text mode
Change by Inada Naoki :
--
priority: normal -> critical
___
Python tracker
<https://bugs.python.org/issue26730>
___
___
Python-bugs-list mailing list
Un
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 036fe85bd3e6cd01093d836d71792a1966f961e8 by Inada Naoki
(HongWeipeng) in branch 'master':
bpo-27145: small_ints[x] could be returned in long_add and long_sub (GH-15716)
https://github.com/python/cpython/commit
Change by Inada Naoki :
--
nosy: -inada.naoki
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
New changeset 6dd9b64770af8905bef293c81d541eaaf8d8df52 by Inada Naoki (Brandt
Bucher) in branch 'master':
bpo-38328: Speed up the creation time of constant list and set display.
(GH-17114)
https://github.com/python/cpython/commit
Inada Naoki added the comment:
SpooledTemporaryFile has very serious bug which causes data corruption
(#26730). Please don't use it with text mode until it is fixed.
--
___
Python tracker
<https://bugs.python.org/issue38
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
> The function actually copies `len` bytes from string v instead of the whole
> string.
"and length *len*" means it. So it is not a bug.
If you want to rewrite it to "the first *len* bytes of", you should remove "and
Change by Inada Naoki :
--
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
New changeset 138e7bbb0a5ed44bdd54605e8c58c8f3d3865321 by Inada Naoki
(jacksonriley) in branch 'master':
bpo-38866: Remove asyncore from test_pyclbr.py (GH-17316)
https://github.com/python/cpython/commit/138e7bbb0a5ed44bdd54605e8c58c8f3d3865321
Change by Inada Naoki :
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue24084>
___
___
Python-bugs-list mailing list
Unsubscribe:
Inada Naoki added the comment:
It is documented, if you read it carefully.
"Network objects are hashable, so they can be used as keys in dictionaries."
https://docs.python.org/3/library/ipaddress.html#network-objects
"""
An object is hashable if it has a hash
Inada Naoki added the comment:
All classes in the ipaddress module are designed as immutable.
While it is not documented, you can see __hash__ is overridden. It means you
must not change the object state.
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@pyt
Change by Inada Naoki :
--
resolution: -> third party
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35856>
___
___
Inada Naoki added the comment:
New changeset 6cbc84fb99acb33dd659d7adb29a20adbe62b74a by Inada Naoki in branch
'master':
bpo-38613: Optimize set operations of dict keys. (GH-16961)
https://github.com/python/cpython/commit/6cbc84fb99acb33dd659d7adb29a20adbe62b74a
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
done.
--
___
Python tracker
<https://bugs.python.org/issue38613>
___
___
Python-bugs-list mailing list
Unsubscribe:
use we have much more sophisticated
> > | | | h...@hjp.at | management tools.
> > __/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
>
> you're right, the log file came from Windows and was encoded in iso-8859-1,
> but my question was about the difference in result between reading a file and
> reading from stdin.
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Inada Naoki
--
https://mail.python.org/mailman/listinfo/python-list
Inada Naoki added the comment:
> How does it work with dict subclasses?
PySet_New(iterable) uses fast path only when `PyDict_CheckExact(iterable)` is
true.
So there is no change for dict subclasses.
--
___
Python tracker
<
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +16489
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16961
___
Python tracker
<https://bugs.python.org/issu
New submission from Inada Naoki :
-, |, and ^ of dictkeys are implemented as:
PyObject *result = PySet_New(self);
// Call set.difference_update, set.update, set.symmetric_difference_update with
other.
PySet_New(iterable) has optimized step for iterable is dict.
But since iterable is dictkeys
Inada Naoki added the comment:
I want to remove them in 3.10 too.
If we chose the annual release cycle, I'm OK to postpone the removal to 3.11.
FWIW, ujson is apopular extension that uses these APIs.
But it is not maintained for a long time, and there are many alternative JSON
libraries
Inada Naoki added the comment:
> but it's not that simple as the __or__ of dictviews is less strict that the
> __or__ of set: __or__ of dictview accept any iterable, __or__ of set only
> accepts sets.
I want to make it same to set.
But it is a backward inc
801 - 900 of 3179 matches
Mail list logo