Re: [Python-Dev] Docstrings on builtins

2018-06-04 Thread Matthias Bussonnier
On Mon, 4 Jun 2018 at 17:29, Ivan Pozdeev via Python-Dev < python-dev@python.org> wrote: > On 05.06.2018 3:09, Matthias Bussonnier wrote: > > This may even be a bug/feature of IPython, > > I see that inspect.signature(timedelta) fails, so if timedelta? says > Init signature: timedelta(self, /, *a

Re: [Python-Dev] Docstrings on builtins

2018-06-04 Thread Chris Barker - NOAA Federal via Python-Dev
> > This may even be a bug/feature of IPython, Ahh, thanks! I’ll look into that. -CHB ___ 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/

Re: [Python-Dev] Docstrings on builtins

2018-06-04 Thread Ivan Pozdeev via Python-Dev
On 05.06.2018 3:09, Matthias Bussonnier wrote: This may even be a bug/feature of IPython, I see that inspect.signature(timedelta) fails, so if timedelta? says Init signature: timedelta(self, /, *args, **kwargs) Then this may be some IPython internal logic. The timedelta class seem to use __new_

Re: [Python-Dev] Docstrings on builtins

2018-06-04 Thread Matthias Bussonnier
This may even be a bug/feature of IPython, I see that inspect.signature(timedelta) fails, so if timedelta? says Init signature: timedelta(self, /, *args, **kwargs) Then this may be some IPython internal logic. The timedelta class seem to use __new__ instead of __init__ (not sure why) and __new__

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Steven D'Aprano
On Mon, Jun 04, 2018 at 07:25:49PM +0200, Matěj Cepl wrote: > On 2018-06-04, 16:06 GMT, Guido van Rossum wrote: > > I don't see how this *increases* the uncertainty. Surely if > > GitHub had remained independent there would have been be > > similar concerns about how it would make enough money to

Re: [Python-Dev] Docstrings on builtins

2018-06-04 Thread Chris Barker via Python-Dev
On Mon, Jun 4, 2018 at 3:27 PM, Victor Stinner wrote: > For Argument Clinic, have a look at > https://docs.python.org/dev/howto/clinic.html Thanks Victor -- scanning that page, it is indeed where I needed to look. You can also try to copy/paste code from other files using Argument > Clinic and

Re: [Python-Dev] Docstrings on builtins

2018-06-04 Thread Victor Stinner
Hi, For Argument Clinic, have a look at https://docs.python.org/dev/howto/clinic.html You can also try to copy/paste code from other files using Argument Clinic and then run "make clinic" to regenerate the generated files. Victor 2018-06-04 23:45 GMT+02:00 Chris Barker via Python-Dev : > Over o

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Ivan Pozdeev via Python-Dev
On 05.06.2018 0:54, Ivan Pozdeev wrote: On 04.06.2018 23:52, Ivan Pozdeev wrote: On 04.06.2018 20:11, Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:57 AM, Yury Selivanov wrote: On Mon, Jun 4, 2018 at 12:50 PM Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:11 AM, Victor Stinner wrote: [..

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Ivan Pozdeev via Python-Dev
On 04.06.2018 23:52, Ivan Pozdeev wrote: On 04.06.2018 20:11, Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:57 AM, Yury Selivanov wrote: On Mon, Jun 4, 2018 at 12:50 PM Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:11 AM, Victor Stinner wrote: [..] For me, it's fine to catch any excepti

[Python-Dev] Docstrings on builtins

2018-06-04 Thread Chris Barker via Python-Dev
Over on python-ideas, someone is/was proposing literals for timedeltas. I don't expect that will come to anything, but it did make me take a look at the docstring for datetime.timedelta. I use iPython's ? a lot for a quick overview of how to use a class/function. This is what I get: In [8]: time

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Ivan Pozdeev via Python-Dev
On 04.06.2018 20:11, Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:57 AM, Yury Selivanov wrote: On Mon, Jun 4, 2018 at 12:50 PM Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:11 AM, Victor Stinner wrote: [..] For me, it's fine to catch any exception using "except:" if the block contains "

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Ivan Pozdeev via Python-Dev
On 04.06.2018 21:46, Ethan Furman wrote: On 06/04/2018 10:49 AM, Mariatta Wijaya wrote: I think we shouldn't be speculating or making guesses. We should have contingency plans and be prepared.  More than one bought-out competitor has simply disappeared, or been hamstrung in its effectivene

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Matěj Cepl
On 2018-06-04, 16:06 GMT, Guido van Rossum wrote: > I don't see how this *increases* the uncertainty. Surely if > GitHub had remained independent there would have been be > similar concerns about how it would make enough money to stay > in business. Beacuse Microsoft is known to keep a money lo

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Yury Selivanov
On Mon, Jun 4, 2018 at 3:38 PM Victor Stinner wrote: > > 2018-06-04 18:45 GMT+02:00 Guido van Rossum : > > It is currently a general convention in asyncio to only catch Exception, not > > BaseException. I consider this a flaw and we should fix it, but it's > > unfortunately not so easy -- the test

Re: [Python-Dev] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-04 Thread Ivan Pozdeev via Python-Dev
No, replying only to you wasn't intended. https://docs.travis-ci.com/user/running-build-in-debug-mode/ is the official doc on how to debug a Travis CI build via ssh. On 04.06.2018 22:31, Victor Stinner wrote: FYI you only replied to me in private. Is it on purpose? I'm interested if I can l

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Victor Stinner
2018-06-04 18:45 GMT+02:00 Guido van Rossum : > It is currently a general convention in asyncio to only catch Exception, not > BaseException. I consider this a flaw and we should fix it, but it's > unfortunately not so easy -- the tests will fail if you replace all > occurrences of Exception with B

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Ben Finney
Ethan Furman writes: > On 06/04/2018 10:49 AM, Mariatta Wijaya wrote: > > > I think we shouldn't be speculating or making guesses. > > We should have contingency plans and be prepared. More than one > bought-out competitor has simply disappeared, or been hamstrung in its > effectiveness. Yes. So

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Ethan Furman
On 06/04/2018 10:49 AM, Mariatta Wijaya wrote: I think we shouldn't be speculating or making guesses. We should have contingency plans and be prepared. More than one bought-out competitor has simply disappeared, or been hamstrung in its effectiveness. -- ~Ethan~ __

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Antoine Pitrou
Le 04/06/2018 à 19:49, Mariatta Wijaya a écrit : > I think we shouldn't be speculating or making guesses. > If people are concerned with how Microsoft will manage GitHub, please > talk to Microsoft or GitHub representative, and not gossip in python-dev. What would talking to a MS or GH representa

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Mariatta Wijaya
I think we shouldn't be speculating or making guesses. If people are concerned with how Microsoft will manage GitHub, please talk to Microsoft or GitHub representative, and not gossip in python-dev. If there is actual news or announcement of how GitHub will change, and how it will affect our workf

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Antoine Pitrou
That's true, but Microsoft has a lot of stakes in the ecosystem. For example, since it has its own CI service that it tries to promote (VSTS), is it in Microsoft's best interest to polish and improve integrations with other CI services? Regards Antoine. On Mon, 4 Jun 2018 09:06:28 -0700 Guido

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Chris Angelico
On Tue, Jun 5, 2018 at 2:57 AM, Yury Selivanov wrote: > On Mon, Jun 4, 2018 at 12:50 PM Chris Angelico wrote: >> >> On Tue, Jun 5, 2018 at 2:11 AM, Victor Stinner wrote: > [..] >> > For me, it's fine to catch any exception using "except:" if the block >> > contains "raise", typical pattern to cl

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Yury Selivanov
On Mon, Jun 4, 2018 at 12:50 PM Chris Angelico wrote: > > On Tue, Jun 5, 2018 at 2:11 AM, Victor Stinner wrote: [..] > > For me, it's fine to catch any exception using "except:" if the block > > contains "raise", typical pattern to cleanup a resource in case of > > error. Otherwise, there is a ri

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Yury Selivanov
> It is currently a general convention in asyncio to only catch Exception, not > BaseException. I consider this a flaw and we should fix it, but it's > unfortunately not so easy -- the tests will fail if you replace all > occurrences of Exception with BaseException, and it is not always clear >

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Chris Angelico
On Tue, Jun 5, 2018 at 2:11 AM, Victor Stinner wrote: > Hi, > > I just read a recent bugfix in asyncio: > > https://github.com/python/cpython/commit/9602643120a509858d0bee4215d7f150e6125468 > > + try: > + await waiter > + except Exception: > + transport.close() > + raise > > Why only c

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Guido van Rossum
It is currently a general convention in asyncio to only catch Exception, not BaseException. I consider this a flaw and we should fix it, but it's unfortunately not so easy -- the tests will fail if you replace all occurrences of Exception with BaseException, and it is not always clear what's the ri

Re: [Python-Dev] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-04 Thread Victor Stinner
2018-05-30 11:33 GMT+02:00 Victor Stinner : > I fixed a few tests which failed randomly. There are still a few, but > the most annoying have been fixed. Quick update a few days later. For an unknown reason, test_multiprocessing_forkserver.TestIgnoreEINTR.test_ignore() started to fail very frequen

[Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Victor Stinner
Hi, I just read a recent bugfix in asyncio: https://github.com/python/cpython/commit/9602643120a509858d0bee4215d7f150e6125468 + try: + await waiter + except Exception: + transport.close() + raise Why only catching "except Exception:"? Why not also catching KeyboardInterrupt or Memor

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Guido van Rossum
On Mon, Jun 4, 2018 at 8:40 AM, Antoine Pitrou wrote: > > On Mon, 4 Jun 2018 17:03:27 +0200 > Victor Stinner wrote: > > > > At this point, I have no opinion about the event :-) I just guess that > > it should make GitHub more sustainable since Microsoft is a big > > company with money and intere

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Antoine Pitrou
On Mon, 4 Jun 2018 17:03:27 +0200 Victor Stinner wrote: > > At this point, I have no opinion about the event :-) I just guess that > it should make GitHub more sustainable since Microsoft is a big > company with money and interest in GitHub. I'm also confident that > nothing will change soon. I

[Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Victor Stinner
Hi, It's now official: Microsoft is acquiring GitHub. https://blog.github.com/2018-06-04-github-microsoft/ https://news.microsoft.com/2018/06/04/microsoft-to-acquire-github-for-7-5-billion/ I copy the news here since Python rely more and more on GitHub. At this point, I have no opinion about th

Re: [Python-Dev] Stable ABI

2018-06-04 Thread Eric Snow
I've pointed out in bpo-21142 the similar script I added last year to track C globals: https://github.com/python/cpython/tree/master/Tools/c-globals -eric On Mon, Jun 4, 2018 at 1:17 AM, Ronald Oussoren wrote: > > > On 4 Jun 2018, at 08:35, Ronald Oussoren wrote: > > > > On 3 Jun 2018, at 17

Re: [Python-Dev] Stable ABI

2018-06-04 Thread Ronald Oussoren
> On 3 Jun 2018, at 17:04, Eric V. Smith wrote: > > On 6/3/2018 10:55 AM, Christian Tismer wrote: >> On 03.06.18 13:18, Ronald Oussoren wrote: >>> >>> On 3 Jun 2018, at 12:03, Christian Tismer wrote: >> ... I have written a script that scans all relevant header files and

Re: [Python-Dev] Stable ABI

2018-06-04 Thread Ronald Oussoren
> On 4 Jun 2018, at 08:35, Ronald Oussoren wrote: > > > >> On 3 Jun 2018, at 17:04, Eric V. Smith > > wrote: >> >> On 6/3/2018 10:55 AM, Christian Tismer wrote: >>> On 03.06.18 13:18, Ronald Oussoren wrote: > On 3 Jun 2018, at 12:03, Christian Tisme