[Python-Dev] Re: PyAPI_FUNC() is needed to private APIs?

2019-06-13 Thread Inada Naoki
ort?view=vs-2019 It seems dllexport doesn't affect to calling convention. https://clang.llvm.org/docs/LTOVisibility.html https://devblogs.microsoft.com/oldnewthing/?p=2123 It seems dllexport affects linker. At least, linker can not remove dllexport-ed function even if the function is not called anywhe

[Python-Dev] PyAPI_FUNC() is needed to private APIs?

2019-06-13 Thread Inada Naoki
unnecessary exported functions? (e.g. slower calling invention is used, bothering link time optimization, LoadLibrary get slower, etc...) Regards, -- Inada Naoki ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python

Re: [Python-Dev] Have a big machine and spare time? Here's a possible Python bug.

2019-05-31 Thread Inada Naoki
oblem - but is > that the _only_ gross design flaw here? I started r5a.4xlarge EC2 instance and started arena.py. I will post the result in next 12 hours. Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.pyt

[Python-Dev] Per opcode cache for LOAD_GLOBAL

2019-05-29 Thread Inada Naoki
://github.com/methane/sandbox/tree/master/2019/opcache_load_global#opcache-for-load_global -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org

Re: [Python-Dev] Have a big machine and spare time? Here's a possible Python bug.

2019-05-24 Thread Inada Naoki
D_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 PYTHONMALLOC=malloc local/bin/python3 t1.py 1098.4383037820007 -- end train, start del 117.93938426599925 -- end In this case, glibc malloc is the fastest. glibc is know to weak about fragmentation. But algo

[Python-Dev] PEP 594 -- Bundling libraries?

