[Python-Dev] Re: Recent PEP-8 change

2020-06-30 Thread Giampaolo Rodola'
On Wed, Jul 1, 2020 at 2:34 AM Greg Ewing wrote: > > Sorry for fanning the flames, but this whole thread is so over > the top I'm finding it kind of entertaining. > > On 1/07/20 2:23 am, Piper Thunstrom wrote: > > The grammarian movement, in general, was built on > > elevating a very specific form

[Python-Dev] Re: Recent PEP-8 change

2020-06-30 Thread Giampaolo Rodola'
Mmm. Well, we said what we had to say. I think we both agree there's no point in continuing. ;-) Cheers. On Tue, Jun 30, 2020 at 5:54 PM Piper Thunstrom wrote: > > On Tue, Jun 30, 2020 at 11:36 AM Giampaolo Rodola' wrote: > > No we don't. Who are you to tell others w

[Python-Dev] Re: Recent PEP-8 change

2020-06-30 Thread Giampaolo Rodola'
On Tue, Jun 30, 2020 at 4:39 PM Piper Thunstrom wrote: > > > The original request for the change had absolutely no hint that the current > > text was racist in any way; then we find out that, apparently, we've been > > harboring white supremacist ideals by prescribing when to use apostrophes >

[Python-Dev] Re: [Python-ideas] Re: Amend PEP-8 to require clear, understandable comments instead of Strunk & White Standard English comments

2020-06-30 Thread Giampaolo Rodola'
On Tue, Jun 30, 2020 at 3:16 PM Thomas Wouters wrote: > > > > On Tue, Jun 30, 2020 at 2:36 PM Steven D'Aprano wrote: >> >> It needs to be pointed out that Thomas Wouters was recently re-elected >> to the PSF board. I think we need to know whether Thomas speaks for the >> entire PSF board.Giampaol

[Python-Dev] Re: [Python-ideas] Re: Amend PEP-8 to require clear, understandable comments instead of Strunk & White Standard English comments

2020-06-30 Thread Giampaolo Rodola'
On Tue, Jun 30, 2020 at 11:53 AM Thomas Wouters wrote: > On Tue, Jun 30, 2020 at 4:28 AM Giampaolo Rodola' wrote: >> >> This is not about the commit message. It’s way more than that. It's been >> going on non-stop and got increasingly worse since at least th

[Python-Dev] Re: [Python-ideas] Re: Amend PEP-8 to require clear, understandable comments instead of Strunk & White Standard English comments

2020-06-29 Thread Giampaolo Rodola'
This is not about the commit message. It’s way more than that. It's been going on non-stop and got increasingly worse since at least the preparation of the Python elections ~2 years ago. It is not normal what is going on here. People are scared. And it is pretty much guaranteed that this is not gon

[Python-Dev] Re: [Python-ideas] Re: Amend PEP-8 to require clear, understandable comments instead of Strunk & White Standard English comments

2020-06-29 Thread Giampaolo Rodola'
On Mon, Jun 29, 2020 at 12:34 PM Nathaniel Smith wrote: > On Mon, Jun 29, 2020 at 2:31 AM Steve Holden wrote: > > The commit message used, however, reveals implementation details of the > change which are irrelevant to the stated aim, which is making the > documentation clear and concise. Use of

[Python-Dev] Re: Map errno==ETIME to TimeoutError

2020-05-26 Thread Giampaolo Rodola'
Sigh! I misread this discussion and thought the proposal was to add TimeoutError which I forgot existed. Sorry for the noise and please disregard my previous message. On Mon, May 25, 2020 at 4:32 PM Giampaolo Rodola' wrote: > I'm -1 because the concept of "timeout" is gen

[Python-Dev] Re: Map errno==ETIME to TimeoutError

2020-05-25 Thread Giampaolo Rodola'
Sure. Done. On Mon, 25 May 2020 at 21:05, Eric V. Smith wrote: > Thanks, Giampaolo. Could you leave a comment on the issue? > > Erci > On 5/25/2020 10:32 AM, Giampaolo Rodola' wrote: > > I'm -1 because the concept of "timeout" is generic enough to be oft

[Python-Dev] Re: Map errno==ETIME to TimeoutError

2020-05-25 Thread Giampaolo Rodola'
I'm -1 because the concept of "timeout" is generic enough to be often implemented as a custom exception, which poses questions re. backward/forward compatibilty. E.g. in psutil I have "TimeoutExpired", also providing a "seconds" attribute. Also I've probably never seen ETIME / ETIMEDOUT happening,

[Python-Dev] Re: Detect memory leaks in unit tests

2020-05-13 Thread Giampaolo Rodola'
On Wed, May 13, 2020 at 9:17 AM Ammar Askar wrote: > > Py_DECREF calls in the C code > > I think this part specifically is already covered through refleak > checks: > https://github.com/python/cpython/blob/master/Lib/test/libregrtest/refleak.py > > Since it can involve the repetition of tests ma

[Python-Dev] Detect memory leaks in unit tests

2020-05-12 Thread Giampaolo Rodola'
Hello there, I would like to discuss a proposal regarding one aspect which AFAIK is currently missing from cPython's test suite: the ability to detect memory leaks of functions implemented in the C extension modules. In psutil I use a test class/framework which calls a function many times, and fail

