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

2018-06-06 Thread Steven D'Aprano
On Wed, Jun 06, 2018 at 05:59:17PM -0700, Chris Jerdonek wrote:

> Is the “service” they provide (and what it needs) allowed to change over
> time, so that the rights granted can expand?

Of course it can change. And they might not even need to give us notice. 
But that's no different from any other service provider, including your 
ISP, your phone provider, your electricity provider, etc.

If we're to be concerned about changes to terms and conditions, we 
should be equally concerned about Google, Apple, Amazon, Red Hat, Oracle 
etc. We shouldn't be uniquely or especially concerned just because 
Microsoft has purchased Github. Nothing has changed.

Github (the old Github, before being sold) were not "the Good Guys", and 
Microsoft is not "the Bad Guys". Github were a commercial entity, run by 
venture capitalists only in it for the money, with a brogrammer culture 
that was (allegedly) highly toxic to women. If Github didn't try to make 
a grab for their users' content, it was because they made a commercial 
decision that stealing the IP for a thousand versions of "leftpad" for 
Node.js was not worth the harm they would do to their business, not 
because they're nice guys who wouldn't do that.

https://medium.com/@caspervonb/the-internet-is-at-the-mercy-of-a-handful-of-people-73fac4bc5068

I know that suspicion and fear of Microsoft's bona fides is a long 
running tradition in FOSS circles, but Microsoft is subject to the same 
sorts of commercial realities as any other corporation: there is a limit 
to how evil they can be for the LOLs and still stay in business. They 
are no more likely to grab users' content than Github were, and for 
the same reasons.

Actually, probably LESS likely. The sort of companies who are 
Microsoft's important customers, the ones with deep pockets willing to 
pay for services like Github's, are if anything even more cognisant of 
the value and importance of so-called Intellectual Property than the 
average FOSS user, and far more likely to be defensive over some hosting 
company trying to claim rights to their IP.

(Personally, I'm more concerned about MS trying to become another 
Google, profiling us -- all the better to sell our personal data -- by 
matching up our Github identies with everything we do on the internet. 
But again, that's not unique to Microsoft. Every second website, these 
days, wants to follow your every click and watch everything you do. But 
that's a rant for another day.)


-- 
Steve
___
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] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-06 Thread Mariatta Wijaya
Are there APIs we can use to check the status of builbots?
Maybe we can have the our bots check for the buildbot status in backport
PRs.

On Wed, May 30, 2018, 2:33 AM Victor Stinner  wrote:

>
> Buildbots only send email notifications to buildbot-sta...@python.org
> when the state changes from success (green) to failure (red). It's
> much simpler for me to spot a regression when most buildbots are
> green.
>
>
___
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] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-06 Thread Mariatta Wijaya
Activating Travis CI GitHub app is being tracked in
https://github.com/python/core-workflow/issues/255

Let's not press the button until after the 3.7 release.


On Wed, Jun 6, 2018, 3:57 PM INADA Naoki  wrote:

> ​
> ​2018年6月7日(木) 2:44 Brett Cannon :
>
>>
>> On Wed, 6 Jun 2018 at 09:27 INADA Naoki  wrote:
>>
>>>  First I was also
 confused between travis-ci.com and travis-ci.org ... The documentation
 shows an example with .com, but Python organization uses .org.

 Victor

>>>
>>> .org is legacy.
>>>
>>> Open source projects can migrate to new .com.
>>>
>>
>> ... eventually: "existing user accounts and repositories will be migrated
>> over time." I have not seen any announcements or anything regarding how
>> when or how to migrate ourselves.
>>
>> -Brett
>>
>
> Before waiting notice from Travis-CI, we need to activate the repository
> on new site.
>
>
> https://docs.travis-ci.com/user/open-source-on-travis-ci-com/#Existing-Open-Source-Repositories-on-travis-ci.org
> > However, open source repositories will be migrated to travis-ci.com 
> > gradually,
> beginning at the end of Q2 2018. You will receive an email when the
> migration for a repository is complete. This is an opt-in process: to have
> a repository migrated over, it must first be activated on travis-ci.com.
>
> Could someone who is
> ​python org admin
> owner try activa
> ​​
> ting from here?
> https://travis-ci.com/profile/python
> ___
> 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/mariatta.wijaya%40gmail.com
>
___
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] Microsoft to acquire GitHub for $7.5 b