2019-05-24 Thread Inada Naoki
tly. When people use venv, they need to `pip install nntplib` (we may be able to use PyPI's namespace beta feature here). But I assume `pip install` is not a problem for people using venv. Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] Have a big machine and spare time? Here's a possible Python bug.

2019-05-23 Thread Inada Naoki
On Fri, May 24, 2019 at 3:49 AM Gregory P. Smith wrote: > > I suggest filing a bug to track this... > I created the issue: https://bugs.python.org/issue37029 -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.p

Re: [Python-Dev] Have a big machine and spare time? Here's a possible Python bug.

2019-05-23 Thread Inada Naoki
> > It's relatively easy to test replacing our custom allocators with the > system ones, yes? Can we try those to see whether they have the same > characteristic? > Yes. PYTHONMALLOC=malloc LD_PRELOAD=/path/to/jemalloc.so python script.py I will try it tomorrow. >

Re: [Python-Dev] Have a big machine and spare time? Here's a possible Python bug.

2019-05-23 Thread Inada Naoki
. I believe this is not jitter caused from NUMA or something else in cloud. -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python

Re: [Python-Dev] Have a big machine and spare time? Here's a possible Python bug.

2019-05-23 Thread Inada Naoki
, this sorting become O(N^2). That's too bad. I'm trying address order instead. Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options

Re: [Python-Dev] PEP 594: Removing dead batteries from the standard library

2019-05-22 Thread Inada Naoki
some domain specific knowledge and it is very far from Python core development. Domain expert will maintain it well than Python core developers. So I don't think "it is still used" is not always equal to "Python core developers should maintain it" or "it sh

Re: [Python-Dev] PEP 594: Removing dead batteries from the standard library

2019-05-20 Thread Inada Naoki
want to use 3rd party library for such single script files. I'd like to add transparent decompression to argparse if fileinput is deprecated. Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman

Re: [Python-Dev] RFC: PEP 587 "Python Initialization Configuration": 2nd version

2019-05-04 Thread Inada Naoki
e on Unix nowadays. Is it impossible to use just char* on Unix and wchar_t* on Windows? -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailma

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-23 Thread Inada Naoki
On Wed, Apr 24, 2019 at 6:17 AM Mark Shannon wrote: > > Hi, > > On 12/04/2019 2:44 pm, Inada Naoki wrote: > > Hi, all. > > > > I propose adding new method: dict.with_values(iterable) > > You can already do something like this, if memory saving is the mai

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-23 Thread Inada Naoki
rily an obvious advantage. We're better > off with generic building blocks that our users can compose in ways that > were originally non-obvious (and then as patterns emerge we can look at > ways to simplify or formalise them). In generic building blocks, we can not know user will create

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-23 Thread Inada Naoki
sharing dict? That's one form of my proposal :) -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-23 Thread Inada Naoki
On Tue, Apr 23, 2019 at 2:54 PM Steve Dower wrote: > > On 22Apr2019 2143, Inada Naoki wrote: > > On Tue, Apr 23, 2019 at 11:30 AM Steve Dower wrote: > >> > >> Or possibly just "dict(existing_dict).update(new_items)". > >> > > > > Do

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-22 Thread Inada Naoki
only for Python, but for all mapping implementations using hash table. -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-22 Thread Inada Naoki
.. My current idea is adding builder in somewhere in stdlib (maybe collections?): builder = DictBuilder(keys_tuple) value = builder(values) # repeatedly called. I don't want to add new mapping type because we already have shared key dict, and changing mapping type may cau

Re: [Python-Dev] Concurrent.futures: no type discovery for PyCharm

2019-04-22 Thread Inada Naoki
On Tue, Apr 23, 2019 at 4:40 AM Brett Cannon wrote: > > On Sat, Apr 20, 2019 at 2:10 PM Inada Naoki wrote: >> >> "import typing" is slow too. > > But is it so slow as to not do the right thing here and use the 'typing' > module as expected? I don't know it

Re: [Python-Dev] Concurrent.futures: no type discovery for PyCharm

2019-04-20 Thread Inada Naoki
"import typing" is slow too. 2019年4月21日(日) 1:43 Ilya Kamenshchikov : > alright, so would an import under TYPE_CHECKING guard be an option? like: > > from typing import TYPE_CHECKING > if TYPE_CHECKING: > from .process import ProcessPoolExecutor > from .thread import ThreadPoolExecutor >

Re: [Python-Dev] Concurrent.futures: no type discovery for PyCharm

2019-04-20 Thread Inada Naoki
See https://bugs.python.org/issue32596 ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 7: Adding anonymous union / struct

2019-04-17 Thread Inada Naoki
t we can align it more explicitly by using anonymous union, without adding many `.gc.` again. Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https:/

[Python-Dev] PEP 7: Adding anonymous union / struct

2019-04-17 Thread Inada Naoki
union / struct? Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-12 Thread Inada Naoki
o rewrite the code to use > the new special method. But this optimization may slow down when creating one dict... > > The interface of dict is already overloaded. It contains many methods > which most users use rarely (and therefore which are not kept in the > working set of me

Re: [Python-Dev] Proposal: dict.with_values(iterable)

2019-04-12 Thread Inada Naoki
gt; dict? A dict view contains a reference to the iterated dict > (dictiterobject.di_dict). I think it is possible. > > I'm fine with dict.with_values() API, but I'm asking if it could be > written differently. > > Victor I implemented it as instance method of dict because it may modi

[Python-Dev] Proposal: dict.with_values(iterable)

2019-04-12 Thread Inada Naoki
nge(7)]' 'keys.with_values(values)' $ ./python -m perf compare_to zip_dict.json with_values.json Mean +- std dev: [zip_dict] 935 ns +- 9 ns -> [with_values] 109 ns +- 2 ns: 8.59x faster (-88%) How do you think? Any comments are appreciated. Regards, -- Inada Naoki

Re: [Python-Dev] New Python Initialization API

2019-04-05 Thread Inada Naoki
Python interpreter at first. For example, vim initializes Python when Python is used first time. On the other hand, C locale coercion should be done ASAP application starts. I think dedicated API for coercing C locale is better than preconfig. // When application starts: Py_CoerceCLocale(warn=0); // lat

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-04-01 Thread Inada Naoki
s. DeprecationWarning is recommended in general. """ https://github.com/python/cpython/pull/12505/files#diff-4d7187c7266c3f79727d358de3b3d228 -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/

Re: [Python-Dev] PEP 578: Python Runtime Audit Hooks

2019-03-29 Thread Inada Naoki
ecome more important tool. https://techcommunity.microsoft.com/t5/Windows-Kernel-Internals/DTrace-on-Windows/ba-p/362902 Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscri

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-27 Thread Inada Naoki
ngDeprecationWarning for somehting "It will not removed in foreseeable future. But it will probably removed in the future." Note that -Wd and testing tool enable both of PendingDeprecationWarning and DeprecationWarning. If we use PendingDeprecationWarning for them, it will be too nois

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-27 Thread Inada Naoki
On Mon, Mar 25, 2019 at 10:11 PM Inada Naoki wrote: > > C, Rust, Java, Ruby, PHP, don't have PendingDeprecation. > Programmers only need Deprecation. Why programmers need PendingDeprecation > only in Python? > Any comments about this? I want to document PendingDeprecationWarnin

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-25 Thread Inada Naoki
On Mon, Mar 25, 2019 at 8:53 PM Nick Coghlan wrote: > > On Mon, 25 Mar 2019 at 14:39, Inada Naoki wrote: > > We have many ways to deprecation: > > > > * Document only deprecation (no warning) -- no actual removal is planned. > > * FutureWarning -- to warn end u

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-24 Thread Inada Naoki
e have many ways to deprecation: * Document only deprecation (no warning) -- no actual removal is planned. * FutureWarning -- to warn end users. * DeprecationWarning -- to warn Python developers. * PendingDeprecationWarning -- to warn Python developers. -- Inada Naoki __

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-23 Thread Inada Naoki
al. It was just an idea. -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
I created the PR to deprecate PendingDeprecationWarning only in document. https://github.com/python/cpython/pull/12505 On Sat, Mar 23, 2019 at 10:18 AM Inada Naoki wrote: > > On Sat, Mar 23, 2019 at 3:02 AM Brett Cannon wrote: > > > >> > >> There might be some sma

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
s very low cost compared to these cost. Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
or was independent error class. It became alias of OSError from Python 3.3. There might be some small troubles. But it was small enough for Python minor versions, I think. -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.pyth

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
Both of DeprecationWarning and PendingDeprecationWarning are not for end users. Only FutureWarning is for end users now. -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
ot use it, it is used in third-party projects. > This benefits seems too small compared to the learning cost. -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Replacement for array.array('u')?

2019-03-22 Thread Inada Naoki
in the past. https://github.com/python/cpython/commit/62bb394729a167a46d950954c4aed5f3ba7b8a69 The issue for the revert is this. https://bugs.python.org/issue13072 -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org

Re: [Python-Dev] Replacement for array.array('u')?

2019-03-22 Thread Inada Naoki
ases found when implementing PEP 393. If there are use cases enough to keep it in stdlib, I'm OK about un-deprecate it and make it always 32bit (int32_t). -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/lis

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
On Fri, Mar 22, 2019 at 5:06 PM Victor Stinner wrote: > > Le ven. 22 mars 2019 à 08:54, Inada Naoki a écrit : > > Yes. It will be removed at some point, but not in near future. > > > > But when when backward compatibility can be kept by alias, > > we c

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
ity can be kept by alias, we can be very lazy about removing it. We have `socket.error` for long time. Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] Removing PendingDeprecationWarning

2019-03-21 Thread Inada Naoki
ning class, and `PendingDeprecationWarning = DeprecationWarning` for backward compatibility. How do you think? May I do it in Python 3.8? -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscri

Re: [Python-Dev] (Licensing question) backport of shutil.copyfile() functionality

2019-03-11 Thread Inada Naoki
be: # Copyright 2001- Python Software Foundation. # Copyright 2019- Your Name # # Following code is from Python standard library (Lib/shutil.py) # # Changelog: # * ... Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https

Re: [Python-Dev] configparser: should optionxform be idempotent?

2019-03-07 Thread Inada Naoki
ords. So I agree with you. If reader may not know tech jargon widely used, teach it instead of avoid it. Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Compact ordered set

2019-03-07 Thread Inada Naoki
ct. And ordered set is not memory efficient for large set. Maybe, we couldn't find clear net win by this set implementation. I will stop this work at some point. Thank you, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mai

Re: [Python-Dev] configparser: should optionxform be idempotent?

2019-03-07 Thread Inada Naoki
eck test coverage for optionxform before documenting non-idempotent optionxform is allowed explicitly. I don't have motivation for that because I never used configparser in such way. The PR looks good to me for the particular case the issue describe. So I will merge the PR wi

Re: [Python-Dev] configparser: should optionxform be idempotent?

2019-03-07 Thread Inada Naoki
lse "(" + x + > ")"? That seems a bit fiddly. In this case, we recommend not using optionxform to wrap name with "()" implicitly. Use wrapped name explicitly instead. e.g. cfg["section"]["(name)"] = "value" It's very simple

[Python-Dev] configparser: should optionxform be idempotent?

2019-03-07 Thread Inada Naoki
's value), (b) works. At least issue reporter try this use case and be trapped by this behavior. How do you think? -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: h

Re: [Python-Dev] Summary of Python tracker Issues

2019-03-05 Thread Inada Naoki
Thank you for fixing it.Weekly status give me motivation to look issues. -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python

Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread INADA Naoki
suspect so. See "Open issues deltas (weekly)" graph in this page. It is ended by 2/8. https://bugs.python.org/issue?@template=stats -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman

Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread INADA Naoki
essage. > > Issues counts and deltas: > open6998 (+13) > closed 40696 (+47) > total 47694 (+60) > > Open issues with patches: 2783 > > -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.pytho

Re: [Python-Dev] Compact ordered set

2019-02-28 Thread INADA Naoki
> dict.popitem() pops last inserted pair. So set.pop() must remove last element. https://docs.python.org/3/library/stdtypes.html#dict.popitem -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/l

Re: [Python-Dev] datetime.timedelta total_microseconds

2019-02-28 Thread INADA Naoki
> > I *think* this is the "correct" way to do it: > > def timedelta_to_microseconds(td): > return td.microseconds + td.seconds * 1000 + td.days * 8640 > > (hardly tested) > > -CHB > 1000? milli? micro? -- INADA Naoki __

Re: [Python-Dev] mmap & munmap loop (Was: Compact ordered set

2019-02-27 Thread INADA Naoki
*ctx, void *p) *nfreepools. * 4. Else there's nothing more to do. */ -if (nf == ao->ntotalpools) { +if (nf == ao->ntotalpools && ao != usable_arenas) { /* Case 1. First unlink ao from usable_arenas. */ assert(ao->prevare

Re: [Python-Dev] mmap & munmap loop (Was: Compact ordered set

2019-02-27 Thread INADA Naoki
gt; Le mer. 27 févr. 2019 à 11:32, Victor Stinner a > écrit : > > > > Any idea why Python calls mmap+munmap more even in a venv? > > > > Victor > > > > Le mer. 27 févr. 2019 à 10:00, INADA Naoki a > écrit : > > > > > > > > >

[Python-Dev] mmap & munmap loop (Was: Compact ordered set

2019-02-27 Thread INADA Naoki
> > > Ah, another interesting point, this huge slowdown happens only when bm_pickle.py > > is executed through pyperformance. When run it directly, slowdown is > > not so large. > > pyperformance runs benchmarks in a virtual environment. I don't know > if it has any impact on bm_pickle. > > Most

Re: [Python-Dev] Another update for PEP 394 -- The "python" Command on Unix-Like Systems

2019-02-26 Thread INADA Naoki
is situation is changing. Google added Python 3 support to gyp. node-gyp project is working on Python 3 support for now. I think keeping PEP 394 as-is until node-gyp officially support Python 3 would helps many web developers. -- INADA Naoki ___ Python

Re: [Python-Dev] Compact ordered set

2019-02-26 Thread INADA Naoki
On Wed, Feb 27, 2019 at 12:37 AM Victor Stinner wrote: > > Le mar. 26 févr. 2019 à 12:33, INADA Naoki a écrit : > > - unpickle_list: 8.48 us +- 0.09 us -> 12.8 us +- 0.5 us: 1.52x slower > > (+52%)> ... > > ... > > unpickle and unpickle_list shows massiv

[Python-Dev] Compact ordered set

2019-02-26 Thread INADA Naoki
//bugs.python.org/issue32846 ) On the other hand, new implementation will be slow on complex (heavy random add & del) case. - Any comments are welcome. And any benchmark for set workloads are very welcome. Regards, -- INADA Naoki ___ Pyth

Re: [Python-Dev] Making PyInterpreterState an opaque type

2019-02-21 Thread INADA Naoki
n using PyPy's string builder [1]. [1] https://morepypy.blogspot.com/2011/10/speeding-up-json-encoding-in-pypy.html -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Making PyInterpreterState an opaque type

2019-02-19 Thread INADA Naoki
o version is OK. If Cython start using such internal APIs, external modules from PyPI will be broken when Python is upgraded. It feels nightmare to me. So having experimental APIs only for stdlibs makes sense to me. On the other hand, it makes sense to move _PyTuple_ITEMS to (3) or even (2). PyTuple_ITE

Re: [Python-Dev] How about updating OrderedDict in csv and configparser to regular dict?

2019-01-31 Thread INADA Naoki
I'm sorry, configparser is changed already. https://bugs.python.org/issue33504 On Thu, Jan 31, 2019 at 4:52 PM INADA Naoki wrote: > > Hi, > > csv.DictReader uses OrderedDict by default, from Python 3.6. > But it doesn't make sense anymore, like namedtuple._asdict(). > How abou

[Python-Dev] How about updating OrderedDict in csv and configparser to regular dict?

2019-01-30 Thread INADA Naoki
by this backward incompatibility? And I think performance and memory efficiency is not so important for configparser, unlike csv. I'm * +1 about changing csv.DictReader's default dict type * +0.5 about changing configparser's default dict type. How do you think? Regards, -- INADA Naoki

Re: [Python-Dev] Lost sight

2019-01-20 Thread INADA Naoki
Hi, Serhiy. I'm so sorry about it. I hope you will get better. Please take care of yourself. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] Inclusion of lz4 bindings in stdlib?

2018-11-29 Thread INADA Naoki
", it means "are there enough reasons make the package special enough to add to stdlib?" We don't mean "everyone can use PyPI." Regards, -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.or

Re: [Python-Dev] The future of the wchar_t cache

2018-10-20 Thread INADA Naoki
+1 to remove wchar_t cache. I hope we can remove it at Python 3.9 or 3.10. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] AIX to stable, what does that take?

2018-10-04 Thread INADA Naoki
de, it will take more long time than fixing issues on AIX, compared Linux, macOS, and Windows. But without this guide, it feels almost impossible to maintain AIX build to me. Regards, -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org ht

Re: [Python-Dev] Petr Viktorin as BDFL-Delegate for PEP 580

2018-10-03 Thread INADA Naoki
2018年10月3日(水) 21:24 Jeroen Demeyer : > Hello, > > > I am well aware of the current governance issues, but several people > have mentioned that the BDFL-Delegate process can still continue for > now. Really? I don't know process to assign BDFL-delegate without BDFL. This PEP is mainly for

Re: [Python-Dev] SEC: Spectre variant 2: GCC: -mindirect-branch=thunk -mindirect-branch-register

2018-09-18 Thread INADA Naoki
1) Guard Python process from Spectre/Meltdown attack from other process, (2) Prohibit Python code attack other processes by using Spectre/Meltdown. Regards, -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mai

Re: [Python-Dev] PEP 579 and PEP 580: refactoring C functions and methods

2018-09-13 Thread INADA Naoki
2018年9月13日(木) 18:22 Jeroen Demeyer : > On 2018-09-13 02:26, Petr Viktorin wrote: > > > PyCCall_FASTCALL is not a macro, shouldn't it be named PyCCall_FastCall? > > What's the convention for that anyway? I assumed that capital letters > meant a "really know what you are doing" function which could

Re: [Python-Dev] [PEP 576/580] Comparing PEP 576 and 580

2018-07-31 Thread INADA Naoki
On Tue, Jul 31, 2018 at 9:55 PM Jeroen Demeyer wrote: > > On 2018-07-31 12:10, INADA Naoki wrote: > > Surely, they should understand they must use CCALL_* flags instead of > > METH_* flags when implementing fast-callable object. > > Yes indeed. But implementing a fast-

Re: [Python-Dev] [PEP 576/580] Comparing PEP 576 and 580

2018-07-31 Thread INADA Naoki
On Tue, Jul 31, 2018 at 7:27 PM Antoine Pitrou wrote: > > On Tue, 31 Jul 2018 19:10:48 +0900 > INADA Naoki wrote: > > > > I said "So PEP 576/580 are needed only when implementing callable object". > > I showed example "functools.partial or fu

Re: [Python-Dev] [PEP 576/580] Comparing PEP 576 and 580

2018-07-31 Thread INADA Naoki
On Tue, Jul 31, 2018 at 6:14 PM Jeroen Demeyer wrote: > > On 2018-07-31 09:36, INADA Naoki wrote: > > I think PEP 580 is understandable only for people who tried to implement > > method objects. > > Is this really a problem? Do we expect that all Python developers c

Re: [Python-Dev] [PEP 576/580] Comparing PEP 576 and 580

2018-07-31 Thread INADA Naoki
On Tue, Jul 31, 2018 at 5:46 PM Jeroen Demeyer wrote: > > On 2018-07-31 09:36, INADA Naoki wrote: > > I want to see PoC of direct C calling. > > To be honest, there is no implementation plan for this yet. I know that > several people want this feature, so it makes sense to

Re: [Python-Dev] [PEP 576/580] Comparing PEP 576 and 580

2018-07-31 Thread INADA Naoki
018-07-30 15:35, INADA Naoki wrote: > > As repeatedly said, PEP 580 is very complicated protocol > > when just implementing callable object. > > Can you be more concrete what you find complicated? Maybe I can improve > the PEP to explain it more. Also, I'm open to suggestions to

[Python-Dev] [PEP 576/580] Reserve one type slot for Cython

2018-07-30 Thread INADA Naoki
; tp_ccalloffset is offset of PyCCallRoot instead of pointer to it. Py_TPFLAGS_FUNCTION_DESCRIPTOR will be removed from PEP 576 too. Regards, -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo

Re: [Python-Dev] PEP 576/579/580 benchmark: mistune

2018-07-30 Thread INADA Naoki
_ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki _

Re: [Python-Dev] Fw:[issue34221] Any plans to combine collections.OrderedDict with dict

2018-07-25 Thread INADA Naoki
/docs.python.org/3/library/stdtypes.html#dict No. There are some major difference. * d1 == d2 ignores order / od1 == od2 compares order * OrderedDict has move_to_end() method. * OrderedDict.pop() takes `last=True` keyword. Regards, -- INADA Naoki ___ Pytho

Re: [Python-Dev] Benchmarks why we need PEP 576/579/580

2018-07-23 Thread INADA Naoki
On Sun, Jul 22, 2018 at 7:42 PM Jeroen Demeyer wrote: > > On 2018-07-22 08:27, INADA Naoki wrote: > > It's interesting... But I failed to build sage. > > What went wrong? > I can't install Sage into my virtual environment, so I can't run > python -m timeit -s "fro

Re: [Python-Dev] Benchmarks why we need PEP 576/579/580

2018-07-23 Thread INADA Naoki
s isn't an easy discussion). > Me too. My interest is what is the best benefit / complexity ratio. -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.

Re: [Python-Dev] Benchmarks why we need PEP 576/579/580

2018-07-22 Thread INADA Naoki
> > I am comparing calls through tp_call (A) versus optimized call paths > (B). I only need to assume that the speed improvements to (A) between > 2.7 and 3.7 are not bigger than the speed improvements to (B). > It's interesting... But I failed to build sage. It's build step is too different

Re: [Python-Dev] Benchmarks why we need PEP 576/579/580

2018-07-21 Thread INADA Naoki
ns. I used SageMath 8.3.rc1 > and Cython 0.28.4. Do you mean you backport LOAD_METHOD and fastcall to Python 2.7 for benchmarking? Reproducing it seems hard job to me... -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://ma

Re: [Python-Dev] Can I make marshal.dumps() slower but stabler?

2018-07-13 Thread INADA Naoki
bject and cache. So we can use FLAG_REF always for interned string, even if refcnt==1. Let's try it and wait another issue are found. Thanks! -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/list

Re: [Python-Dev] Can I make marshal.dumps() slower but stabler?

2018-07-12 Thread INADA Naoki
On Fri, Jul 13, 2018 at 5:03 AM André Malo wrote: > > * INADA Naoki wrote: > > > Is there any real application which marshal.dumps() performance is > > critical? > > I'm using it for spooling big chunks of data on disk, exactly for the reason > that it's faster than

Re: [Python-Dev] PEP 572: Do we really need a ":" in ":="?

2018-07-12 Thread INADA Naoki
e result. > I still -0 on PEP 572. But strong -1 on restart discussion about changing it. We should polish and implement it for now, not change. -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/py

Re: [Python-Dev] Can I make marshal.dumps() slower but stabler?

2018-07-12 Thread INADA Naoki
On Thu, Jul 12, 2018 at 3:22 PM Serhiy Storchaka wrote: > > 12.07.18 08:43, INADA Naoki пише: > > I'm working on making pyc stable, via stablizing marshal.dumps() > > https://bugs.python.org/issue34093 > > This is not enough for making pyc stable. The order in frozes

[Python-Dev] Can I make marshal.dumps() slower but stabler?

2018-07-11 Thread INADA Naoki
. Is there any real application which marshal.dumps() performance is critical? -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-11 Thread INADA Naoki
right way to simulate "Cython (not Python) as a glue language" workload. Anyway, I don't request you to show "performance impact". I request only "target application we want to optimize with PEP 580 and future optimization based on PEP 580" for now. Regards, --

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-11 Thread INADA Naoki
is start >> stashing, application performance got slower quickly. > > Now, I'd like to see benchmark numbers for that before I believe it. Macro > benchmarks, not micro benchmarks! *wink* Yes, when I try inlining argument parsing or other optimization having significant memory overhe

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread INADA Naoki
On Tue, Jul 10, 2018 at 10:20 PM Antoine Pitrou wrote: > > On Tue, 10 Jul 2018 21:59:28 +0900 > INADA Naoki wrote: > > > > Then, the function is called from another C extension like this: > > > > PyObject_CallFunction(func, "n", 42); > > > >

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread INADA Naoki
On Wed, Jul 11, 2018 at 7:47 AM Victor Stinner wrote: > > 2018-07-10 14:59 GMT+02:00 INADA Naoki : > > PyObject_CallFunction(func, "n", 42); > > > > Currently, we create temporary long object for passing argument. > > If there is protocol for expos

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread INADA Naoki
k optimization like this idea can boost application performance using Cython heavily. But in Python and stdlib, there are no enough "call C function from C function" scenarios, compared with Cython based applications. We really need help from Cython world for this area. Regards, -- INADA

Re: [Python-Dev] Micro-benchmarks for function calls (PEP 576/579/580)

2018-07-09 Thread INADA Naoki
__ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki ___

Re: [Python-Dev] PEP 575, 576, 579 and 580

2018-07-07 Thread INADA Naoki
ed for them. I think main motivation of these PEPs are modern Python usages: Jupyter notebook + Cython. Unlike extension module writer, we shouldn't expect user knows difference between C and Python. That's why Cython want emulate normal Python funct

Re: [Python-Dev] PEP 575, 576, 579 and 580

2018-07-07 Thread INADA Naoki
ion. > What am I missing? Comments from the maintainers of Cython and other > similar tools would be appreciated. > > Cheers, > Mark. -- INADA Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/lis

Re: [Python-Dev] PEP 579 and PEP 580: refactoring C functions and methods

2018-07-07 Thread INADA Naoki
On Sat, Jul 7, 2018 at 4:35 PM Stefan Behnel wrote: > > INADA Naoki schrieb am 07.07.2018 um 06:10: > > How often "custom method type" are used? > > > > I thought Cython use it by default. > > But when I read code generated by Cython, I can't find it. >

Re: [Python-Dev] PEP 579 and PEP 580: refactoring C functions and methods

2018-07-06 Thread INADA Naoki
xplain any information about it. When, and how often custom method type is used? Isn't it very rare? If there are only 0.1% custom method type, why reducing 30% calling overhead is important for them? I want more possible target applications to motivate me for such complex protocols. -- I

<    1   2   3   4   5   6   >