[Python-Dev] Re: Dangerous default value for reuse_address in asyncio loop.create_datagram_endpoint()

2019-11-20 Thread Giampaolo Rodola'
SO_REUSEADDR was controversial also for socket.create_server(). In the end I concluded the best solution was to not expose a reuse_address parameter. See: https://github.com/python/cpython/blob/94e165096fd65e8237e60de570fb609604ab94c9/Lib/socket.py#L891-L899 It must be noted that right now also as

[Python-Dev] Re: [python-committers] Currently working on the release of Python 3.8.0rc1

2019-09-30 Thread Giampaolo Rodola'
Hello Łukasz, I consider this one critical enough to get into 3.8: https://bugs.python.org/issue38319 Long story short: shutil.copyfile() and socket.sendfile() are broken on 32-bit platforms for files >= 2GiB. shutil.copyfile() was modified by me in the 3.8 cycle so the bug only affects 3.8 and 3.9

[Python-Dev] Re: Announcing the new Python triage team on GitHub

2019-08-23 Thread Giampaolo Rodola'
If the concern is pruning old/stale/invalid issues/PRs, I think the proposal to add a specific "awaiting-close" (or similar) label should work. These issues can periodically be handled by a core-dev who can click on the label, then evaluate and bulk-close them in one shot if necessary. Also, it see

[Python-Dev] Re: Announcing the new Python triage team on GitHub

2019-08-22 Thread Giampaolo Rodola'
On Wed, 21 Aug 2019 at 22:17, Raymond Hettinger wrote: > Thanks for doing this. I hope it encourages more participation. > > The capabilities of a triager mostly look good except for "closing PRs and > issues". This is a superpower that has traditionally been reserved for > more senior develope

Re: [Python-Dev] Python in next Windows 10 update

2019-05-24 Thread Giampaolo Rodola'
On Wed, 22 May 2019 at 03:30, Steve Dower wrote: > Hi all > > Just sharing this here because I think it's important for us to be aware > of it - I'm not trying to promote or sell anything here :) (Those who > were at the language summit have seen this already.) > > In the next Windows 10 update t

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

2019-05-21 Thread Giampaolo Rodola'
On Tue, 21 May 2019 at 04:30, Antoine Pitrou wrote: > > NNTP is still quite used (often through GMane, but probably not only) so > I'd question the removal of nntplib. I concur nntplib should be left alone. There are possibly even less used network protocols such as telnet (tenetlib) which are

Re: [Python-Dev] PEP 594: update 1

2019-05-21 Thread Giampaolo Rodola'
On Tue, 21 May 2019 at 23:26, Christian Heimes wrote: > On 21/05/2019 18.08, Giampaolo Rodola' wrote: > > > > > > On Tue, 21 May 2019 at 21:13, Christian Heimes <mailto:christ...@python.org>> wrote: > > > > crypt > > ~ >

Re: [Python-Dev] PEP 594: update 1

2019-05-21 Thread Giampaolo Rodola'
On Tue, 21 May 2019 at 21:13, Christian Heimes wrote: > crypt > ~ > > The `crypt `_ module > implements > password hashing based on ``crypt(3)`` function from ``libcrypt`` or > ``libxcrypt`` on Unix-like platform. The algorithms are mostly old, of

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

2019-05-21 Thread Giampaolo Rodola'
On Tue, 21 May 2019 at 03:17, Christian Heimes wrote: spwd > > > The `spwd `_ module provides > direct access to Unix shadow password database using non-standard APIs. > In general it's a bad idea to use the spwd. The spwd circumvents system > sec

Re: [Python-Dev] Remove tempfile.mktemp()

2019-03-19 Thread Giampaolo Rodola'
On Tue, Mar 19, 2019 at 6:21 PM Guido van Rossum wrote: >> On Tue, Mar 19, 2019 at 10:14 AM Giampaolo Rodola' >> wrote: >> Technically you cannot make it 100% safe, only less likely to occur. > That seems unnecessarily pedantic. A cryptographic random generator, like

Re: [Python-Dev] Remove tempfile.mktemp()

2019-03-19 Thread Giampaolo Rodola'
On Tue, 19 Mar 2019 at 17:47, Sebastian Rittau wrote: > Am 19.03.19 um 17:23 schrieb Giampaolo Rodola': > > @Sebastian > >> If there are valid use cases for mktemp(), I recommend renaming > >> it to mkname_unsafe() or something equally obvious. > > I'

Re: [Python-Dev] Remove tempfile.mktemp()

2019-03-19 Thread Giampaolo Rodola'
On Tue, Mar 19, 2019 at 3:57 PM Antoine Pitrou wrote: > > > Le 19/03/2019 à 15:52, Guido van Rossum a écrit : > > > > If all you need is a random name, why not just use a random number > > generator? > > E.g. I see code like this: > > > > binascii.hexlify(os.urandom(8)).decode('ascii') > > mkt

Re: [Python-Dev] Remove tempfile.mktemp()

2019-03-19 Thread Giampaolo Rodola'
On Tue, Mar 19, 2019 at 2:06 PM Stéphane Wirtel wrote: > > Hi, > > Context: raise a warning or remove tempfile.mktemp() > BPO: https://bugs.python.org/issue36309 > > Since 2.3, this function is deprecated in the documentation, just in the > documentation. In the code, there is a commented RuntimeW

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