2018-06-06 Thread Chris Jerdonek
On Tue, Jun 5, 2018 at 7:03 PM Ivan Pozdeev via Python-Dev <
python-dev@python.org> wrote:

> On 05.06.2018 17:28, Martin Gainty wrote:
>
> who owns the Data hosted on Github?
>
> Github Author?
> Microsoft?
>
>
> Martin
>
>
> https://help.github.com/articles/github-terms-of-service/#d-user-generated-content
> :
>
> "*You own content you create, but you allow us certain rights to it, so
> that we can display and share the content you post. You still have control
> over your content, and responsibility for it, and the rights you grant us
> are limited to those we need to provide the service.*
>

Is the “service” they provide (and what it needs) allowed to change over
time, so that the rights granted can expand? The definition of “service” in
their document is—


   1. The “Service” refers to the applications, software, products, and
   services provided by GitHub.

—Chris

* We have the right to remove content or close Accounts if we need to."*
>
>
> --
> *From:* Python-Dev 
>  on behalf of M.-A.
> Lemburg  
> *Sent:* Tuesday, June 5, 2018 7:54 AM
> *To:* Antoine Pitrou; python-dev@python.org
> *Subject:* Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion
>
> Something that may change is the way they treat Github
> accounts, after all, MS is very much a sales driven company.
>
> But then there's always the possibility to move to Gitlab
> as alternative (hosted or run on PSF VMs), so I would
> worry too much.
>
> Do note, however, that the value in Github is not so much with
> the products they have, but with the data. Their databases
> know more about IT developer than anyone else and given
> that Github is put under the AI umbrella in MS should tell
> us something :-)
>
>
> On 04.06.2018 19:02, Antoine Pitrou wrote:
> >
> > 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 van Rossum   wrote:
> >> 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 interest in GitHub. I'm also confident that
>  nothing will change soon. IMHO there is no need to worry about
>  anything.
> >>>
> >>> It does spell uncertainty on the long term.  While there is no need to
> >>> worry for now, I think it gives a different colour to the debate about
> >>> moving issues to Github.
> >>>
> >>
> >> 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.
> >>
> >
> > ___
> > Python-Dev mailing list
> > Python-Dev@python.org
> > https://mail.python.org/mailman/listinfo/python-dev
> Python-Dev Info Page 
> mail.python.org
> Do not post general Python questions to this list. For help with Python
> please see the Python help page.. On this list the key Python developers
> discuss the future of the language and its implementation.
>
>
> > Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/mal%40egenix.com
> >
>
> --
> Marc-Andre Lemburg
> eGenix.com
>
> Professional Python Services directly from the Experts (#1, Jun 05 2018)
> >>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
> >>> Python Database Interfaces ...   http://products.egenix.com/
> >>> Plone/Zope Database Interfaces ...   http://zope.egenix.com/
> 
>
> ::: We implement business ideas - efficiently in both time and costs :::
>
>eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
> D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
>Registered at Amtsgericht Duesseldorf: HRB 46611
>http://www.egenix.com/company/contact/
>   http://www.malemburg.com/
>
> ___
> 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/mgainty%40hotmail.com
>
>
> ___
> Python-Dev mailing 
> listPython-Dev@python.orghttps://mail.python.org/mailman/listinfo/python-dev
>
> Unsubscribe: 
> https://mail.python.org/mailman/options/python-dev/vano%40mail.mipt.ru
>
>
> --
> Regards,
> Ivan
>
> ___
> Python-Dev mailing list
> 

Re: [Python-Dev] 2018 Python Language Summit coverage

2018-06-06 Thread Eric Snow
Thanks for doing this Jake.

-eric

On Wed, Jun 6, 2018 at 3:56 PM, Jake Edge  wrote:
>
> Hola python-dev,
>
> I have been remiss in posting about my coverage from this year's Python
> Language Summit -- not to mention remiss in getting it all written up.
> But I am about half-way done with the sessions from this year.
>
> I am posting SubscriberLinks for articles that are still behind the
> paywall.  LWN subscribers can always see our content right away; one
> week after they are published in a weekly edition, they become freely
> available for everyone.  SubscriberLinks are a way around the paywall.
> Please feel free to share the SubscriberLinks I am posting here.
>
> The starting point is here: https://lwn.net/Articles/754152/  That is
> an overview article with links to the articles.  It will be updated as
> I add more articles.  Here is what we have so far:
>
> - Subinterpreter support for Python https://lwn.net/Articles/754162/
>
> - Modifying the Python object model https://lwn.net/Articles/754163/
>
> - A Gilectomy update https://lwn.net/Articles/754577/
>
> - Using GitHub Issues for Python https://lwn.net/Articles/754779/
>
> - Shortening the Python release schedule
>   https://lwn.net/Articles/755224/
>
> - Unplugging old batteries
>   https://lwn.net/SubscriberLink/755229/df78cf17181dbdca/
>
> Hopefully I captured things reasonably well -- if you have corrections
> or clarifications (or just comments :) , I would recommend posting them
> as comments on the article.
>
> I will post an update soon with the next round (with luck, all of the
> rest of them).
>
> enjoy!
>
> jake
>
> --
> Jake Edge - LWN - j...@lwn.net - http://lwn.net
> ___
> 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/ericsnowcurrently%40gmail.com
___
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] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-06 Thread INADA Naoki
​
​2018年6月7日(木) 2:44 Brett Cannon :

