Re: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

2014-03-26 Thread Victor Stinner
2014-03-25 23:37 GMT+01:00 Ethan Furman : > ``%a`` will call ``ascii()`` on the interpolated value. I'm not sure that I understood correctly: is the "%a" format supported? The result of ascii() is a Unicode string. Does it mean that ("%a" % obj) should give the same result than ascii(obj).encode('

Re: [Python-Dev] C code: %s vs %U

2014-03-26 Thread Victor Stinner
2014-03-26 12:02 GMT+01:00 Antoine Pitrou : > Ok, I suppose it's PyUnicode_Format? :-) I don't think that PyUnicode_Format supports %U. For PyUnicode_FromFormatV(), %U expects a Python Unicode object, whereas "%s" expects a ASCII (or latin1?) encoded byte string "const char*". For PyArg_ParseTup

Re: [Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popen

2014-03-26 Thread Victor Stinner
Hi, For your information, asyncio.subprocess.Process is limited. It's not possible yet to connect pipes between two processes. Something like "cat | wc -l" where the cat stdin comes from Python. It's possible to enhance the API to implement that, but the timeframe was too short to implement it be

Re: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

2014-03-26 Thread Victor Stinner
2014-03-26 15:35 GMT+01:00 Ethan Furman : > --- > Examples:: > > >>> b'%a' % 3.14 > b'3.14' > > >>> b'%a' % b'abc' > b'abc' This one is wrong: >>> repr(b'abc').encode('ascii', 'backslashreplace') b"b'abc'"

Re: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

2014-03-27 Thread Victor Stinner
The PEP 461 looks good to me. It's a nice addition to Python 3.5 and the PEP is well defined. I can help to implement it. Maybe, it would be nice to provide an implementation as a third-party party module on PyPI for Python 2.6-3.4. Note: I fixed a typo in your PEP (reST syntax). Victor 2014-03

Re: [Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popen

2014-03-27 Thread Victor Stinner
Hi, 2014-03-27 22:52 GMT+01:00 Josiah Carlson : > ... but I never made an effort to get it practically working > with asyncore - primarily because such would be functionally impossible on > Windows without a lot of work to pull in a chunk of what was pywin32 > libraries (at the time, Windows was a

Re: [Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popen

2014-03-27 Thread Victor Stinner
2014-03-27 22:52 GMT+01:00 Josiah Carlson : > * Because it is example docs, maybe a multi-week bikeshedding discussion > about API doesn't need to happen (as long as "read line", "read X bytes", > "read what is available", and "write this data" - all with timeouts - are > shown, people can build ev

Re: [Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popen

2014-03-28 Thread Victor Stinner
2014-03-28 2:16 GMT+01:00 Josiah Carlson : > def do_login(...): > proc = subprocess.Popen(...) > current = proc.recv(timeout=5) > last_line = current.rstrip().rpartition('\n')[-1] > if last_line.endswith('login:'): > proc.send(username) > if proc.readline(timeout=5).

Re: [Python-Dev] libpython added to ABI tracker

2014-03-28 Thread Victor Stinner
Hi, 2014-03-28 9:31 GMT+01:00 Andrey Ponomarenko : > The libpython library has been added to the ABI tracker: > http://upstream-tracker.org/versions/python.html > > The page lists library versions and changes in API/ABI. Nice! By the way, would it be possible to add a second page for the stable

Re: [Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popen

2014-03-28 Thread Victor Stinner
Le 28 mars 2014 21:59, "Terry Reedy" a écrit : > > On 3/28/2014 6:20 AM, Victor Stinner wrote: > >> Full example of asynchronous communication with a subprocess (the >> python interactive interpreter) using asyncio high-level API: > > However, the code below

Re: [Python-Dev] freeze build slave

2014-03-30 Thread Victor Stinner
I disagree. Running tests in debug code tests more things thanks to assertions, and provides more info in case of test failure or crash. Some assertions only fail on some platforms. See for example test_locale which fails with an assertion error on solaris (since Python 3.3). Adding one or two sla

Re: [Python-Dev] libpython added to ABI tracker

2014-03-31 Thread Victor Stinner
2014-03-31 13:38 GMT+02:00 Andrey Ponomarenko : > The public libpython API changes will be tracked here: > http://upstream-tracker.org/versions/python_public_api.html > > For now I've excluded only symbols starting with an underscore. What other > symbols should be excluded? It's not a matter of u

Re: [Python-Dev] [Python-checkins] cpython: fix #21076: turn signal module constants into enums

2014-04-04 Thread Victor Stinner
2014-04-04 16:21 GMT+02:00 Brett Cannon : > Fix is in rev c6e63bb132fb. Hum, this one was not enough for me. I also modified Modules/Setup.config.in: changeset: 90137:df5120efb86e tag: tip user: Victor Stinner date:Fri Apr 04 16:30:04 2014 +0200 files: Modu

[Python-Dev] Windows buildbots are red: test_idlelib

2014-04-07 Thread Victor Stinner
Hi, Unit tests are failing on Windows because of this issue: http://bugs.python.org/issue21059 It looks like a regression in test_idlelib introduced with this issue: http://bugs.python.org/issue15968 Zachary Ware wrote a fix: http://bugs.python.org/issue20035 Can someone please review Zachary's

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-07 Thread Victor Stinner
Hi, 2014-04-07 3:41 GMT+02:00 Nathaniel Smith : > So, I guess as far as I'm concerned, this is ready to go. Feedback welcome: > http://legacy.python.org/dev/peps/pep-0465/ I'm not convinced yet that there is enough usage of Python in mathematical world to modify the Python language to add a new

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-07 Thread Victor Stinner
2014-04-07 22:46 GMT+02:00 Antoine Pitrou : > Le 07/04/2014 22:38, Victor Stinner a écrit : >> It would be nice to support A × B too, because it's much more >> readable. You can configure a keyword to write arbitrary characters. > > Well, IMHO Python code should be

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Victor Stinner
2014-04-08 3:04 GMT+02:00 Steven D'Aprano : >> > >Python used to have an alias <> for != and I for one miss <> in 3.x. I >> > >don't think TOOWTDI should be the last word in this debate. >> > >> > PEP 401 to the rescue: >> >> It occurs to me that since that Aprils' Fools joke is many years old >>

Re: [Python-Dev] Windows buildbots are red: test_idlelib

2014-04-08 Thread Victor Stinner
Thanks ! 2014-04-08 22:39 GMT+02:00 Zachary Ware : > On Mon, Apr 7, 2014 at 4:37 AM, Victor Stinner > wrote: >> Hi, >> >> Unit tests are failing on Windows because of this issue: >> http://bugs.python.org/issue21059 >> >> It looks like a regression

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Victor Stinner
2014-04-09 1:13 GMT+02:00 Greg Ewing : > Victor Stinner wrote: >> >> I started to implement the RFC 1924 to have a full support. >> >> 3 days later, when my code was working, I saw the date of the RFC... > > > Do you still have the code? It needn't go to w

Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-15 Thread Victor Stinner
Hi, 2014-04-14 1:39 GMT-04:00 Nathaniel Smith : > The new tracemalloc infrastructure in python 3.4 is super-interesting > to numerical folks, because we really like memory profiling. Cool, thanks :-) > calloc() is more awesome than malloc()+memset() (...) I had a discussion with someone about

Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-16 Thread Victor Stinner
Hi, 2014-04-16 7:51 GMT-04:00 Julian Taylor : > In NumPy what we want is the tracing, not the exchangeable allocators. Did you read the PEP 445? Using the new malloc API, in fact you can have both: install new allocators and set up hooks on allocators. http://legacy.python.org/dev/peps/pep-0445/

Re: [Python-Dev] dict and required hashing

2014-04-18 Thread Victor Stinner
Does it mean that depending of the number of items, keys can be mutable? It sounds like a terrible idea. Victor Le vendredi 18 avril 2014, Jim J. Jewett a écrit : > (1) I believe the recent consensus was that the number of comparisons > made in a dict lookup is an implementation detail. (Plea

Re: [Python-Dev] subprocess.Popen and win32

2014-04-20 Thread Victor Stinner
On Python 3, you can use Unicode on all platforms. On UNIX, there is no need to encode explicitly. Victor Le 20 avr. 2014 04:17, "David Aguilar" a écrit : > Hi, > > I just joined python-dev because I found the need to add some code to > paper over python3's subprocess API, and I'm wondering whet

[Python-Dev] Add calloc-like memory allocators to Python

2014-04-28 Thread Victor Stinner
Hi, We made progress on the following issue and the latest patch (calloc-5.patch) is ready for a review: http://bugs.python.org/issue21233 This issue should help numpy to reuse Python memory allocators to use the new tracemalloc module of Python 3.4. The issue is only for Python 3.5. It was also

Re: [Python-Dev] pip: cdecimal an externally hosted file and may be unreliable [sic]

2014-05-06 Thread Victor Stinner
Hi, I don't understand your email. Can you please elaborate? Victor 2014-05-06 23:35 GMT+02:00 Stefan Krah : > Just a warning, in case any of the new packaging team forgot to contact > http://cve.mitre.org/ . > > > Stefan Krah > > > > ___ > Python-Dev

Re: [Python-Dev] should tests be thread-safe?

2014-05-10 Thread Victor Stinner
If you need a well defined environement, run your test in a subprocess. Depending on the random function, your test may be run with more threads. On BSD, it changes for example which thread receives a signal. Importing the tkinter module creates a "hidden" C thread for the Tk loop. Victor

Re: [Python-Dev] python process creation overhead

2014-05-10 Thread Victor Stinner
Le 10 mai 2014 22:51, "Gregory Szorc" a écrit : > Furthermore, Python 3 appears to be >50% slower than Python 2. Please mention the minor version. It looks like you compared 2.7 and 3.3. Please test 3.4, we made interesting progress on the startup time. There is still something to do, especially

Re: [Python-Dev] [python-committers] [RELEASED] Python 3.4.1

2014-05-19 Thread Victor Stinner
It's not easy to find the changelog. I found this page: https://docs.python.org/3.4/whatsnew/changelog.html Victor 2014-05-19 8:00 GMT+02:00 Larry Hastings : > > > On behalf of the Python development community and the Python 3.4 release > team, I'm pleased to announce the availability of Python 3

Re: [Python-Dev] Download Counts (was: Language Summit notes)

2014-05-28 Thread Victor Stinner
2014-05-28 22:05 GMT+02:00 Eli Bendersky : > Most Linux installs go through package managers which don't count here, no? For Debian, there is the "popcorn" project which provides some statistics: http://qa.debian.org/popcon.php?package=python2.6 http://qa.debian.org/popcon.php?package=python2.7 h

Re: [Python-Dev] Should standard library modules optimize for CPython?

2014-06-02 Thread Victor Stinner
2014-06-01 10:11 GMT+02:00 Steven D'Aprano : > My feeling is that the CPython standard library should be written for > CPython, Right. PyPy, Jython and IronPython already have their "own" standard library when they need a different implement. PyPy: "lib_pypy" directory (lib-python is the CPython

Re: [Python-Dev] %x formatting of floats - behaviour change since 3.4

2014-06-03 Thread Victor Stinner
Hi, 2014-06-03 23:38 GMT+02:00 Chris Angelico : > Is this an intentional change? And if so, is it formally documented > somewhere? I don't recall seeing anything about it, but my > recollection doesn't mean much. Yes, it's intentional. See the issue for the rationale: http://bugs.python.org/issue

[Python-Dev] Request: new "Asyncio" component on the bug tracker

2014-06-05 Thread Victor Stinner
Hi, Would it be possible to add a new "Asyncio" component on bugs.python.org? If this component is selected, the default nosy list for asyncio would be used (guido, yury and me, there is already such list in the nosy list completion). Full text search for "asyncio" returns too many results. Vict

[Python-Dev] asyncio/Tulip: use CPython as the new upstream

2014-06-06 Thread Victor Stinner
Hi, I added a new BaseEventLoop.is_closed() method to Tulip and Python 3.5 to fix an issue (see Tulip issue 169 for the detail). The problem is that I don't want to add this method to Python 3.4 because usually we don't add new methods in minor versions of Python (future version 3.4.2 in this case

Re: [Python-Dev] Returning Windows file attribute information via os.stat()

2014-06-10 Thread Victor Stinner
2014-06-10 6:02 GMT+02:00 Ben Hoyt : > To solve this problem, what do people think about adding an > "st_winattrs" attribute to the object returned by os.stat() on > Windows? > (...) > FILE_ATTRIBUTE_HIDDEN = 2 # constant defined in Windows.h > > if hasattr(st, 'st_winattrs') and st.st_winattr

Re: [Python-Dev] Python 3.5 on VC14 - update

2014-06-10 Thread Victor Stinner
2014-06-10 18:30 GMT+02:00 Steve Dower : > I ran a quick test with profile-guided optimization (PGO, pronounced "pogo"), > which has supposedly been improved since VC9, and saw a very unscientific 20% > speed improvement on pybench.py and 10% size reduction in python35.dll. I'm > not sure what w

[Python-Dev] Issue #21205: add __qualname__ to generators

2014-06-11 Thread Victor Stinner
Hi, I'm working on asyncio and it's difficult to debug code because @asyncio.coroutine decorator removes the name of the function if the function is not a generator (if it doesn't use yield from). I propose to add new gi_name and gi_qualname fields to the C structure PyGenObject, add a new __qual

Re: [Python-Dev] Issue #21205: add __qualname__ to generators

2014-06-12 Thread Victor Stinner
2014-06-11 18:17 GMT+02:00 Antoine Pitrou : > Le 11/06/2014 10:28, Victor Stinner a écrit : >> (...) >> Issues describing the problem, I attached a patch implementing my ideas: >> http://bugs.python.org/issue21205 >> >> Would you be ok with these (minor) inc

Re: [Python-Dev] Backwards Incompatibility in logging module in 3.4?

2014-06-12 Thread Victor Stinner
Hi, 2014-06-13 0:38 GMT+02:00 Don Spaulding : > Is this a bug or an intentional break? If it's the latter, shouldn't this > at least be mentioned in the "What's new in Python 3.4" document? IMO the change is intentional. The previous behaviour was not really expected. Python 3.3 documentation i

Re: [Python-Dev] Why does _pyio.*.readinto have to work with 'b' arrays?

2014-06-15 Thread Victor Stinner
Le 15 juin 2014 02:42, "Benjamin Peterson" a écrit : > On Sat, Jun 14, 2014, at 15:39, Nikolaus Rath wrote: > > It seems to me that a much cleaner solution would be to simply declare > > _pyio's readinto to only work with bytearrays, and to explicitly raise a > > (more helpful) TypeError if anythi

[Python-Dev] Windows XP, Python 3.5 and PEP 11

2014-06-16 Thread Victor Stinner
Hi, I would like to know if Python 3.5 will still support Windows XP or not. Almost all flavors of Windows XP reached the end-of-life in April, 2014 except "Windows XP Embedded". There is even an hack to use Windows upgrades on the desktop flavor using the embedded flavor (by changing a key in the

Re: [Python-Dev] Windows XP, Python 3.5 and PEP 11

2014-06-17 Thread Victor Stinner
2014-06-17 7:01 GMT+02:00 Tim Golden : > On 17/06/2014 04:08, Zachary Ware wrote: >> This was recently discussed in the "Moving Python 3.5 on Windows to a >> new compiler" thread, where Martin declared XP support to be ended >> [1]. I believe Tim Golden is the only resident Windows dev from whom >

[Python-Dev] Commit "avoid a deadlock with the interpreter head lock and the GIL during finalization"

2014-06-17 Thread Victor Stinner
Hi, I just saw a change in Python finalization related to threads. I'm not sure that it is correct to not call tstate_delete_common(). Is this change related to an issue? I don't see any specific test. --- changeset 91234:5ccb6901cf95 3.4 avoid a deadlock with the interpreter head lock and the G

Re: [Python-Dev] Python 3.7.0 is now available! (and so is 3.6.6)

2018-06-28 Thread Victor Stinner
Hi, I updated my list of Python known vulnerabilities and the good news is that Python 3.6.6 and 3.7.0 have no known vulnerability :-) Python 3.7.0 comes with fixes for: * CVE-2018-1000117: Buffer overflow vulnerability in os.symlink on Windows * CVE-2018-1060: difflib and poplib catastrophic ba

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-28 Thread Victor Stinner
✨ Congrats Nick on your 100 emails thread 😍! ✨ You won a virtual piece of cake: 🍰 2018-06-22 16:22 GMT+02:00 Nick Coghlan : > On 22 June 2018 at 02:26, Antoine Pitrou wrote: >> Indeed. But, for a syntax addition such as PEP 572, I think it would be >> a good idea to ask their opinion to teaching

Re: [Python-Dev] Failing tests (on a Linux distro)

2018-07-02 Thread Victor Stinner
2018-07-02 9:38 GMT+02:00 Petr Viktorin : > On 07/02/18 00:59, Miro Hrončok wrote: >> Note that we (=Fedora) unfortunately skip some tests. >> (...) > > [with my Fedora hat on] > > Fedora* has been building python37 since the alphas, so the final update to > rc/stable was smoother. > (...) > * Than

Re: [Python-Dev] Failing tests [Was: Re: Python 3.7.0 is now available! (and so is 3.6.6)]

2018-07-02 Thread Victor Stinner
Hi, 2018-07-01 23:48 GMT+02:00 Matěj Cepl : > I am working on updating openSUSE packages to python 3.7, but > I have hit quite large number of failing tests (the testsuite > obviously passed with 3.6), see > https://build.opensuse.org/package/show/home:mcepl:work/python3 > (click on the red "faile

Re: [Python-Dev] Failing tests [Was: Re: Python 3.7.0 is now available! (and so is 3.6.6)]

2018-07-02 Thread Victor Stinner
> I created https://bugs.python.org/issue34022 So I ran test Python test suite of the master branch on Fedora using OpenSUSE configure command: all tests pass. I also run the 6 failing tests of the master branch on Debian Sid using the same configure command than the Debian builder: the 6 tests p

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-07-03 Thread Victor Stinner
2018-07-02 20:19 GMT+02:00 Guido van Rossum : > Thank you all. I will accept the PEP as is. (...) I see more and more articles ("on the Internet") saying that Guido van Rossum already accepted the PEP. Is the PEP already accepted or will be accepted? Right now, https://www.python.org/dev/peps/pep

Re: [Python-Dev] Examples for PEP 572

2018-07-04 Thread Victor Stinner
2018-07-04 9:58 GMT+02:00 Serhiy Storchaka :> 04.07.18 05:42, Steven D'Aprano пише: >> There is a deferred feature request to optimize "for x in [item]" as >> equivalent to "for x in (item,)", to avoid constructing a list: >> >> https://bugs.python.org/issue32856 > > > No, this optimization was alr

Re: [Python-Dev] PEP 572: Write vs Read, Understand and Control Flow

2018-07-04 Thread Victor Stinner
The PEP 572 has been approved, it's no longer worth it to discuss it ;-) Victor 2018-07-04 13:21 GMT+02:00 Abdur-Rahmaan Janhangeer : > was going to tell > > instead of := maybe => better > > := too close to other langs > > Abdur-Rahmaan Janhangeer > https://github.com/Abdur-rahmaanJ > >> Of the

Re: [Python-Dev] Failing tests (on a Linux distro)

2018-07-04 Thread Victor Stinner
Yes, see my issue https://bugs.python.org/issue34022 to discuss how to fix tests. Victor 2018-07-04 14:05 GMT+02:00 Nick Coghlan : > On 4 July 2018 at 22:00, Nick Coghlan wrote: >> On 2 July 2018 at 17:38, Petr Viktorin wrote: >>> Anyway, the SUSE tests seem to fail on .pyc files. The main cha

[Python-Dev] Assignment expression and coding style: the while True case

2018-07-04 Thread Victor Stinner
Hi, Let's say that the PEP 572 (assignment expression) is going to be approved. Let's move on and see how it can be used in the Python stdlib. I propose to start the discussion about "coding style" (where are assignment expressions appropriate or not?) with the "while True" case. I wrote a WIP p

Re: [Python-Dev] Assignment expression and coding style: the while True case

2018-07-04 Thread Victor Stinner
On the 3360 for loops of the stdlib (*), I only found 2 loops which would benefit of assignment expressions. It's not easy to find loops which: - build a list, - are simple enough to be expressed as list comprehension, - use a condition (if), - use an expression different than just a variable name

Re: [Python-Dev] Assignment expression and coding style: the while True case

2018-07-04 Thread Victor Stinner
) case and would be worth it. Victor 2018-07-05 1:49 GMT+02:00 MRAB : > On 2018-07-04 23:51, Victor Stinner wrote: > [snip] >> >> (C) >> >> while True: >> chunk = self.raw.read() >> if chunk in empty_values: >> nodata_val

Re: [Python-Dev] Assignment expression and coding style: the while True case

2018-07-04 Thread Victor Stinner
2018-07-05 2:15 GMT+02:00 Chris Angelico : > On Thu, Jul 5, 2018 at 10:03 AM, Victor Stinner wrote: >> On the 3360 for loops of the stdlib (*), I only found 2 loops which >> would benefit of assignment expressions. >> >> It's not easy to find loops which: >>

Re: [Python-Dev] Assignment expression and coding style: the while True case

2018-07-05 Thread Victor Stinner
2018-07-05 9:10 GMT+02:00 Tim Peters : > I'm all in favor of what Victor is doing: looking at how this stuff will > work in actual code. That's a great antidote to the spread of theoretical > fears. FYI I'm trying to use assignment expressions on the stdlib because *all* examples of the PEP 572

[Python-Dev] PEP 572: intended scope of assignment expression

2018-07-05 Thread Victor Stinner
Hi, My work (*) in the "Assignment expression and coding style: the while True case" thread helped me to understand something about the *intended* scope. While technically, assignment expressions keep the same scoping rules than assignment statements, writing "if (x := func()): ..." or "while (x

Re: [Python-Dev] PEP 572: intended scope of assignment expression

2018-07-05 Thread Victor Stinner
2018-07-05 15:14 GMT+02:00 Gustavo Carneiro : > I don't know if you're trying to propose something clever here, like "if (x > := func()):" would assign to 'x' only inside the "then" body of the if, but > IMHO that would be a terrible idea: I don't propose to change the PEP 572. I'm trying to expla

Re: [Python-Dev] PEP 572: intended scope of assignment expression

2018-07-05 Thread Victor Stinner
After "Assignment expression and coding style: the while True case", here is the part 2: analysis of the "if (var := expr): ..." case. 2018-07-05 14:20 GMT+02:00 Victor Stinner : > *intended* scope. I generated the giant pull request #8116 to show where I conside

Re: [Python-Dev] Assignment expression and coding style: the while True case

2018-07-05 Thread Victor Stinner
Hi, I wrote more pull requests in the meanwhile to see how assignment expressions could be used in the standard library. I combined my 5 PR into a new single PR to see all changes at once: https://github.com/python/cpython/pull/8122/files Again, all these PR must not be merged. I only wrote t

Re: [Python-Dev] A "day of silence" on PEP 572?

2018-07-06 Thread Victor Stinner
Last week I proposed to create a mailing list dedicated to discuss only the PEP 572, but nobody reacted to my idea (on python-commiters). Then Guido van Rossum announced his intent to approve it. So I am not sure if a mailing list is still needed if the PEP will be approved soon. Victor Le vendre

Re: [Python-Dev] Removal of install_misc command from distutils

2018-07-06 Thread Victor Stinner
Hello, I am not sure of what you propose. Do you want to get the feature back in Python 3.7.1? If yes, should it start to emit a deprection warning? Did you manage to workaround the removal? If yes, maybe we can add more doc to the Porting section of What's New in Python 3.7? Victor Le jeudi 5

Re: [Python-Dev] On the METH_FASTCALL calling convention

2018-07-06 Thread Victor Stinner
Naoki?) who thought METH_FASTCALL could use improvements. Maybe that person can write back to this thread? Or perhaps Victor Stinner (who seems to have touched it last) has a suggestion for what could be improved about it? > --Guido > > On Thu, Jul 5, 2018 at 7:55 AM Jeroen Demeyer wrote: >

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-10 Thread Victor Stinner
2018-07-09 18:01 GMT+02:00 Steve Dower : > The difficulty is that they *definitely* can use the 32-bit version, and > those few who are on older machines or older installs of Windows may not > understand why the link we provide didn't work for them. Let's say that only 10% of users still use 32-bi

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

2018-07-10 Thread Victor Stinner
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 exposeing format used by PyArg_Parse*, we can > bypass temporal Python object and call myfunc_impl directly. I'm not sure

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

2018-07-10 Thread Victor Stinner
About your benchmark results: "FASTCALL unbound method(obj, 1, two=2): Mean +- std dev: 42.6 ns +- 29.6 ns" That's a very big standard deviation :-( Are you using CPU pinning and other technics explaining in my doc? http://perf.readthedocs.io/en/latest/run_benchmark.html#how-to-get-reproductible-

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

2018-07-10 Thread Victor Stinner
The pyperformance benchmark suite had micro benchmarks on function calls, but I removed them because they were sending the wrong signal. A function call by itself doesn't matter to compare two versions of CPython, or CPython to PyPy. It's also very hard to measure the cost of a function call when y

Re: [Python-Dev] On the METH_FASTCALL calling convention

2018-07-10 Thread Victor Stinner
2018-07-07 0:26 GMT+02:00 Victor Stinner : > I designed FASTCALL with the help of Serhiy for keywords. I prepared a long > email reply, but I found an opportunity for optimisation on **kwargs and I > need time to see how to optimize it. I just created: "Python function call optim

Re: [Python-Dev] On the METH_FASTCALL calling convention

2018-07-10 Thread Victor Stinner
2018-07-07 10:55 GMT+02:00 Serhiy Storchaka : > There is my idea. Split every of keyword argument parsing functions on two > parts. The first part linearize keyword arguments, it converts positional > and keyword arguments (in whatever form they were presented) into a linear > array of PyObject* (w

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

2018-07-11 Thread Victor Stinner
2018-07-11 9:19 GMT+02:00 Andrea Griffini : > May be is something obvious but I find myself forgetting often about > the fact that most modern CPUs can change speed (and energy consumption) > depending on a moving average of CPU load. > > If you don't disable this "green" feature and the benchmarks

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

2018-07-11 Thread Victor Stinner
2018-07-11 2:12 GMT+02:00 INADA Naoki : > If my idea has 50% gain and current PEP 580 has only 5% gain, > why we should accept PEP 580? > But no one know real gain, because there are no realistic application > which bottleneck is calling overhead. I'm skeptical about "50% gain": I want to see a wo

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

2018-07-12 Thread Victor Stinner
2018-07-12 8:21 GMT+02:00 Serhiy Storchaka : >> Is there any real application which marshal.dumps() performance is >> critical? > > EVE Online is a well known example. EVE Online has been created in 2003. I guess that it still uses Python 2.7. I'm not sure that a video game would pick marshal in

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

2018-07-12 Thread Victor Stinner
2018-07-12 17:14 GMT+02:00 Abdur-Rahmaan Janhangeer : > sorry for reviving the dead but community acceptance, a fundamental pep > principle has not been respected for 572 > > also 29 core devs dislike vs 3 like You are referring to a *poll* that I ran in May. I don't see any community issue, the P

Re: [Python-Dev] PEP 572 and assert

2018-07-17 Thread Victor Stinner
2018-07-17 10:50 GMT+02:00 Serhiy Storchaka : > assert len(subdirs := list(path.iterdir())) == 0, subdirs > > Does PEP 572 encourages writing such code, discourages this, or completely > forbids? If I understood correctly Guido, Python the language must not prevent developers to experiment var

Re: [Python-Dev] Const access to CPython objects outside of GIL?

2018-07-17 Thread Victor Stinner
2018-07-17 6:18 GMT+02:00 Radim Řehůřek : > one of our Python projects calls for pretty heavy, low-level optimizations. > > We went down the rabbit hole and determined that having access to > PyList_GET_ITEM(list), PyInt_AS_LONG(int) and PyDict_GetItem(dict, unicode) > on Python objects **outside o

[Python-Dev] Status of Python CIs (buildbots, Travis CI, AppVeyor): july 2018

2018-07-18 Thread Victor Stinner
Hi, It seems like my latest status of Python CIs was already one year ago! https://mail.python.org/pipermail/python-dev/2017-June/148511.html Since last year, Zachary Ware (with the help of others, but I forgot names, sorry!) migrated our buildbot server from buildbot 0.8 (Python 2.7) to buil

[Python-Dev] What's the status of the PEP 572 implementation?

2018-07-26 Thread Victor Stinner
Hi, Is the PEP 572 implemented? If no, who is working on that? Is there a WIP pull request? An open issue? One month ago, I tried Chis Angelo's implementation but it implemented an old version of the PEP which evolved in the meanwhile. Victor ___ Pytho

Re: [Python-Dev] Exporting Python functions on AIX

2018-07-27 Thread Victor Stinner
Yes, all symbols starting with _Py are private and must not be used outside CPython internals. Victor Le vendredi 27 juillet 2018, WILSON, MICHAEL a écrit : > All, > > My excuse if this is not the appropriate list for a question essentially concerning the AIX port of Python. > > The current port

[Python-Dev] Let's change to C API!

2018-07-29 Thread Victor Stinner
Hi, I just sent an email to the capi-sig mailing list. Since this mailing list was idle for months, I copy my email here to get a wider audience. But if possible, I would prefer that you join me on capi-sig to reply ;-) -- Hi, Last year, I gave a talk at the Language Summit (during Pycon) to ex

Re: [Python-Dev] Let's change to C API!

2018-07-29 Thread Victor Stinner
2018-07-29 23:41 GMT+02:00 Jeroen Demeyer : > For example, you mention that you want to make Py_INCREF() a function call > instead of a macro. But since Py_INCREF is very common, I would guess that > this would make performance worse (not by much maybe but surely measurable). For the very specific

Re: [Python-Dev] Let's change to C API!

2018-07-30 Thread Victor Stinner
8 at 10:46 AM, Victor Stinner wrote: >> 2018-07-29 23:41 GMT+02:00 Jeroen Demeyer : >>> For example, you mention that you want to make Py_INCREF() a function call >>> instead of a macro. But since Py_INCREF is very common, I would guess that >>> this would make p

Re: [Python-Dev] Using Python on a fork-less POSIX-like OS

2018-07-30 Thread Victor Stinner
Python 3.8 will support os.posix_spawn(). I would like to see it used whenever possible instead of fork+exec, since it's faster and it can be safer on some platforms. Pablo Salgado is your guy for that. Victor ___ Python-Dev mailing list Python-Dev@pytho

Re: [Python-Dev] Using Python on a fork-less POSIX-like OS

2018-07-30 Thread Victor Stinner
2018, Barath Aron a écrit : > On 07/30/2018 10:23 AM, Victor Stinner wrote: >> >> Python 3.8 will support os.posix_spawn(). I would like to see it used whenever possible instead of fork+exec, since it's faster and it can be safer on some platforms. Pablo Salgado is your g

Re: [Python-Dev] Testing C API

2018-07-30 Thread Victor Stinner
Buildbots have a timeout of 15 min per test. I suggest to use multiple test_capi_.py files rather than a directory which behaves as a single test. Or regrtest should be modified to implement timeout differently. Victor Le dimanche 29 juillet 2018, Serhiy Storchaka a écrit : > Currently C API is

Re: [Python-Dev] Testing C API

2018-07-30 Thread Victor Stinner
Or maybe test__capi.py so you can more easily discover test_unicode_cami while working on Unicode. You can use -m "test_*_capi" to run all C API tests. Victor Le lundi 30 juillet 2018, Victor Stinner a écrit : > Buildbots have a timeout of 15 min per test. I suggest to use multip

Re: [Python-Dev] Accessing mailing list archives

2018-07-30 Thread Victor Stinner
Hi Bob, I wrote a basic script to compute the number of emails per PEP. It requires to download gzipped mbox files from the web page of archives per month, then ungzip them: https://github.com/vstinner/misc/blob/master/python/parse_mailman_mbox_peps.py Results: https://mail.python.org/pipermail/p

Re: [Python-Dev] Testing C API

2018-07-30 Thread Victor Stinner
ib/test/test_*_capi.py > tests; ./python -m test --fromfile tests". There are different options. By the way, running the full test suite just takes 5 min on my laptop, it isn't so long ;-) Victor Le lundi 30 juillet 2018, Nick Coghlan a écrit : > On 30 July 2018 at 21:23, Victor Stinne

Re: [Python-Dev] Let's change to C API!

2018-07-30 Thread Victor Stinner
>> Last year, I gave a talk at the Language Summit (during Pycon) to >> explain that CPython should become 2x faster to remain competitive. >> IMHO all attempts to optimize Python (CPython forks) have failed >> because they have been blocked by the C API which implies strict >> constraints. > > Wel

Re: [Python-Dev] Let's change to C API!

2018-07-31 Thread Victor Stinner
2018-07-31 8:58 GMT+02:00 Antoine Pitrou : > What exactly in the C API made it slow or non-promising? > >> The C API requires that your implementations make almost all the same >> design choices that CPython made 25 years ago (C structures, memory >> allocators, reference couting, specific GC imple

Re: [Python-Dev] Let's change to C API!

2018-07-31 Thread Victor Stinner
2018-07-31 9:27 GMT+02:00 Jeroen Demeyer : > On 2018-07-31 08:58, Antoine Pitrou wrote: >> >> I think Stefan is right that we >> should push people towards Cython and alternatives, rather than direct >> use of the C API (which people often fail to use correctly, in my >> experience). > > > I know t

Re: [Python-Dev] Let's change to C API!

2018-07-31 Thread Victor Stinner
Antoine: would you mind to subscribe to the capi-sig mailing list? As expected, they are many interesting points discussed here, but I would like to move all C API discussions to capi-sig. I only continue on python-dev since you started here (and ignored my request to start discussing my idea on ca

Re: [Python-Dev] Let's change to C API!

2018-07-31 Thread Victor Stinner
2018-07-31 14:01 GMT+02:00 Jeroen Demeyer : > Anyway, I know that this is probably not going to happen, but I just wanted > to bring it up in case people would find it a great idea. But maybe not many > CPython core developers actually know and use Cython? I know that Yury wants to use Cython for

Re: [Python-Dev] Let's change to C API!

2018-07-31 Thread Victor Stinner
I replied on capi-sig. 2018-07-31 18:03 GMT+02:00 Antoine Pitrou : > On Tue, 31 Jul 2018 15:34:05 +0200 > Victor Stinner wrote: >> Antoine: would you mind to subscribe to the capi-sig mailing list? As >> expected, they are many interesting points discussed here, but I would &

[Python-Dev] New _Py_InitializeFromConfig() function (PEP 432)

2018-07-31 Thread Victor Stinner
Hi, I finished my work on the _PyCoreConfig structure: it's a C structure in Include/pystate.h which has many fields used to configure Python initialization. In Python 3.6 and older, these parameters were scatted around the code, and it was hard to get an exhaustive list of it. This work is linke

Re: [Python-Dev] Accessing mailing list archives

2018-07-31 Thread Victor Stinner
ul 30, 2018 at 3:29 PM Victor Stinner wrote: >> >> Hi Bob, >> >> I wrote a basic script to compute the number of emails per PEP. It >> requires to download gzipped mbox files from the web page of archives per >> month, then ungzip them: >> >> https://

Re: [Python-Dev] New _Py_InitializeFromConfig() function (PEP 432)

2018-08-02 Thread Victor Stinner
2018-08-02 1:18 GMT+02:00 Eric Snow : > Backporting shouldn't be so risky since it's all private API and there > are few other changes in the relevant code since 3.7, right? It > depends on if Ned's okay with it or not. :) I'm still doing further bug fixes and cleanup in the master branch: https:

Re: [Python-Dev] [python-committers] [RELEASED] Python 3.4.9 and Python 3.5.6 are now available

2018-08-02 Thread Victor Stinner
Hi, 2018-08-02 16:00 GMT+02:00 Larry Hastings : > On behalf of the Python development community, I'm happy to announce the > availability of Python 3.4.9 and Python 3.5.6. Great! FYI these versions fix two security vulnerabilities: (*) CVE-2018-1000117: Buffer overflow vulnerability in os.symlin

Re: [Python-Dev] New _Py_InitializeFromConfig() function (PEP 432)

2018-08-02 Thread Victor Stinner
2018-08-02 17:17 GMT+02:00 Eric Snow : > Note that there are backward compatibility issues to deal with. AFAIU > if we start ignoring those global variables during initialization then > it's going to cause problems for embedders. One of the first operation of Py_Initialize(), Py_Main() and _PyCor

Re: [Python-Dev] New _Py_InitializeFromConfig() function (PEP 432)

2018-08-02 Thread Victor Stinner
2018-08-02 1:18 GMT+02:00 Eric Snow : > The "core" config is basically the config for the runtime. In fact, > PEP 432 renamed "core" to "runtime". Please keep the firm distinction > between the runtime and the (main) interpreter. There is already something called _PyRuntime but it's shared betwe

Re: [Python-Dev] New _Py_InitializeFromConfig() function (PEP 432)

2018-08-03 Thread Victor Stinner
It seems like the PEP 432 proposes an API designed from scratch as the target API. I started from the 28 years old C code and I tried to cleanup the code. Our method is different, so it's not surprising that the result is different :-) My intent is to get: * a function to read *all* configuration

<    4   5   6   7   8   9   10   11   12   13   >