2019-03-12 Thread Giampaolo Rodola'
On Tue, Mar 12, 2019 at 6:29 AM Terry Reedy wrote: > On 3/11/2019 10:54 PM, Inada Naoki wrote: > > >> Hello, > >> some time ago I contributed a couple of patches to speedup > shutil.copy*() functions: > >> https://bugs.python.org/issue33671 > >> https://bugs.python.org/issue33695 > > You retain c

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

2019-03-12 Thread Giampaolo Rodola'
On Tue, Mar 12, 2019 at 3:01 AM Glenn Linderman wrote: > On 3/11/2019 4:35 PM, Giampaolo Rodola' wrote: > > Hello, > some time ago I contributed a couple of patches to speedup shutil.copy*() > functions: > https://bugs.python.org/issue33671 > https://bugs.python.org/is

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

2019-03-11 Thread Giampaolo Rodola'
Hello, some time ago I contributed a couple of patches to speedup shutil.copy*() functions: https://bugs.python.org/issue33671 https://bugs.python.org/issue33695 I would like to backport both functionalities so that they can be used on Python 2.7 and <3.8 and put it on PYPI. In order to do so I wil

Re: [Python-Dev] PEPs from non-core devs now need a sponsor

2019-03-06 Thread Giampaolo Rodola'
On Wed, Mar 6, 2019 at 8:58 PM Abdur-Rahmaan Janhangeer < arj.pyt...@gmail.com> wrote: > i think that "should have at least a mentor guiding you" sounds a lot more > better than > > a core developer needs to sign on to be a sponsor > > that sounds a lot more that without backing, you can't submit

Re: [Python-Dev] Asking for reversion

2019-02-24 Thread Giampaolo Rodola'
On Sun, Feb 24, 2019 at 5:09 AM Davin Potts < python+python_...@discontinuity.net> wrote: > I have done what I was asked to do: I added tests and docs in a new > PR (GH-11816) as of Feb 10. > > Since that time, the API has matured thanks to thoughtful feedback > from a number of active reviewers.

Re: [Python-Dev] Adding test.support.safe_rmpath()

2019-02-15 Thread Giampaolo Rodola'
On Thu, Feb 14, 2019 at 6:48 PM Brett Cannon wrote: > > With -j you can do parallel testing and I know I always run with that on. > But TESTFN does *attempt *to account for that > >

Re: [Python-Dev] Adding test.support.safe_rmpath()

2019-02-14 Thread Giampaolo Rodola'
On Thu, Feb 14, 2019 at 4:03 PM Tim Golden wrote: > On 14/02/2019 14:56, Giampaolo Rodola' wrote: > > > > > > On Thu, Feb 14, 2019 at 3:25 PM Eric Snow > <mailto:ericsnowcurren...@gmail.com>> wrote: > > > > On Thu, Feb 14, 2019, 02:47 Ronald

Re: [Python-Dev] Adding test.support.safe_rmpath()