>
> On Wed, 6 Jun 2018 at 09:27 INADA Naoki  wrote:
>
>>  First I was also
>>> confused between travis-ci.com and travis-ci.org ... The documentation
>>> shows an example with .com, but Python organization uses .org.
>>>
>>> Victor
>>>
>>
>> .org is legacy.
>>
>> Open source projects can migrate to new .com.
>>
>
> ... eventually: "existing user accounts and repositories will be migrated
> over time." I have not seen any announcements or anything regarding how
> when or how to migrate ourselves.
>
> -Brett
>

Before waiting notice from Travis-CI, we need to activate the repository on
new site.

https://docs.travis-ci.com/user/open-source-on-travis-ci-com/#Existing-Open-Source-Repositories-on-travis-ci.org
> However, open source repositories will be migrated to travis-ci.com gradually,
beginning at the end of Q2 2018. You will receive an email when the
migration for a repository is complete. This is an opt-in process: to have
a repository migrated over, it must first be activated on travis-ci.com.

Could someone who is
​python org admin
owner try activa
​​
ting from here?
https://travis-ci.com/profile/python
___
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] 2018 Python Language Summit coverage

2018-06-06 Thread Jake Edge


Hola python-dev,

I have been remiss in posting about my coverage from this year's Python
Language Summit -- not to mention remiss in getting it all written up.
But I am about half-way done with the sessions from this year.

I am posting SubscriberLinks for articles that are still behind the
paywall.  LWN subscribers can always see our content right away; one
week after they are published in a weekly edition, they become freely
available for everyone.  SubscriberLinks are a way around the paywall.
Please feel free to share the SubscriberLinks I am posting here.

The starting point is here: https://lwn.net/Articles/754152/  That is
an overview article with links to the articles.  It will be updated as
I add more articles.  Here is what we have so far:

- Subinterpreter support for Python https://lwn.net/Articles/754162/