2019-02-14 Thread Giampaolo Rodola'
On Thu, Feb 14, 2019 at 3:25 PM Eric Snow wrote: > On Thu, Feb 14, 2019, 02:47 Ronald Oussoren via Python-Dev < > python-dev@python.org wrote: > >> >> I usually use shutil.rmtree for tests that need to create temporary >> files, and create a temporary directory for those files (that is, use >> te

Re: [Python-Dev] Adding test.support.safe_rmpath()

2019-02-13 Thread Giampaolo Rodola'
On Wed, Feb 13, 2019 at 2:32 PM Victor Stinner wrote: > Bikeshedding: I suggest to remove "safe_" from the name, it's hard to > guarantee that removal is "safe", especially on Windows where a > removal can be blocked for many reasons. > > Victor > Agree. I actually meant "rmpath()" (which I used

Re: [Python-Dev] Adding test.support.safe_rmpath()

2019-02-13 Thread Giampaolo Rodola'
On Wed, Feb 13, 2019 at 2:27 PM Ronald Oussoren wrote: > > > On 13 Feb 2019, at 13:24, Giampaolo Rodola' wrote: > > > Hello, > after discovering os.makedirs() has no unit-tests ( > https://bugs.python.org/issue35982) I was thinking about working on a PR > to

[Python-Dev] Adding test.support.safe_rmpath()

2019-02-13 Thread Giampaolo Rodola'
Hello, after discovering os.makedirs() has no unit-tests ( https://bugs.python.org/issue35982) I was thinking about working on a PR to increase the test coverage of fs-related os.* functions. In order to do so I think it would be useful to add a convenience function to "just delete something if it

Re: [Python-Dev] Asking for reversion

2019-02-06 Thread Giampaolo Rodola'
On Wed, Feb 6, 2019 at 12:51 PM Giampaolo Rodola' wrote: > > Unless they are already there (I don't know) it would be good to have a > full set of unit-tests for all the register()ed types and test them against > SyncManager and SharedMemoryManager. That would gi

Re: [Python-Dev] Asking for reversion

2019-02-06 Thread Giampaolo Rodola'
Davin, I am not familiar with the multiprocessing module, so take the following with a big grain of salt. I took a look at the PR, then I got an idea of how multiprocessing module is organized by reading the doc. Here's some food for thought in terms of API reorganization. SharedMemoryManager, Sha

Re: [Python-Dev] Asking for reversion

2019-02-05 Thread Giampaolo Rodola'
On Mon, Feb 4, 2019 at 4:21 AM Davin Potts < python+python_...@discontinuity.net> wrote: > I am attempting to do the right thing and am following the advice of other > core devs in what I have done thus far. > > Borrowing heavily from what I've added to issue35813 just now: > > This work is the re

Re: [Python-Dev] Tests failing on Windows with TESTFN

2018-07-27 Thread Giampaolo Rodola'
On Fri, Jul 27, 2018 at 4:48 PM Chris Jerdonek wrote: > > On Fri, Jul 27, 2018 at 6:41 AM, Giampaolo Rodola' wrote: > > > > Being TESTFN a global name it appears not suited for parallel testing. > > It was designed for parallel testing though: > > # Disam

Re: [Python-Dev] Tests failing on Windows with TESTFN

2018-07-27 Thread Giampaolo Rodola'
On Thu, Jul 26, 2018 at 12:16 AM Tim Golden wrote: > > I'm just easing back into core development work by trying to get a > stable testing environment for Python development on Windows. > > One problem is that certain tests use support.TESTFN (a local directory > constructed from the pid) for outp

Re: [Python-Dev] Call for prudence about PEP-572

2018-07-08 Thread Giampaolo Rodola'
d > have happily explained why (there is a reason) but given the endless debate > we've already seen I am simply too tired for another long email. Please > give me the benefit of the doubt. The sky is not falling. > > On Sun, Jul 8, 2018 at 2:27 PM Giampaolo Rodola' > wrot

Re: [Python-Dev] Call for prudence about PEP-572

2018-07-08 Thread Giampaolo Rodola'
On Sun, Jul 8, 2018 at 7:24 PM Chris Angelico wrote: > > On Mon, Jul 9, 2018 at 3:14 AM, Giampaolo Rodola' wrote: > > > > > > On Sun, Jul 8, 2018 at 6:45 PM Steve Holden wrote: > >> > >> On Sun, Jul 8, 2018 at 10:41 AM, Giampaolo Rodola' &g

Re: [Python-Dev] Call for prudence about PEP-572

2018-07-08 Thread Giampaolo Rodola'
On Sun, Jul 8, 2018 at 6:45 PM Steve Holden wrote: > On Sun, Jul 8, 2018 at 10:41 AM, Giampaolo Rodola' > wrote: > >> ​[...] >> I find that (space between the parentheses of a function call statement) >> too unnatural as a place where to put an assignment.

Re: [Python-Dev] Call for prudence about PEP-572

2018-07-08 Thread Giampaolo Rodola'
ells me that the main subject of the line is "assert", not the assignment, but maybe it's just because I'm not used to it. That aside there's the question of what to do when "python -O" switch is used. With this in place "-O" would acquire a new meaning, a

[Python-Dev] Call for prudence about PEP-572

2018-07-07 Thread Giampaolo Rodola'
Sorry in advance for opening yet another topic about PEP-572. With PEP-572 being officially accepted I know debating its inclusion in the language is a useless exercise at this point, but since it's still in "draft" status I would like to express my opinion as I think this is a feature which can po

Re: [Python-Dev] How is the GitHub workflow working for people?

2018-02-27 Thread Giampaolo Rodola'
I personally use a GIT commit hook which runs flake8 against the *modified py files only* and rejects the commit in case of non-compliance: https://github.com/giampaolo/psutil/blob/master/.git-pre-commit ...I install it via make: https://github.com/giampaolo/psutil/blob/ad4acae5489f86fc3bef645505b3

Re: [Python-Dev] Reorganize Python categories (Core, Library, ...)?

2017-10-05 Thread Giampaolo Rodola'
On Wed, Oct 4, 2017 at 11:52 AM, Victor Stinner wrote: > Hi, > > Python uses a few categories to group bugs (on bugs.python.org) and > NEWS entries (in the Python changelog). List used by the blurb tool: > > #.. section: Security > #.. section: Core and Builtins > #.. section: Library > #.. secti

Re: [Python-Dev] PEP 553: Built-in debug()

2017-09-05 Thread Giampaolo Rodola'
> It's a lot to type (27 characters). True. Personally I have a shortcut in my IDE (Sublime) so I when I type "pdb" -> TAB it auto completes it. > Python linters (e.g. flake8 [1]) complain about this line because it contains two statements. Breaking the idiom up into two lines further complicates

[Python-Dev] pythonhosted.org doc upload no longer works

2017-09-04 Thread Giampaolo Rodola'
I know pythonhosted.org was deprecated long ago in favor of readthedocs but I kept postponing it and my doc for psutil is still hosted on https://pythonhosted.org/psutil/. http://pythonhosted.org/ web page still recommends this:

Re: [Python-Dev] Need help to fix urllib(.parse) vulnerabilities

2017-07-22 Thread Giampaolo Rodola'
On Sat, Jul 22, 2017 at 7:10 PM, Giampaolo Rodola' wrote: > > > On Sat, Jul 22, 2017 at 6:38 PM, Victor Stinner > wrote: > >> Le 22 juil. 2017 8:04 AM, "Serhiy Storchaka" a >> écrit : >> >> I think the only reliable way of fixing the vuln

Re: [Python-Dev] Need help to fix urllib(.parse) vulnerabilities

2017-07-22 Thread Giampaolo Rodola'
On Sat, Jul 22, 2017 at 6:38 PM, Victor Stinner wrote: > Le 22 juil. 2017 8:04 AM, "Serhiy Storchaka" a > écrit : > > I think the only reliable way of fixing the vulnerability is rejecting or > escaping (as specified in RFC 2640) CR and LF inside sent lines. Adding the > support of RFC 2640 is a

Re: [Python-Dev] Need help to fix urllib(.parse) vulnerabilities

2017-07-21 Thread Giampaolo Rodola'
On Fri, Jul 21, 2017 at 12:45 PM, Victor Stinner wrote: > 2017-07-21 12:02 GMT+02:00 Victor Stinner : > > https://bugs.python.org/issue29606 > > http://python-security.readthedocs.io/vuln/urllib_ > ftp_protocol_stream_injection.html#urllib-ftp-protocol-stream-injection > > => not fixed yet > > Ok

Re: [Python-Dev] Impact of Namedtuple on startup time

2017-07-17 Thread Giampaolo Rodola'
On Mon, Jul 17, 2017 at 11:24 PM, Tim Peters wrote: > [Giampaolo Rodola' ] > > > > To be entirely honest, I'm not even sure why they need to be forcefully > > declared upfront in the first place, instead of just having a first-class > > function (builtin

Re: [Python-Dev] Impact of Namedtuple on startup time

2017-07-17 Thread Giampaolo Rodola'
On Mon, Jul 17, 2017 at 11:07 PM, Petr Viktorin wrote: > On 07/17/2017 10:31 PM, Giampaolo Rodola' wrote: > >> I completely agree. I love namedtuples but I've never been too happy >> about the additional overhead vs. plain tuples (both for creation and >> att

Re: [Python-Dev] Impact of Namedtuple on startup time

2017-07-17 Thread Giampaolo Rodola'
I completely agree. I love namedtuples but I've never been too happy about the additional overhead vs. plain tuples (both for creation and attribute access times), to the point that I explicitly avoid to use them in certain circumstances (e.g. a busy loop) and only for public end-user APIs returnin

Re: [Python-Dev] Asking for feedback about fixing `ftplib' (issue25458)

2016-12-28 Thread Giampaolo Rodola'
On Wed, Dec 28, 2016 at 3:57 PM, Ivan Pozdeev wrote: > On 25.12.2016 17:21, Giampaolo Rodola' wrote: > > From what I understand the problem should be fixed in urllib so that it > always closes the FTP connection. I understand this is what happens in > recent 3.x ver

Re: [Python-Dev] Asking for feedback about fixing `ftplib' (issue25458)

2016-12-25 Thread Giampaolo Rodola'
>From what I understand the problem should be fixed in urllib so that it always closes the FTP connection. I understand this is what happens in recent 3.x versions but not on 2.7. As for ftplib, I don't like the solution of using a `transfer_in_progress` flag in all commands. I see that as a cheap

Re: [Python-Dev] pythonhosted.org upload no longer works

2016-10-10 Thread Giampaolo Rodola'
, correct? Does pythonhosted provide an automatic redirect or I'll have to upload a static page which states the doc has been moved? On Mon, Oct 10, 2016 at 4:41 PM, Paul Moore wrote: > On 10 October 2016 at 14:34, Giampaolo Rodola' wrote: > > This is what I've bumped into just now

[Python-Dev] pythonhosted.org upload no longer works

2016-10-10 Thread Giampaolo Rodola'
This is what I've bumped into just now: python setup.py upload_sphinx --upload-dir=docs/_build/html running upload_sphinx Submitting documentation to https://upload.pypi.org/legacy/ Upload failed (410): Uploading documentation is no longer supported, we recommend using https://readthedocs.org/. P

Re: [Python-Dev] Rewrite @contextlib.contextmanager in C

2016-08-09 Thread Giampaolo Rodola'
On Tue, Aug 9, 2016 at 3:30 PM, Nick Coghlan wrote: > On 9 August 2016 at 23:26, Nick Coghlan wrote: > >> On 9 August 2016 at 06:18, Guido van Rossum wrote: >> >>> I think Nick would be interested in understanding why this is the case. >>> What does the decorator do that could be so expensive?

Re: [Python-Dev] Rewrite @contextlib.contextmanager in C

2016-08-09 Thread Giampaolo Rodola'
On Mon, Aug 8, 2016 at 11:59 PM, Chris Angelico wrote: > On Tue, Aug 9, 2016 at 7:14 AM, Wolfgang Maier > wrote: > > Right, I think a fairer comparison would be to: > > > > class ctx2: > > def __enter__(self): > > self.it = iter(self) > > return next(self.it) > > > > def

Re: [Python-Dev] Rewrite @contextlib.contextmanager in C

2016-08-08 Thread Giampaolo Rodola'
On Mon, Aug 8, 2016 at 10:07 PM, Yury Selivanov wrote: > > > On 2016-08-08 3:33 PM, Giampaolo Rodola' wrote: > >> I wanted to give it a try rewriting this in C but since @contextmanager >> has a lot of magic I wanted to ask first whether this 1) is technicall

[Python-Dev] Rewrite @contextlib.contextmanager in C

2016-08-08 Thread Giampaolo Rodola'
import timeit import contextlib @contextlib.contextmanager def ctx1(): yield class ctx2: def __enter__(self): pass def __exit__(self, *args): pass t1 = timeit.timeit("with ctx1(): pass", setup="from __main__ import ctx1") t2 = timeit.timeit("with ctx2(): pass", setup=

Re: [Python-Dev] Stop using timeit, use perf.timeit!

2016-06-11 Thread Giampaolo Rodola'
On Fri, Jun 10, 2016 at 1:13 PM, Victor Stinner wrote: > Hi, > > Last weeks, I made researchs on how to get stable and reliable > benchmarks, especially for the corner case of microbenchmarks. The > first result is a serie of article, here are the first three: > > https://haypo.github.io/journey-

Re: [Python-Dev] Pathlib enhancments - method name only

2016-04-09 Thread Giampaolo Rodola'
On Fri, Apr 8, 2016 at 9:09 PM, Chris Angelico wrote: > On Sat, Apr 9, 2016 at 5:03 AM, Chris Barker > wrote: > > On Fri, Apr 8, 2016 at 11:34 AM, Koos Zevenhoven > wrote: > >> > >> > > >> > __pathstr__ # pathstring > >> > > >> > >> Or perhaps __pathstring__ in case it may be or return byte str

Re: [Python-Dev] Python should be easily compilable on Windows with MinGW

2016-02-27 Thread Giampaolo Rodola'
On Fri, Feb 26, 2016 at 6:55 PM, Alexander Walters wrote: > No. > > Visual Studio is a solid compiler suit, mingw is a jenky mess, especially > when you try and move to 64bit (where I don't think there is one true > version of mingw). I'm sorry that Visual Studio makes it very hard for you > to

Re: [Python-Dev] Thank you.

2016-02-22 Thread Giampaolo Rodola'
On Sun, Feb 21, 2016 at 9:29 AM, Alexander Walters wrote: > I don't know if it is appropriate for this list, or not. I don't exactly > care. As much as I might disagree with some of you... > > Thank you. > >From time to time I also think about how deeply Python impacted my life. Places I visit

Re: [Python-Dev] congrats on 3.5! Alas, windows 7 users are having problems installing it

2015-09-16 Thread Giampaolo Rodola'
Same here. I get a "0x80240017 error" during installation. On Sun, Sep 13, 2015 at 10:41 PM, Laura Creighton wrote: > webmaster has already heard from 4 people who cannot install it. > I sent them to the bug tracker or to python-list but they seem > not to have gone either place. Is there some

Re: [Python-Dev] PEP 475 accepted

2015-02-03 Thread Giampaolo Rodola'
On Mon, Feb 2, 2015 at 10:46 PM, Victor Stinner wrote: > 2015-02-02 22:11 GMT+01:00 Giampaolo Rodola' : > > I may be chiming in a little late, however, I'd have a question: does > this > > affect non-blocking applications somehow? > > How often should we expect

Re: [Python-Dev] PEP 475 accepted

2015-02-02 Thread Giampaolo Rodola'
On Mon, Feb 2, 2015 at 9:45 PM, Antoine Pitrou wrote: > > Hello, > > I'm now accepting PEP 475 - "Retry system calls failing with EINTR". > You can read it at https://www.python.org/dev/peps/pep-0475/ > > The implementation is more or less ready at > http://bugs.python.org/issue23285, so you can

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Giampaolo Rodola'
On Wed, Dec 10, 2014 at 5:59 PM, Bruno Cauet wrote: > Hi all, > Last year a survey was conducted on python 2 and 3 usage. > Here is the 2014 edition, slightly updated (from 9 to 11 questions). > It should not take you more than 1 minute to fill. I would be pleased if > you took that time. > > Her

Re: [Python-Dev] Microsoft Visual C++ Compiler for Python 2.7

2014-09-29 Thread Giampaolo Rodola'
On Fri, Sep 26, 2014 at 8:01 PM, Steve Dower wrote: > Hi all, > > (This is advance notice since people on this list will be interested. > Official announcements are coming when setuptools makes their next release.) > > Microsoft has released a compiler package targeting Python 2.7 (i.e. VC9). > W

Re: [Python-Dev] Bluetooth 4.0 support in "socket" module

2014-07-14 Thread Giampaolo Rodola'
On Mon, Jul 14, 2014 at 3:57 PM, Tim Tisdall wrote: > I was interested in providing patches for the socket module to add > Bluetooth 4.0 support. I couldn't find any details on how to provide > contributions to the Python project, though... Is there some online > documentation with guidelines o

Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler

2014-06-07 Thread Giampaolo Rodola'
On Sat, Jun 7, 2014 at 7:05 AM, Donald Stufft wrote: > > I don’t particularly care too much though, I just think that bumping > the compiler in a 2.7.Z release is a really bad idea and that either > of the other two options are massively better. +1 -- Giampaolo - http://grodola.blogspot.com

Re: [Python-Dev] PEP 469: Restoring the iterkeys/values/items() methods

2014-04-19 Thread Giampaolo Rodola'
On Sat, Apr 19, 2014 at 4:31 AM, Nick Coghlan wrote: > After spending some time talking to the folks at the PyCon Twisted > sprints, they persuaded me that adding back the iterkeys/values/items > methods for mapping objects would be a nice way to eliminate a key > porting hassle for them (and lik

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Giampaolo Rodola'
On Thu, Apr 17, 2014 at 8:17 PM, Antoine Pitrou wrote: > On Thu, 17 Apr 2014 18:09:22 + > Brett Cannon wrote: > > > > > >I would really love to have better startup times in production, but > I > > > would also really hate to lose the ability to hack around in stdlib > > > sources during

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

2014-04-04 Thread Giampaolo Rodola'
Sorry for the troubles. :( I committed this because it worked on my local copy of Python 3.5 but after I tried a brand new "hg clone" it didnt. On Fri, Apr 4, 2014 at 4:43 PM, Brett Cannon wrote: > > > On Fri Apr 04 2014 at 10:34:06 AM, Victor Stinner < > victor.stin...@gmail.com> wrote: > >> 2

[Python-Dev] Fwd: shutdown concurrent.futures.ProcessPoolExecutor

2014-03-28 Thread Giampaolo Rodola'
tion to pass to multiprocessing.Pool nor terminate() the process pool (only wait() for it). -- Forwarded message -- From: Guido van Rossum Date: Sat, Mar 29, 2014 at 12:05 AM Subject: Re: [python-tulip] How to cleanly shutdown the IO loop when using run_in_executor()? To: Giampaolo Rodola

Re: [Python-Dev] [RELEASED] Python 3.4.0

2014-03-17 Thread Giampaolo Rodola'
The what's new looks truly amazing, with pathlib and asyncio being my favourite additions. Thanks for all the hard work. On Mon, Mar 17, 2014 at 5:57 PM, Ryan Gonzalez wrote: > YES!!! +1 to the authors of the statistics and pathlib modules. > > > On Mon, Mar 17, 2014 at 1:29 AM, Larry Hastings

Re: [Python-Dev] Confirming status of new modules in 3.4

2014-03-15 Thread Giampaolo Rodola'
On Sat, Mar 15, 2014 at 3:17 AM, Guido van Rossum wrote: > I don't think so. asyncio depends on selectors but not vice versa. The > selectors module was not part of PEP 3156. It is solid and I don't see any > reason why it should get a reprieve from the usual strict backwards > compatibility stan

Re: [Python-Dev] Confirming status of new modules in 3.4

2014-03-14 Thread Giampaolo Rodola'
On Fri, Mar 14, 2014 at 9:25 PM, R. David Murray wrote: > Not Provisional: > > selectors > Wouldn't it be wiser to consider this one provisional as well? -- Giampaolo - http://grodola.blogspot.com ___ Python-Dev mailing list Python-Dev@python.org htt

[Python-Dev] Removing doc from pythonhosted.org

2014-03-01 Thread Giampaolo Rodola'
I'm not sure whether this is the right mailing list where to post this. However, it seems the pypi UI currently provides a way to upload doc at the bottom of the page https://pypi.python.org/pypi?%3Aaction=pkg_edit&name=PROJECT_NAME but there's currently no way to remove it: https://bitbucket.org/p

Re: [Python-Dev] PEP 428 - pathlib - ready for approval

2013-11-20 Thread Giampaolo Rodola'
On Tue, Nov 19, 2013 at 10:04 PM, Antoine Pitrou wrote: > > Hello, > > Guido has told me that he was ready to approve PEP 428 (pathlib) in its > latest amended form. Here is the last call for any comments or > arguments against approval, before Guido marks the PEP accepted (or > changes his mind

Re: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

2013-10-11 Thread Giampaolo Rodola'
On Fri, Oct 11, 2013 at 11:00 AM, Antoine Pitrou wrote: > > Let me answer here to Nick's argument on the tracker (made last year, > before the patch was committed): > > > As with many context managers, a key benefit here is in the priming > > effect for readers. In this code: > > > > try: > >

[Python-Dev] Help requested for issue 9285 (profile.py)

2013-05-09 Thread Giampaolo Rodola'
http://bugs.python.org/issue9285#msg182986 I'm stuck as I really have no clue what that error means. Any help from someone experienced with profile.py code is welcome. --- Giampaolo https://code.google.com/p/pyftpdlib/ https://code.google.com/p/psutil/ https://code.google.com/p/pysendfile/ ___

[Python-Dev] Should ftplib use UTF-8 instead of latin-1 encoding?

2009-01-22 Thread Giampaolo Rodola'
Hi, while attempting to port pyftpdlib [1] to Python 3 I have noticed that ftplib differs from the previous 2.x version in that it uses latin-1 to encode everything it's sent over the FTP command channel, but by reading RFC-2640 [2] it seems that UTF-8 should be preferred instead. I'm far from bein

Re: [Python-Dev] Python security team

2008-09-29 Thread Giampaolo Rodola'
Yeah, right. Let's continue there. --- Giampaolo http://code.google.com/p/pyftpdlib On 29 Set, 22:44, "Josiah Carlson" <[EMAIL PROTECTED]> wrote: > On Mon, Sep 29, 2008 at 12:02 PM, Giampaolo Rodola' <[EMAIL PROTECTED]> wrote: > > On 27 Set, 20:04, &

Re: [Python-Dev] Python security team

2008-09-29 Thread Giampaolo Rodola'
On 27 Set, 20:04, "Josiah Carlson" <[EMAIL PROTECTED]> wrote: > On Sat, Sep 27, 2008 at 8:54 AM, Victor Stinner > > <[EMAIL PROTECTED]> wrote: > > Second, I would like to help to fix all Python security issues. It looks > > like > > Python community isn't very reactive (proactive?) about securit

Re: [Python-Dev] ssl module, non-blocking sockets and asyncore integration

2008-09-18 Thread Giampaolo Rodola'
Some good news: I finally figured out how to modify asyncore to make it properly handle the non-blocking ssl-handshake. I provided a patch for test_ssl.py in issue 3899. Bill, could you please review it? --- Giampaolo http://code.google.com/p/pyftpdlib/ On 18 Set, 00:49, "Giampaolo R

Re: [Python-Dev] ssl module, non-blocking sockets and asyncore integration

2008-09-17 Thread Giampaolo Rodola'
Ok, here's some news, in case they can be of some interest. I managed to write an asyncore disptacher which seems to work. I used my test suite against it and 70 tests passed and 2 failed. The tests failed because at a certain point a call to do_handhsake results in an EOF exception, which is very

Re: [Python-Dev] ssl module, non-blocking sockets and asyncore integration

2008-09-16 Thread Giampaolo Rodola'
http://code.google.com/p/pyftpdlib/ On 17 Set, 03:24, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > I've tried to modify my existing asyncore-based code but I'm > encountering a lot of different problems I didn't manage to fix. > It seems that playing with t

Re: [Python-Dev] ssl module, non-blocking sockets and asyncore integration

2008-09-16 Thread Giampaolo Rodola'
shake yet. > > I just made the server do it automatically to make life easier. > > The hard part isn't really doing the non-blocking, it's trying to figure > out how to use asyncore correctly, IMO. > > Giampaolo Rodola' <[EMAIL PROTECTED]> wrote: > > I&#

[Python-Dev] Add python.exe to PATH environment variable

2008-09-02 Thread Giampaolo Rodola'
Hi, I've always found it strange that Python Windows installers never managed to add the python executable to the PATH environment variable. Are there plans for adding such a thing? Thanks in advance --- Giampaolo http://code.google.com/p/pyftpdlib/ ___

Re: [Python-Dev] asyncore patch

2008-06-10 Thread Giampaolo Rodola'
On 10 Giu, 07:01, "Josiah Carlson" <[EMAIL PROTECTED]> wrote: > On Mon, Jun 9, 2008 at 7:19 PM, Benjamin Peterson > > <[EMAIL PROTECTED]> wrote: > > On Mon, Jun 9, 2008 at 8:42 PM, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > >> Would it be ok if I committed the changes?  Neal, do you want to > >>

Re: [Python-Dev] Modules for 2.6 inclusion

2008-06-07 Thread Giampaolo Rodola'
On 6 Giu, 13:27, Georg Brandl <[EMAIL PROTECTED]> wrote: > - setuptools >BDFL pronouncement for inclusion in 2.5: >http://mail.python.org/pipermail/python-dev/2006-April/063964.html I'd like to see more interest about this issue since it's a real shame that the current distutils is not ev

Re: [Python-Dev] socket.try_reuse_address()

2008-04-29 Thread Giampaolo Rodola'
Maybe it would be better considering Windows CE systems too: - if os.name == 'nt' + if os.name in ('nt', 'ce') Moreover if the method is called "try_reuse_address" I'd expect that "self._sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)" would be placed inside a try/except block. On 29 Apr, 15:58, Tr

Re: [Python-Dev] fixing tests on windows

2008-04-01 Thread Giampaolo Rodola'
On 1 Apr, 21:06, Tim Golden <[EMAIL PROTECTED]> wrote: > Giampaolo Rodola' wrote: > > > On 1 Apr, 18:27, "Steven Bethard" <[EMAIL PROTECTED]> wrote: > >> On Tue, Apr 1, 2008 at 10:20 AM, Facundo Batista > > >> <[EMAIL

Re: [Python-Dev] fixing tests on windows

2008-04-01 Thread Giampaolo Rodola'
On 1 Apr, 21:03, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > On 1 Apr, 18:27, "Steven Bethard" <[EMAIL PROTECTED]> wrote: > > > On Tue, Apr 1, 2008 at 10:20 AM, Facundo Batista > > > <[EMAIL PROTECTED]> wrote: > > > 20

Re: [Python-Dev] fixing tests on windows

2008-04-01 Thread Giampaolo Rodola'
On 1 Apr, 18:27, "Steven Bethard" <[EMAIL PROTECTED]> wrote: > On Tue, Apr 1, 2008 at 10:20 AM, Facundo Batista > > <[EMAIL PROTECTED]> wrote: > > 2008/4/1, Tim Golden <[EMAIL PROTECTED]>: > >  >  If this is the thing to do, presumably test_support should > >  >  grow a "remove_file" which does s

  1   2   >