- Modifying the Python object model https://lwn.net/Articles/754163/

- A Gilectomy update https://lwn.net/Articles/754577/

- Using GitHub Issues for Python https://lwn.net/Articles/754779/

- Shortening the Python release schedule
  https://lwn.net/Articles/755224/

- Unplugging old batteries
  https://lwn.net/SubscriberLink/755229/df78cf17181dbdca/

Hopefully I captured things reasonably well -- if you have corrections
or clarifications (or just comments :) , I would recommend posting them
as comments on the article.

I will post an update soon with the next round (with luck, all of the
rest of them).

enjoy!

jake

-- 
Jake Edge - LWN - j...@lwn.net - http://lwn.net
___
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] Microsoft to acquire GitHub for $7.5 billion

2018-06-06 Thread Brett Cannon
On Wed, 6 Jun 2018 at 02:09 Matěj Cepl  wrote:

> On 2018-06-05, 15:03 GMT, Nick Coghlan wrote:
> > I was actually looking into this recently to see if the
> > repository import feature could be used to run a regularly
> > updated repository mirror that included all issues and PR
> > comments in addition to the code,
>
> Good, thank you very much. I didn’t, so I just worked out of the
> PR materials and documentation on their side. I am glad somebody
> did.
>
> > I'm more confident in my ability to predict Microsoft's
> > business incentives based on the prevailing technology
> > landscape than I am in my ability to predict the actions of
> > a VC firm like Andreesen Horowitz :)
>
> Perhaps. I still would be more comfortable, if we were thinking
> from time to time about alternatives in case Microsoft (or
> somebody else) returns to The Bad Old Ways. I hope it won't
> happen, but it might.
>

Backing up the git repo is not terribly troublesome because you just need
to to it regularly by cron job. Plus since git is distributed we have
copies of that repo all over the place and you can verify integrity through
the commit hashes, so even without an official backup we have a ton of
unofficial backups. :)

As for the PR data, that could be done by recording every webhook event
from our repo if someone wanted to. Then you could reconstruct things by
essentially replaying the log of events. There are also probably more
structured ways to do it as well if people cared.

But the key thing is someone has to take the time and effort to set
something up. I'm personally not planning to put in the effort since I
think there's a massively bigger chance we will switch hosts again rather
than GitHub deciding to shut off data access with no data export feature or
lead time such that we have to craft our own solution and we can't do it
fast enough to prevent the loss of data (and I don't think doing this ahead
of time for an eventual migration is worth it either as any platform we
move to might have its own migration support, etc.). IOW I ain't worried,
but I think everyone assumed that for me. :)
___
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] Docstrings on builtins

2018-06-06 Thread Chris Barker via Python-Dev
On Tue, Jun 5, 2018 at 8:01 AM, Ivan Pozdeev  wrote:

> In [5]: print(str.__doc__)
> str(object='') -> str
> str(bytes_or_buffer[, encoding[, errors]]) -> str
>
> Create a new string object from the given object. If encoding or
> errors is specified <...>
>
As you can see, the start of the type's docstring contains constructor
> signature(s).
>
> And iPython does the "right thing" here, too:

In [7]: str?
Init signature: str(self, /, *args, **kwargs)
Docstring:
str(object='') -> str
str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or
errors is specified, then the object must expose a data buffer
that will be decoded using the given encoding and error handler.
Otherwise, returns the result of object.__str__() (if defined)
or repr(object).
encoding defaults to sys.getdefaultencoding().
errors defaults to 'strict'.
Type:   type
>
> Timedelta's one should probably do the same.
>
OK, I've found the docstring in the source and will submit a PR.

-CHB





> -CHB
>
>
>
>
>
> On Mon, Jun 4, 2018 at 6:21 PM, Matthias Bussonnier <
> bussonniermatth...@gmail.com> wrote:
>
>>
>>
>> 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, /, *args, **kwargs)
>>> Then this may be some IPython internal logic. The timedelta class seem
>>> to use __new__ instead of __init__ (not sure why)
>>>
>>> Because it's an immutable type.
>>>
>> Ah, yes, thanks.
>>
>>
>>> and __new__ have a meaningful signature,
>>> So maybe we should fallback on that during signature inspection.
>>>
>>> According to https://stackoverflow.com/ques
>>> tions/4374006/check-for-mutability-in-python ,
>>> there are no reliable tests for mutability.
>>>
>> Sure, but we can test if the signature of __init__ is (self,/, *args,
>> **kwargs), and if it is,  it is useless we can attempt to get the signature
>> from __new__ and show that instead.  We do similar things for docstrings,
>> if __init__ have no docstring we look at the class level docstring.
>> --
>> M
>>
>>
>>
>> ___
>> 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/chris.
>> barker%40noaa.gov
>>
>>
>
>
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR(206) 526-6959   voice
> 7600 Sand Point Way NE
> 
>   (206) 526-6329   fax
> Seattle, WA  98115   (206) 526-6317   main reception
>
> chris.bar...@noaa.gov
>
>
> --
> Regards,
> Ivan
>
>


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
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] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-06 Thread Brett Cannon
On Wed, 6 Jun 2018 at 09:27 INADA Naoki  wrote:

>  First I was also
>> confused between travis-ci.com and travis-ci.org ... The documentation
>> shows an example with .com, but Python organization uses .org.
>>
>> Victor
>>
>
> .org is legacy.
>
> Open source projects can migrate to new .com.
>

... eventually: "existing user accounts and repositories will be migrated
over time." I have not seen any announcements or anything regarding how
when or how to migrate ourselves.

-Brett


>
> Maybe, ssh is .com only feature.
>
>
> https://blog.travis-ci.com/2018-05-02-open-source-projects-on-travis-ci-com-with-github-apps
>
> https://docs.travis-ci.com/user/open-source-on-travis-ci-com/
>
> ___
> 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/brett%40python.org
>
___
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] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-06 Thread INADA Naoki
>
>  First I was also
> confused between travis-ci.com and travis-ci.org ... The documentation
> shows an example with .com, but Python organization uses .org.
>
> Victor
>

.org is legacy.

Open source projects can migrate to new .com.

Maybe, ssh is .com only feature.

https://blog.travis-ci.com/2018-05-02-open-source-projects-on-travis-ci-com-with-github-apps

https://docs.travis-ci.com/user/open-source-on-travis-ci-com/
___
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] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-06 Thread Ivan Pozdeev via Python-Dev

On 06.06.2018 18:10, Victor Stinner wrote:

2018-06-04 21:37 GMT+02:00 Ivan Pozdeev :

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.

Did you already try it? The doc mentions a "[Debug]" button, but I
cannot see it whereas I'm logged in in the Python organization.
Last I checked, they wrote it's only available for paid accounts (on 
travis-ci.com) by default and only enabled for others on a case-by-case 
basis, but I cannot find this info now.
So suggest you make a support ticket at 
https://github.com/travis-ci/travis-ci .

I also tried the curl API call but it fails with:

{
   "@type": "error",
   "error_type": "wrong_credentials",
   "error_message": "access denied"
}

curl -s -X POST \
   -H "Content-Type: application/json" \
   -H "Accept: application/json" \
   -H "Travis-API-Version: 3" \
   -H "Authorization: token X" \
   -d "{\"quiet\": true}" \
   https://api.travis-ci.org/job/388706591/debug

where X is my hidden token ;-)

If I use an invalid token ID, I get a different error: just the string
"access denied", instead of a JSON dictionary. First I was also
confused between travis-ci.com and travis-ci.org ... The documentation
shows an example with .com, but Python organization uses .org.

Victor


--
Regards,
Ivan

___
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] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-06 Thread Victor Stinner
2018-06-04 21:37 GMT+02:00 Ivan Pozdeev :
> 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.

Did you already try it? The doc mentions a "[Debug]" button, but I
cannot see it whereas I'm logged in in the Python organization.

I also tried the curl API call but it fails with:

{
  "@type": "error",
  "error_type": "wrong_credentials",
  "error_message": "access denied"
}

curl -s -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Travis-API-Version: 3" \
  -H "Authorization: token X" \
  -d "{\"quiet\": true}" \
  https://api.travis-ci.org/job/388706591/debug

where X is my hidden token ;-)

If I use an invalid token ID, I get a different error: just the string
"access denied", instead of a JSON dictionary. First I was also
confused between travis-ci.com and travis-ci.org ... The documentation
shows an example with .com, but Python organization uses .org.

Victor
___
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] Python3 compiled listcomp can't see local var - bug or feature?

2018-06-06 Thread Nick Coghlan
On 6 June 2018 at 15:31, Rob Cliffe via Python-Dev 
wrote:

> Is this a bug or a feature?
> Consider the following program:
>
> # TestProgram.py
> def Test():
>   # global x
> x = 1
> exec(compile('print([x+1,x+2])', 'MyTest', 'exec'))
> exec(compile('print([x+i for i in range(1,3)])', 'MyTest', 'exec'))
> Test()
>
> In Python 2.7.15 the output is
>
> [2, 3]
> [2, 3]
>
> In Python 3.6.5 the output is
> [2, 3]
> Traceback (most recent call last):
>   File "TestProgram.py", line 7, in 
> Test()
>   File "TestProgram.py", line 6, in Test
> exec(compile('print([x+i for i in range(1,3)])', 'MyTest', 'exec'))
>   File "MyTest", line 1, in 
>   File "MyTest", line 1, in 
> NameError: name 'x' is not defined
>
> If the "global x" declaration is uncommented, this "fixes" the Python
> 3.6.5 behaviour,
> i.e. no error occurs and the output is the same as for Python 2.7.15.
>
> *In other words, it looks as if in Python 3.6.5, the compiled list
> comprehension*
> *can "see" a pre-existing global variable but not a local one.*
>
Yes, this is expected behaviour - the two-namespace form of exec (which is
what you get implicitly when you use it inside a function body) is similar
to a class body, and hence nested functions (including the implicit ones
created for comprehensions) can't see the top level local variables.

You can override that and force the use of the single-namespace form by
passing the locals() namespace into exec() explicitly:

def explicit_local_namespace():
x = 1
exec(compile('print([x+i for i in range(1,3)])', 'MyTest', 'exec'),
locals())
explicit_local_namespace()

(Note: you'll then need to use collections.ChainMap instead of separate
locals and globals namespaces if you want the exec'ed code to still be able
to see the module globals in addition to the function locals)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
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] Microsoft to acquire GitHub for $7.5 billion

2018-06-06 Thread Matěj Cepl
On 2018-06-05, 15:03 GMT, Nick Coghlan wrote:
> I was actually looking into this recently to see if the  
> repository import feature could be used to run a regularly 
> updated repository mirror that included all issues and PR 
> comments in addition to the code,

Good, thank you very much. I didn’t, so I just worked out of the 
PR materials and documentation on their side. I am glad somebody 
did.

> I'm more confident in my ability to predict Microsoft's 
> business incentives based on the prevailing technology 
> landscape than I am in my ability to predict the actions of 
> a VC firm like Andreesen Horowitz :) 

Perhaps. I still would be more comfortable, if we were thinking 
from time to time about alternatives in case Microsoft (or 
somebody else) returns to The Bad Old Ways. I hope it won't 
happen, but it might.

Best,

Matěj
-- 
https://matej.ceplovi.cz/blog/, Jabber: mc...@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
May integrity and uprightness preserve me, for I wait for you.
  -- Psalm 25:21 ESV

___
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