[Python-Dev] Re: Sponsoring Python development via the PSF

2019-06-27 Thread Ewa Jodlowska
On Wed, Jun 26, 2019 at 8:28 PM Wes Turner  wrote:

> When companies donate as PyCon sponsors (and get brand recognition) do
> those donations also go to PSF?


Yes, the PSF produces PyCon. PyCon sponsorships are used to help offset
PyCon expenses. If PyCon has a surplus, it is the PSF's revenue. PyCon's
surplus is the biggest source of revenue for the PSF.

>
>
> You can add the **Python Software Foundation** to a Charity Navigator
> "Giving Basket" and get one receipt:
> https://www.charitynavigator.org/index.cfm?bay=search.profile&ein=043594598
>
> "Charity Navigator's Methodology"
>
> https://www.charitynavigator.org/index.cfm?bay=content.view&cpid=5593#rating
>
>
> Is there any way to donate cryptocurrency to PSF yet?
>

Currently, we do not.

>
> All of these orgs accept BTC donations:
> https://en.bitcoin.it/wiki/Donation-accepting_organizations_and_projects
>
> Just sending to an address doesn't get you a receipt for tax purposes;
> there are firms that support donations by exchanging for USD at that time
> and depositing to the configured account.
>

That's good to know! If you know more info on this, please let me know. I
can share it with our accounting team to review.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/H6S63ZYTIFPUQTOJGEA54C7AH2MWSGEZ/


[Python-Dev] strip behavior provides inconsistent results with certain strings

2019-06-27 Thread dan
Anyone experienced anything like this?

The behavior seems consistent but unexpected.  

python 3.6 on both windows (10) and linux (ubuntu 18.04) seem to exhibit the 
same odd behavior.  

something about a docker-image looking string seems to trigger this behavior.  
The behavior seems as expected for other strings.


Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.


sample_string_1 = "namespace/something-plugin-extra:dev"

print(sample_string_1.lstrip("namespace/something-plugin"))
xtra:dev

print(sample_string_1.lstrip("namespace/something-plug"))
xtra:dev

print(sample_string_1.lstrip("namespace/something-plu"))
xtra:dev

print(sample_string_1.lstrip("namespace/something-pl"))
ugin-extra:dev


sample_string_1 = "namespace/something-plugxx-extra:dev"
print(sample_string_1.lstrip("namespace/something-plugin"))
xx-extra:dev

print(sample_string_1.lstrip("namespace/something-plug"))
xx-extra:dev

print(sample_string_1.lstrip("namespace/something-plu"))
xx-extra:dev

print(sample_string_1.lstrip("namespace/something-pl"))
ugxx-extra:dev



Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.


sample_string_1 = "namespace/something-plugin-extra:dev"
print(sample_string_1.lstrip("namespace/something-plugin"))
xtra:dev
print(sample_string_1.lstrip("namespace/something-plug"))
xtra:dev
print(sample_string_1.lstrip("namespace/something-plu"))
xtra:dev
print(sample_string_1.lstrip("namespace/something-pl"))
ugin-extra:dev


sample_string_1 = "namespace/something-plugxx-extra:dev"

print(sample_string_1.lstrip("namespace/something-plugin"))
xx-extra:dev

print(sample_string_1.lstrip("namespace/something-plug"))
xx-extra:dev

print(sample_string_1.lstrip("namespace/something-plu"))
xx-extra:dev

print(sample_string_1.lstrip("namespace/something-pl"))
ugxx-extra:dev
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/ZWRGCGANHGVDPP44VQKRIYOYX7LNVDVG/


[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread Chris Angelico
On Fri, Jun 28, 2019 at 1:02 AM  wrote:
>
> Anyone experienced anything like this?
>
> The behavior seems consistent but unexpected.
>
> python 3.6 on both windows (10) and linux (ubuntu 18.04) seem to exhibit the 
> same odd behavior.
>
> something about a docker-image looking string seems to trigger this behavior. 
>  The behavior seems as expected for other strings.
>
>
> Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 
> bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>
>
> sample_string_1 = "namespace/something-plugin-extra:dev"
>
> print(sample_string_1.lstrip("namespace/something-plugin"))
> xtra:dev
>

Help on built-in function lstrip:

lstrip(chars=None, /) method of builtins.str instance
Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

This does NOT remove a leading substring. It removes a set of characters.

ChrisA
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/VLAXGKLNRGAL5QDCXW7L3GWTFQN7Y7ZD/


[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread Calvin Spealman
String strip methods take a set of characters to strip, not a specific
string / character sequence. They remove ALL the characters in that set
from the left or right until the first character which is not in the set.

This can be simply demonstrated here:

>>> "foobar".strip("f")
'oobar'
>>> "foobar".strip("fo")
'bar'

On Thu, Jun 27, 2019 at 11:11 AM  wrote:

> Anyone experienced anything like this?
>
> The behavior seems consistent but unexpected.
>
> python 3.6 on both windows (10) and linux (ubuntu 18.04) seem to exhibit
> the same odd behavior.
>
> something about a docker-image looking string seems to trigger this
> behavior.  The behavior seems as expected for other strings.
>
>
> Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900
> 64 bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>
>
> sample_string_1 = "namespace/something-plugin-extra:dev"
>
> print(sample_string_1.lstrip("namespace/something-plugin"))
> xtra:dev
>
> print(sample_string_1.lstrip("namespace/something-plug"))
> xtra:dev
>
> print(sample_string_1.lstrip("namespace/something-plu"))
> xtra:dev
>
> print(sample_string_1.lstrip("namespace/something-pl"))
> ugin-extra:dev
>
>
> sample_string_1 = "namespace/something-plugxx-extra:dev"
> print(sample_string_1.lstrip("namespace/something-plugin"))
> xx-extra:dev
>
> print(sample_string_1.lstrip("namespace/something-plug"))
> xx-extra:dev
>
> print(sample_string_1.lstrip("namespace/something-plu"))
> xx-extra:dev
>
> print(sample_string_1.lstrip("namespace/something-pl"))
> ugxx-extra:dev
>
>
>
> Python 3.6.5 (default, Apr  1 2018, 05:46:30)
> [GCC 7.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>
>
> sample_string_1 = "namespace/something-plugin-extra:dev"
> print(sample_string_1.lstrip("namespace/something-plugin"))
> xtra:dev
> print(sample_string_1.lstrip("namespace/something-plug"))
> xtra:dev
> print(sample_string_1.lstrip("namespace/something-plu"))
> xtra:dev
> print(sample_string_1.lstrip("namespace/something-pl"))
> ugin-extra:dev
>
>
> sample_string_1 = "namespace/something-plugxx-extra:dev"
>
> print(sample_string_1.lstrip("namespace/something-plugin"))
> xx-extra:dev
>
> print(sample_string_1.lstrip("namespace/something-plug"))
> xx-extra:dev
>
> print(sample_string_1.lstrip("namespace/something-plu"))
> xx-extra:dev
>
> print(sample_string_1.lstrip("namespace/something-pl"))
> ugxx-extra:dev
> ___
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/ZWRGCGANHGVDPP44VQKRIYOYX7LNVDVG/
>


-- 

CALVIN SPEALMAN

SENIOR QUALITY ENGINEER

[email protected]  M: +1.336.210.5107
[image: https://red.ht/sig] 
TRIED. TESTED. TRUSTED. 
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/DKXUA4UJIZS2HDA2PBC6OTTH4W3KLOQD/


[Python-Dev] Sponsoring Python development via the PSF

2019-06-27 Thread Wes Turner
On Thursday, June 27, 2019, Ewa Jodlowska  wrote:

>
>
>
> On Wed, Jun 26, 2019 at 8:28 PM Wes Turner  wrote:
>
>> When companies donate as PyCon sponsors (and get brand recognition) do
>> those donations also go to PSF?
>
>
> Yes, the PSF produces PyCon. PyCon sponsorships are used to help offset
> PyCon expenses. If PyCon has a surplus, it is the PSF's revenue. PyCon's
> surplus is the biggest source of revenue for the PSF.
>
>>
>>
>> You can add the **Python Software Foundation** to a Charity Navigator
>> "Giving Basket" and get one receipt:
>> https://www.charitynavigator.org/index.cfm?bay=search.profil
>> e&ein=043594598
>>
>
>> "Charity Navigator's Methodology"
>> https://www.charitynavigator.org/index.cfm?bay=content.view&;
>> cpid=5593#rating
>>
>>
>> Is there any way to donate cryptocurrency to PSF yet?
>>
>
> Currently, we do not.
>
>>
>> All of these orgs accept BTC donations:
>> https://en.bitcoin.it/wiki/Donation-accepting_organizations_and_projects
>>
>> Just sending to an address doesn't get you a receipt for tax purposes;
>> there are firms that support donations by exchanging for USD at that time
>> and depositing to the configured account.
>>
>
> That's good to know! If you know more info on this, please let me know. I
> can share it with our accounting team to review.
>

Re: PSF accepting cryptoasset donations

Wikimedia, Save The Children, UNICEF, United Way, Mozilla, EFF, and FSF,
for example, all accept cryptocurrency donations.

OpenCollective reviews a number of possible payment solutions:
https://github.com/opencollective/opencollective/
issues/919#issuecomment-370218843 (now with a GitHub poll in the issue
description)

>From GuideStar (which, like Charity Navigator, also has nonprofit
evaluation criteria)
https://trust.guidestar.org/bitcoin-what-nonprofits-need-to-
know-and-how-it-might-give-your-fundraising-a-competitive-advantage :

> Accepting donations in Bitcoin can reduce the financial transaction fees
a nonprofit owes.  With Bitcoin, the costs are significantly lower compared
to checks, credit cards, and other digital options, and if your
organization is a registered 501(c)(3), there are zero transaction fees on
platforms such as Coinbase or Bitpay.  There is also no risk of bank
charges accruing to the nonprofit in the case of a donor using a fraudulent
credit card.

* Merch: It may be worth accepting cryptocurrency payments for PSF merch
like T-Shirts, Mugs, Polo shirts:
https://www.python.org/community/merchandise/

  * Coinbase Commerce integrates with a number of major eCommerce platforms:
https://commerce.coinbase.com/integrate

* SCHEMA.ORG/Offer and schema:Product markup improves SEO; so that when I
search for "PSF shirt" with an voice assistant on my way to PyCon, some
portion of that revenue should go to PSF

* From a conversation with Eric Holscher regarding ReadTheDocs' ethical ads
revenue model,

  * Yeti makes solid drinkware that can be customized with a logo:
https://www.yeti.com/en_US/custom-monogram-text-logo-drinkware

  * And, for accounting, Zapier automates connections between a bunch of
APIs with e.g. QuickBooks Online; which can save accounting's time for
things like copying merch invoices to the accounts payable, refund, and
chargeback accounting ledgerd.
  https://zapier.com/apps/quickbooks/integrations

* Integrating E.G. Shopify with QuickBooks doesn't require any Zapier Zaps.
Shopify also integrates with e.g. Amazon Fulfillment so that they can
manage inventory, returns, and shipping with their warehouses and efficient
logistics platform.:
https://quickbooks.intuit.com/integrations/shopify/

* There's a CreativeCommons-licensed logo SVG on Wikipedia. Organizations
listed on the Merch page have pledged to donate a portion of their proceeds
to PSF:
  https://commons.wikimedia.org/wiki/File:Python.svg

* What mailing list and/or CRM can I opt-into with my PSF donation? Is
there a periodic breakdown of expenses that I can backseat-drive and
micromanage?

>From Charity Navigator, it looks like PSF had about $ 2,500,000 in donation
revenue a few years ago.

Is there some form of a voluntary nonprofit sustainability report; the the
now #GlobalGoals-aligned GRI Standards?
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/APGNHJX7M6WYJ57O5TLHQSJL45Z5RIX4/


[Python-Dev] Re: Sponsoring Python development via the PSF

2019-06-27 Thread Wes Turner
Indeed,
When I donate to PSF, how does that work, what do I sponsoring?

AFAIU:

- Payment processing
- Prioritization and allocation
- Project Management
  with plans as RST documents on GitHub,
  issues on Roundup (bug and feature triage)
  discussions on mailing lists,
  discussions on discourse
- Software Development
  GitHub pull requests
- Release management
- More Fundraising & Marketing & PyCon

*We could* sponsor a part or full-time developer as an employee of our
organization, or donate to PSF to sponsor sprints and/or developers

On Thursday, June 27, 2019, Wes Turner  wrote:

>
>
> On Thursday, June 27, 2019, Ewa Jodlowska  wrote:
>
>>
>>
>>
>> On Wed, Jun 26, 2019 at 8:28 PM Wes Turner  wrote:
>>
>>> When companies donate as PyCon sponsors (and get brand recognition) do
>>> those donations also go to PSF?
>>
>>
>> Yes, the PSF produces PyCon. PyCon sponsorships are used to help offset
>> PyCon expenses. If PyCon has a surplus, it is the PSF's revenue. PyCon's
>> surplus is the biggest source of revenue for the PSF.
>>
>>>
>>>
>>> You can add the **Python Software Foundation** to a Charity Navigator
>>> "Giving Basket" and get one receipt:
>>> https://www.charitynavigator.org/index.cfm?bay=search.profil
>>> e&ein=043594598
>>>
>>
>>> "Charity Navigator's Methodology"
>>> https://www.charitynavigator.org/index.cfm?bay=content.view&;
>>> cpid=5593#rating
>>>
>>>
>>> Is there any way to donate cryptocurrency to PSF yet?
>>>
>>
>> Currently, we do not.
>>
>>>
>>> All of these orgs accept BTC donations:
>>> https://en.bitcoin.it/wiki/Donation-accepting_organizations_and_projects
>>>
>>> Just sending to an address doesn't get you a receipt for tax purposes;
>>> there are firms that support donations by exchanging for USD at that time
>>> and depositing to the configured account.
>>>
>>
>> That's good to know! If you know more info on this, please let me know. I
>> can share it with our accounting team to review.
>>
>
> Re: PSF accepting cryptoasset donations
>
> Wikimedia, Save The Children, UNICEF, United Way, Mozilla, EFF, and FSF,
> for example, all accept cryptocurrency donations.
>
> OpenCollective reviews a number of possible payment solutions:
> https://github.com/opencollective/opencollective/
> issues/919#issuecomment-370218843 (now with a GitHub poll in the issue
> description)
>
> From GuideStar (which, like Charity Navigator, also has nonprofit
> evaluation criteria)
> https://trust.guidestar.org/bitcoin-what-nonprofits-need-to-
> know-and-how-it-might-give-your-fundraising-a-competitive-advantage :
>
> > Accepting donations in Bitcoin can reduce the financial transaction fees
> a nonprofit owes.  With Bitcoin, the costs are significantly lower compared
> to checks, credit cards, and other digital options, and if your
> organization is a registered 501(c)(3), there are zero transaction fees on
> platforms such as Coinbase or Bitpay.  There is also no risk of bank
> charges accruing to the nonprofit in the case of a donor using a fraudulent
> credit card.
>
> * Merch: It may be worth accepting cryptocurrency payments for PSF merch
> like T-Shirts, Mugs, Polo shirts: https://www.python.org/
> community/merchandise/
>
>   * Coinbase Commerce integrates with a number of major eCommerce
> platforms:
> https://commerce.coinbase.com/integrate
>
> * SCHEMA.ORG/Offer and schema:Product markup improves SEO; so that when I
> search for "PSF shirt" with an voice assistant on my way to PyCon, some
> portion of that revenue should go to PSF
>
> * From a conversation with Eric Holscher regarding ReadTheDocs' ethical
> ads revenue model,
>
>   * Yeti makes solid drinkware that can be customized with a logo:
> https://www.yeti.com/en_US/custom-monogram-text-logo-drinkware
>
>   * And, for accounting, Zapier automates connections between a bunch of
> APIs with e.g. QuickBooks Online; which can save accounting's time for
> things like copying merch invoices to the accounts payable, refund, and
> chargeback accounting ledgerd.
>   https://zapier.com/apps/quickbooks/integrations
>
> * Integrating E.G. Shopify with QuickBooks doesn't require any Zapier
> Zaps. Shopify also integrates with e.g. Amazon Fulfillment so that they can
> manage inventory, returns, and shipping with their warehouses and efficient
> logistics platform.:
> https://quickbooks.intuit.com/integrations/shopify/
>
> * There's a CreativeCommons-licensed logo SVG on Wikipedia. Organizations
> listed on the Merch page have pledged to donate a portion of their proceeds
> to PSF:
>   https://commons.wikimedia.org/wiki/File:Python.svg
>
> * What mailing list and/or CRM can I opt-into with my PSF donation? Is
> there a periodic breakdown of expenses that I can backseat-drive and
> micromanage?
>
> From Charity Navigator, it looks like PSF had about $ 2,500,000 in
> donation revenue a few years ago.
>
> Is there some form of a voluntary nonprofit sustainability report; the the
> now #GlobalGoals-aligned GRI Standards?
>
_

[Python-Dev] Re: Sponsoring Python development via the PSF

2019-06-27 Thread Ewa Jodlowska
On Thu, Jun 27, 2019 at 11:16 AM Wes Turner  wrote:

>
> From GuideStar (which, like Charity Navigator, also has nonprofit
> evaluation criteria)
>
> https://trust.guidestar.org/bitcoin-what-nonprofits-need-to-know-and-how-it-might-give-your-fundraising-a-competitive-advantage
> :
>
> > Accepting donations in Bitcoin can reduce the financial transaction fees
> a nonprofit owes.  With Bitcoin, the costs are significantly lower compared
> to checks, credit cards, and other digital options, and if your
> organization is a registered 501(c)(3), there are zero transaction fees on
> platforms such as Coinbase or Bitpay.  There is also no risk of bank
> charges accruing to the nonprofit in the case of a donor using a fraudulent
> credit card.
>
> * Merch: It may be worth accepting cryptocurrency payments for PSF merch
> like T-Shirts, Mugs, Polo shirts:
> https://www.python.org/community/merchandise/
>
>   * Coinbase Commerce integrates with a number of major eCommerce
> platforms:
> https://commerce.coinbase.com/integrate
>
>
> I'll share Coinbase with our team for review.


> * What mailing list and/or CRM can I opt-into with my PSF donation? Is
> there a periodic breakdown of expenses that I can backseat-drive and
> micromanage?
>

We go over our finances at the PSF member meetings at PyCon and the
EuroPython. In addition to what we have on python.org (
https://www.python.org/psf/annual-report/2019/,
https://www.python.org/psf/records/board/treasurer/), financials are also
sent to voting members ([email protected]). The 2018 financials will be
sent there this month. If anyone wants to become a voting member of the
PSF, let me know off-list and I'll be happy to share the available options!

>
> From Charity Navigator, it looks like PSF had about $ 2,500,000 in
> donation revenue a few years ago.
>

As of end of 2018, the PSF had almost 3.3M in assets. In 2018, we received
$515,000 from "Contributions, Membership Dues, and Grants" (
https://www.python.org/psf/annual-report/2019/). In 2016, our
"Contributions, Membership Dues, and Grants" totaled approximately $148,024
to give you a comparison of how things are developing over time.

The Annual Impact report also addresses the need for a financial reserve:

"The PSF will continue to research diversifying revenue streams, hiring
additional staff, and improving our fundraising efforts, which will all
affect future financials. We would like to continue to improve the services
we provide to the community, expand our programs, and better support
developers. We also need to consider risk mitigating factors such as having
diverse revenue streams instead of heavily relying on PyCon and a financial
reserve of at least 1.5 years (in operating costs). This will help ensure
the PSF’s viability for the long run."
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/QEENX2VX3HPTM4P7H2AZFQLW3OK6R7KF/


[Python-Dev] Re: Sponsoring Python development via the PSF

2019-06-27 Thread Wes Turner
On Thursday, June 27, 2019, Ewa Jodlowska  wrote:

>
>
> On Thu, Jun 27, 2019 at 11:16 AM Wes Turner  wrote:
>
>>
>> From GuideStar (which, like Charity Navigator, also has nonprofit
>> evaluation criteria)
>> https://trust.guidestar.org/bitcoin-what-nonprofits-need-
>> to-know-and-how-it-might-give-your-fundraising-a-competitive-advantage :
>>
>> > Accepting donations in Bitcoin can reduce the financial transaction
>> fees a nonprofit owes.  With Bitcoin, the costs are significantly lower
>> compared to checks, credit cards, and other digital options, and if your
>> organization is a registered 501(c)(3), there are zero transaction fees on
>> platforms such as Coinbase or Bitpay.  There is also no risk of bank
>> charges accruing to the nonprofit in the case of a donor using a fraudulent
>> credit card.
>>
>> * Merch: It may be worth accepting cryptocurrency payments for PSF merch
>> like T-Shirts, Mugs, Polo shirts: https://www.python.org/
>> community/merchandise/
>>
>>   * Coinbase Commerce integrates with a number of major eCommerce
>> platforms:
>> https://commerce.coinbase.com/integrate
>>
>>
>> I'll share Coinbase with our team for review.
>
>
>> * What mailing list and/or CRM can I opt-into with my PSF donation? Is
>> there a periodic breakdown of expenses that I can backseat-drive and
>> micromanage?
>>
>
> We go over our finances at the PSF member meetings at PyCon and the
> EuroPython. In addition to what we have on python.org (
> https://www.python.org/psf/annual-report/2019/, https://
> www.python.org/psf/records/board/treasurer/), financials are also sent to
> voting members ([email protected]).
>
The 2018 financials will be sent there this month.
>

Thanks!


>  If anyone wants to become a voting member of the PSF, let me know
> off-list and I'll be happy to share the available options!
>


>
>> From Charity Navigator, it looks like PSF had about $ 2,500,000 in
>> donation revenue a few years ago.
>>
>
> As of end of 2018, the PSF had almost 3.3M in assets. In 2018, we received
> $515,000 from "Contributions, Membership Dues, and Grants" (
> https://www.python.org/psf/annual-report/2019/). In 2016, our
> "Contributions, Membership Dues, and Grants" totaled approximately $148,024
> to give you a comparison of how things are developing over time.
>

$515,000 in 2018, thanks. An infographic on the donation page might
increase conversions.


>
> The Annual Impact report also addresses the need for a financial reserve:
>
> "The PSF will continue to research diversifying revenue streams, hiring
> additional staff, and improving our fundraising efforts, which will all
> affect future financials. We would like to continue to improve the services
> we provide to the community, expand our programs, and better support
> developers. We also need to consider risk mitigating factors such as having
> diverse revenue streams instead of heavily relying on PyCon and a financial
> reserve of at least 1.5 years (in operating costs). This will help ensure
> the PSF’s viability for the long run."
>

+1
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/7PHTBINPBQ7R5UT7HLTFOXDYWM2IIMSE/


[Python-Dev] Re: Sponsoring Python development via the PSF

2019-06-27 Thread Wes Turner
"Earmarked" funding is an additional funding model for the Python ecosystem
that PSF is a big part of.

For example, the new 2FA and limited use package upload token support for
PyPI (PyPA/warehouse) is sponsored by a specific grant.

Is there a way for third party organizations to say, "yeah, we sponsored
this or that".

When I go to the donation page, can I see all of the ways to contribute
time, trained resources, and money? Maybe I'm looking for a shirt, maybe
I'm looking to send in our best guy to let's get it done here

On Thursday, June 27, 2019, Wes Turner  wrote:

> Indeed,
> When I donate to PSF, how does that work, what do I sponsoring?
>
> AFAIU:
>
> - Payment processing
> - Prioritization and allocation
> - Project Management
>   with plans as RST documents on GitHub,
>   issues on Roundup (bug and feature triage)
>   discussions on mailing lists,
>   discussions on discourse
> - Software Development
>   GitHub pull requests
> - Release management
> - More Fundraising & Marketing & PyCon
>
> *We could* sponsor a part or full-time developer as an employee of our
> organization, or donate to PSF to sponsor sprints and/or developers
>
> On Thursday, June 27, 2019, Wes Turner  wrote:
>
>>
>>
>> On Thursday, June 27, 2019, Ewa Jodlowska  wrote:
>>
>>>
>>>
>>>
>>> On Wed, Jun 26, 2019 at 8:28 PM Wes Turner  wrote:
>>>
 When companies donate as PyCon sponsors (and get brand recognition) do
 those donations also go to PSF?
>>>
>>>
>>> Yes, the PSF produces PyCon. PyCon sponsorships are used to help offset
>>> PyCon expenses. If PyCon has a surplus, it is the PSF's revenue. PyCon's
>>> surplus is the biggest source of revenue for the PSF.
>>>


 You can add the **Python Software Foundation** to a Charity Navigator
 "Giving Basket" and get one receipt:
 https://www.charitynavigator.org/index.cfm?bay=search.profil
 e&ein=043594598

>>>
 "Charity Navigator's Methodology"
 https://www.charitynavigator.org/index.cfm?bay=content.view&;
 cpid=5593#rating


 Is there any way to donate cryptocurrency to PSF yet?

>>>
>>> Currently, we do not.
>>>

 All of these orgs accept BTC donations:
 https://en.bitcoin.it/wiki/Donation-accepting_organizations_
 and_projects

 Just sending to an address doesn't get you a receipt for tax purposes;
 there are firms that support donations by exchanging for USD at that time
 and depositing to the configured account.

>>>
>>> That's good to know! If you know more info on this, please let me know.
>>> I can share it with our accounting team to review.
>>>
>>
>> Re: PSF accepting cryptoasset donations
>>
>> Wikimedia, Save The Children, UNICEF, United Way, Mozilla, EFF, and FSF,
>> for example, all accept cryptocurrency donations.
>>
>> OpenCollective reviews a number of possible payment solutions:
>> https://github.com/opencollective/opencollective/
>> issues/919#issuecomment-370218843 (now with a GitHub poll in the issue
>> description)
>>
>> From GuideStar (which, like Charity Navigator, also has nonprofit
>> evaluation criteria)
>> https://trust.guidestar.org/bitcoin-what-nonprofits-need-to-
>> know-and-how-it-might-give-your-fundraising-a-competitive-advantage :
>>
>> > Accepting donations in Bitcoin can reduce the financial transaction
>> fees a nonprofit owes.  With Bitcoin, the costs are significantly lower
>> compared to checks, credit cards, and other digital options, and if your
>> organization is a registered 501(c)(3), there are zero transaction fees on
>> platforms such as Coinbase or Bitpay.  There is also no risk of bank
>> charges accruing to the nonprofit in the case of a donor using a fraudulent
>> credit card.
>>
>> * Merch: It may be worth accepting cryptocurrency payments for PSF merch
>> like T-Shirts, Mugs, Polo shirts: https://www.python.org/communi
>> ty/merchandise/
>>
>>   * Coinbase Commerce integrates with a number of major eCommerce
>> platforms:
>> https://commerce.coinbase.com/integrate
>>
>> * SCHEMA.ORG/Offer and schema:Product markup improves SEO; so that when
>> I search for "PSF shirt" with an voice assistant on my way to PyCon, some
>> portion of that revenue should go to PSF
>>
>> * From a conversation with Eric Holscher regarding ReadTheDocs' ethical
>> ads revenue model,
>>
>>   * Yeti makes solid drinkware that can be customized with a logo:
>> https://www.yeti.com/en_US/custom-monogram-text-logo-drinkware
>>
>>   * And, for accounting, Zapier automates connections between a bunch of
>> APIs with e.g. QuickBooks Online; which can save accounting's time for
>> things like copying merch invoices to the accounts payable, refund, and
>> chargeback accounting ledgerd.
>>   https://zapier.com/apps/quickbooks/integrations
>>
>> * Integrating E.G. Shopify with QuickBooks doesn't require any Zapier
>> Zaps. Shopify also integrates with e.g. Amazon Fulfillment so that they can
>> manage inventory, returns, and shipping with their warehouses a

[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread Steven D'Aprano
On Fri, Jun 28, 2019 at 01:08:45AM +1000, Chris Angelico wrote:

> Help on built-in function lstrip:
[...]
> This does NOT remove a leading substring. It removes a set of characters.

This is a re-occurring painpoint and gotcha. I've fallen for it myself. 
I really think it's long past time we bite the bullet and add a pair of 
methods to strip a prefix and suffix from strings.

My preferred bikeshed colour would be strip_prefix and strip_suffix.

Will this need a PEP?



-- 
Steven
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/HEZVBBVAV57AZ37KB6FUNYP7ENOBOIAU/


[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread Ethan Furman

On 06/27/2019 07:34 AM, [email protected] wrote:


Anyone experienced anything like this?


This list is for the development /of/ Python, not development /with/ Python.  
In the future, please take such questions to, for example, Python List*.

--
~Ethan~


* https://mail.python.org/mailman/listinfo/python-list
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/LKWPFI5EBMEPDXAII6ABIU3ZBIOETHLK/


[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread dan
excellent and extraordinarily obvious

Thanks for the pointer.

a bit unfortunate that old docs for a module that doesn't seem to exist in py3 
with less clear but still correct words is still the top google result for 
python string strip.  

https://docs.python.org/2/library/string.html#string.lstrip

 string.lstrip(s[, chars])¶

Return a copy of the string with leading characters removed. If chars is 
omitted or None, whitespace characters are removed. If given and not None, 
chars must be a string; the characters in the string will be stripped from the 
beginning of the string this method is called on.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/EL26KYH6P6I6KWXKM7DUF46HVGGV6USV/


[Python-Dev] Snapshot formats in tracemalloc vs profiler

2019-06-27 Thread Yonatan Zunger
Hi everyone,

Something occurred to me while trying to analyze code today: profiler and
cProfiler emit their data in pstats format, which various tools and
libraries consume. tracemalloc, on the other hand, uses a completely
separate format which nonetheless contains similar data. In fact, in many
non-Python applications I've worked in, heap and CPU profiles were always
emitted in identical formats, which allowed things like visual
representations of stack traces where memory is allocated, and these have
proven quite useful in practice and allowed lots of sharing of tools across
many applications.

Is there a particular design reason why these formats are different in
Python right now? Would it make sense to consider allowing them to match,
e.g. having a tracemalloc.dump_pstats() method?

Yonatan
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/3JFFWGJ57LQRZI3CVJXF5P7NYRCEWCJB/


[Python-Dev] Re: Sponsoring Python development via the PSF

2019-06-27 Thread Wes Turner
On Thu, Jun 27, 2019 at 1:27 PM Wes Turner  wrote:

> Is there a way for third party organizations to say, "yeah, we sponsored
> this or that".
>
> When I go to the donation page, can I see all of the ways to contribute
> time, trained resources, and money? Maybe I'm looking for a shirt, maybe
> I'm looking to send in our best guy to let's get it done here
>

Say I'm a person who's looking to take some time off and do a tour with PSF.
To donate some talent to the Python Community.

I missed HR (Hiring, Contracts, Benefits) on the list above.
That may be because I, too, like to do coding most of the time, too.

Buy say I'm a person who's looking to take some time off
and do a tour with PSF;
sort of like 18F, Defense Digital Service, US Digital Services (USDS);
with talent from industry contributing their time
in more of a startup / intrapreneurial environment.

Pitch me. What do I do for healthcare,
with my retirement savings 401(k) and/or IRA Independent Retirement Account?
Do I even need to roll anything over to
come help out full time for a few years?

I can read the Contributing section of the Devguide,
https://devguide.python.org/#contributing

And learn about the systems that power the Python community
software development workflows (including the cool git repo bots),
but when I consider donating money,
how can we upsell me to considering doing a tour with PSF?

Maybe I want to:

- buy a shirt, a hat,
- send a cash money donation (and get my tax receipt)
  https://www.python.org/psf/donations/
- donate corporate resources
  https://www.python.org/psf/sponsorship/ #sponsorship-levels
- pay developers with healthcare and give them some time
- decide when in my career would be a good time
  to consider PSF Membership and Fellowship

...

There are a number of online payroll, contracts, and benefits management
solutions. FounderKit has reviews of self-service HR solutions:
https://founderkit.com/biz/gusto



>
> On Thursday, June 27, 2019, Wes Turner  wrote:
>
>> Indeed,
>> When I donate to PSF, how does that work, what do I sponsoring?
>>
>> AFAIU:
>>
>> - Payment processing
>> - Prioritization and allocation
>> - Project Management
>>   with plans as RST documents on GitHub,
>>   issues on Roundup (bug and feature triage)
>>   discussions on mailing lists,
>>   discussions on discourse
>> - Software Development
>>   GitHub pull requests
>> - Release management
>> - More Fundraising & Marketing & PyCon
>>
>> *We could* sponsor a part or full-time developer as an employee of our
>> organization, or donate to PSF to sponsor sprints and/or developers
>>
>> On Thursday, June 27, 2019, Wes Turner  wrote:
>>
>>>
>>>
>>> On Thursday, June 27, 2019, Ewa Jodlowska  wrote:
>>>



 On Wed, Jun 26, 2019 at 8:28 PM Wes Turner 
 wrote:

> When companies donate as PyCon sponsors (and get brand recognition) do
> those donations also go to PSF?


 Yes, the PSF produces PyCon. PyCon sponsorships are used to help offset
 PyCon expenses. If PyCon has a surplus, it is the PSF's revenue. PyCon's
 surplus is the biggest source of revenue for the PSF.

>
>
> You can add the **Python Software Foundation** to a Charity Navigator
> "Giving Basket" and get one receipt:
>
> https://www.charitynavigator.org/index.cfm?bay=search.profile&ein=043594598
>
>

> "Charity Navigator's Methodology"
>
> https://www.charitynavigator.org/index.cfm?bay=content.view&cpid=5593#rating
>
>
> Is there any way to donate cryptocurrency to PSF yet?
>

 Currently, we do not.

>
> All of these orgs accept BTC donations:
>
> https://en.bitcoin.it/wiki/Donation-accepting_organizations_and_projects
>
> Just sending to an address doesn't get you a receipt for tax purposes;
> there are firms that support donations by exchanging for USD at that time
> and depositing to the configured account.
>

 That's good to know! If you know more info on this, please let me know.
 I can share it with our accounting team to review.

>>>
>>> Re: PSF accepting cryptoasset donations
>>>
>>> Wikimedia, Save The Children, UNICEF, United Way, Mozilla, EFF, and FSF,
>>> for example, all accept cryptocurrency donations.
>>>
>>> OpenCollective reviews a number of possible payment solutions:
>>> https://github.com/opencollective/opencollective/issues/919#issuecomment-370218843
>>>  (now
>>> with a GitHub poll in the issue description)
>>>
>>> From GuideStar (which, like Charity Navigator, also has nonprofit
>>> evaluation criteria)
>>>
>>> https://trust.guidestar.org/bitcoin-what-nonprofits-need-to-know-and-how-it-might-give-your-fundraising-a-competitive-advantage
>>> :
>>>
>>> > Accepting donations in Bitcoin can reduce the financial transaction
>>> fees a nonprofit owes.  With Bitcoin, the costs are significantly lower
>>> compared to checks, credit cards, and other digital options, and if your
>>> org

[Python-Dev] Re: Sponsoring Python development via the PSF

2019-06-27 Thread Wes Turner
"PSF Prospectus 2018-2019.pdf"
https://www.dropbox.com/s/a479lb6jz4yhr4x/PSF%20Prospectus%202018-2019.pdf

On Thu, Jun 27, 2019 at 2:12 PM Wes Turner  wrote:

>
>
> On Thu, Jun 27, 2019 at 1:27 PM Wes Turner  wrote:
>
>> Is there a way for third party organizations to say, "yeah, we sponsored
>> this or that".
>>
>> When I go to the donation page, can I see all of the ways to contribute
>> time, trained resources, and money? Maybe I'm looking for a shirt, maybe
>> I'm looking to send in our best guy to let's get it done here
>>
>
> Say I'm a person who's looking to take some time off and do a tour with
> PSF.
> To donate some talent to the Python Community.
>
> I missed HR (Hiring, Contracts, Benefits) on the list above.
> That may be because I, too, like to do coding most of the time, too.
>
> Buy say I'm a person who's looking to take some time off
> and do a tour with PSF;
> sort of like 18F, Defense Digital Service, US Digital Services (USDS);
> with talent from industry contributing their time
> in more of a startup / intrapreneurial environment.
>
> Pitch me. What do I do for healthcare,
> with my retirement savings 401(k) and/or IRA Independent Retirement
> Account?
> Do I even need to roll anything over to
> come help out full time for a few years?
>
> I can read the Contributing section of the Devguide,
> https://devguide.python.org/#contributing
>
> And learn about the systems that power the Python community
> software development workflows (including the cool git repo bots),
> but when I consider donating money,
> how can we upsell me to considering doing a tour with PSF?
>
> Maybe I want to:
>
> - buy a shirt, a hat,
> - send a cash money donation (and get my tax receipt)
>   https://www.python.org/psf/donations/
> - donate corporate resources
>   https://www.python.org/psf/sponsorship/ #sponsorship-levels
> - pay developers with healthcare and give them some time
> - decide when in my career would be a good time
>   to consider PSF Membership and Fellowship
>
> ...
>
> There are a number of online payroll, contracts, and benefits management
> solutions. FounderKit has reviews of self-service HR solutions:
> https://founderkit.com/biz/gusto
>
>
>
>>
>> On Thursday, June 27, 2019, Wes Turner  wrote:
>>
>>> Indeed,
>>> When I donate to PSF, how does that work, what do I sponsoring?
>>>
>>> AFAIU:
>>>
>>> - Payment processing
>>> - Prioritization and allocation
>>> - Project Management
>>>   with plans as RST documents on GitHub,
>>>   issues on Roundup (bug and feature triage)
>>>   discussions on mailing lists,
>>>   discussions on discourse
>>> - Software Development
>>>   GitHub pull requests
>>> - Release management
>>> - More Fundraising & Marketing & PyCon
>>>
>>> *We could* sponsor a part or full-time developer as an employee of our
>>> organization, or donate to PSF to sponsor sprints and/or developers
>>>
>>> On Thursday, June 27, 2019, Wes Turner  wrote:
>>>


 On Thursday, June 27, 2019, Ewa Jodlowska  wrote:

>
>
>
> On Wed, Jun 26, 2019 at 8:28 PM Wes Turner 
> wrote:
>
>> When companies donate as PyCon sponsors (and get brand recognition)
>> do those donations also go to PSF?
>
>
> Yes, the PSF produces PyCon. PyCon sponsorships are used to help
> offset PyCon expenses. If PyCon has a surplus, it is the PSF's revenue.
> PyCon's surplus is the biggest source of revenue for the PSF.
>
>>
>>
>> You can add the **Python Software Foundation** to a Charity Navigator
>> "Giving Basket" and get one receipt:
>>
>> https://www.charitynavigator.org/index.cfm?bay=search.profile&ein=043594598
>>
>>
>
>> "Charity Navigator's Methodology"
>>
>> https://www.charitynavigator.org/index.cfm?bay=content.view&cpid=5593#rating
>>
>>
>> Is there any way to donate cryptocurrency to PSF yet?
>>
>
> Currently, we do not.
>
>>
>> All of these orgs accept BTC donations:
>>
>> https://en.bitcoin.it/wiki/Donation-accepting_organizations_and_projects
>>
>> Just sending to an address doesn't get you a receipt for tax
>> purposes; there are firms that support donations by exchanging for USD at
>> that time and depositing to the configured account.
>>
>
> That's good to know! If you know more info on this, please let me
> know. I can share it with our accounting team to review.
>

 Re: PSF accepting cryptoasset donations

 Wikimedia, Save The Children, UNICEF, United Way, Mozilla, EFF, and
 FSF, for example, all accept cryptocurrency donations.

 OpenCollective reviews a number of possible payment solutions:
 https://github.com/opencollective/opencollective/issues/919#issuecomment-370218843
  (now
 with a GitHub poll in the issue description)

 From GuideStar (which, like Charity Navigator, also has nonprofit
 evaluation criteria)

 https://trust.guidestar.org/

[Python-Dev] Re: Sponsoring Python development via the PSF

2019-06-27 Thread Hobson Lane
I wholeheartedly support accepting Bitcoin and Etherium and other popular
cryptos at PSF. Bitpay is an alternative, but they can be more complicated
to work with than Coinbase. Of course you can always chose to manage your
own crypto wallet independent of any go-between business, but that has
risks too. Coinbase would be my last choice, however. It has been involved
in some shady business practices that would be illegal if they were
regulated as strictly as a bank or brokerage is.
- From the very beginning Coinbase has been accused of insider trading,
front-trading, market manipulation, and outright fraud in class action
lawsuits such as this one:
https://www.silvermillerlaw.com/current-investigations/coinbase-class-action/
- In times of dips or spikes in price they sometimes prevent some
depositors from accessing their funds for extended periods of time (I've
been unable to access my account for years now, and others I know have had
similar difficulties).
- They profit on bid/ask spreads, like most brokerages or financial
markets, but they aren't regulated as strictly as traditional
brokerages+banks so that spread can be quite broad and the invisible loss
of value for frequent depositors/payors can be significant.

--Hobson



On Thu, Jun 27, 2019 at 10:40 AM Wes Turner  wrote:

>
>
> On Thursday, June 27, 2019, Ewa Jodlowska  wrote:
>
>>
>>
>> On Thu, Jun 27, 2019 at 11:16 AM Wes Turner  wrote:
>>
>>>
>>> From GuideStar (which, like Charity Navigator, also has nonprofit
>>> evaluation criteria)
>>>
>>> https://trust.guidestar.org/bitcoin-what-nonprofits-need-to-know-and-how-it-might-give-your-fundraising-a-competitive-advantage
>>> :
>>>
>>> > Accepting donations in Bitcoin can reduce the financial transaction
>>> fees a nonprofit owes.  With Bitcoin, the costs are significantly lower
>>> compared to checks, credit cards, and other digital options, and if your
>>> organization is a registered 501(c)(3), there are zero transaction fees on
>>> platforms such as Coinbase or Bitpay.  There is also no risk of bank
>>> charges accruing to the nonprofit in the case of a donor using a fraudulent
>>> credit card.
>>>
>>> * Merch: It may be worth accepting cryptocurrency payments for PSF merch
>>> like T-Shirts, Mugs, Polo shirts:
>>> https://www.python.org/community/merchandise/
>>>
>>>   * Coinbase Commerce integrates with a number of major eCommerce
>>> platforms:
>>> https://commerce.coinbase.com/integrate
>>>
>>>
>>> I'll share Coinbase with our team for review.
>>
>>
>>> * What mailing list and/or CRM can I opt-into with my PSF donation? Is
>>> there a periodic breakdown of expenses that I can backseat-drive and
>>> micromanage?
>>>
>>
>> We go over our finances at the PSF member meetings at PyCon and the
>> EuroPython. In addition to what we have on python.org (
>> https://www.python.org/psf/annual-report/2019/,
>> https://www.python.org/psf/records/board/treasurer/), financials are
>> also sent to voting members ([email protected]).
>>
> The 2018 financials will be sent there this month.
>>
>
> Thanks!
>
>
>>  If anyone wants to become a voting member of the PSF, let me know
>> off-list and I'll be happy to share the available options!
>>
>
>
>>
>>> From Charity Navigator, it looks like PSF had about $ 2,500,000 in
>>> donation revenue a few years ago.
>>>
>>
>> As of end of 2018, the PSF had almost 3.3M in assets. In 2018, we
>> received $515,000 from "Contributions, Membership Dues, and Grants" (
>> https://www.python.org/psf/annual-report/2019/). In 2016, our
>> "Contributions, Membership Dues, and Grants" totaled approximately $148,024
>> to give you a comparison of how things are developing over time.
>>
>
> $515,000 in 2018, thanks. An infographic on the donation page might
> increase conversions.
>
>
>>
>> The Annual Impact report also addresses the need for a financial reserve:
>>
>> "The PSF will continue to research diversifying revenue streams, hiring
>> additional staff, and improving our fundraising efforts, which will all
>> affect future financials. We would like to continue to improve the services
>> we provide to the community, expand our programs, and better support
>> developers. We also need to consider risk mitigating factors such as having
>> diverse revenue streams instead of heavily relying on PyCon and a financial
>> reserve of at least 1.5 years (in operating costs). This will help ensure
>> the PSF’s viability for the long run."
>>
>
> +1
> ___
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/7PHTBINPBQ7R5UT7HLTFOXDYWM2IIMSE/
>
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/

[Python-Dev] Re: Sponsoring Python development via the PSF

2019-06-27 Thread Wes Turner
On Thu, Jun 27, 2019 at 2:17 PM Hobson Lane  wrote:

> I wholeheartedly support accepting Bitcoin and Etherium and other popular
> cryptos at PSF. Bitpay is an alternative, but they can be more complicated
> to work with than Coinbase. Of course you can always chose to manage your
> own crypto wallet independent of any go-between business, but that has
> risks too.
>

Here's a possible spec / criteria for considering a solution for
cryptocurrency donations :

- a webapp (over TLS) to  collect personal information (that should not be
stored in a public blockchain for GDPR-compliance) and generate receipts
witha template suitable for tax deduction (in the US, and [...])
- FDIC deposit insurance protection for any funds held in USD in the
exchange*
- regulatory approval to operate within the given territories
- no-fee payment processing for nonprofits

\* For donations immediately cashed out to a bank account over direct
deposit (ACH (SFTP+PGP)) at the non-stable present value, you only need to
hold funds in USD while deposits to the configured bank account are pending


> Coinbase would be my last choice, however. It has been involved in some
> shady business practices that would be illegal if they were regulated as
> strictly as a bank or brokerage is.
> - From the very beginning Coinbase has been accused of insider trading,
> front-trading, market manipulation, and outright fraud in class action
> lawsuits such as this one:
> https://www.silvermillerlaw.com/current-investigations/coinbase-class-action/
> - In times of dips or spikes in price they sometimes prevent some
> depositors from accessing their funds for extended periods of time (I've
> been unable to access my account for years now, and others I know have had
> similar difficulties).
> - They profit on bid/ask spreads, like most brokerages or financial
> markets, but they aren't regulated as strictly as traditional
> brokerages+banks so that spread can be quite broad and the invisible loss
> of value for frequent depositors/payors can be significant.
>
> --Hobson
>
>
>
> On Thu, Jun 27, 2019 at 10:40 AM Wes Turner  wrote:
>
>>
>>
>> On Thursday, June 27, 2019, Ewa Jodlowska  wrote:
>>
>>>
>>>
>>> On Thu, Jun 27, 2019 at 11:16 AM Wes Turner 
>>> wrote:
>>>

 From GuideStar (which, like Charity Navigator, also has nonprofit
 evaluation criteria)

 https://trust.guidestar.org/bitcoin-what-nonprofits-need-to-know-and-how-it-might-give-your-fundraising-a-competitive-advantage
 :

 > Accepting donations in Bitcoin can reduce the financial transaction
 fees a nonprofit owes.  With Bitcoin, the costs are significantly lower
 compared to checks, credit cards, and other digital options, and if your
 organization is a registered 501(c)(3), there are zero transaction fees on
 platforms such as Coinbase or Bitpay.  There is also no risk of bank
 charges accruing to the nonprofit in the case of a donor using a fraudulent
 credit card.

 * Merch: It may be worth accepting cryptocurrency payments for PSF
 merch like T-Shirts, Mugs, Polo shirts:
 https://www.python.org/community/merchandise/

   * Coinbase Commerce integrates with a number of major eCommerce
 platforms:
 https://commerce.coinbase.com/integrate


 I'll share Coinbase with our team for review.
>>>
>>>
 * What mailing list and/or CRM can I opt-into with my PSF donation? Is
 there a periodic breakdown of expenses that I can backseat-drive and
 micromanage?

>>>
>>> We go over our finances at the PSF member meetings at PyCon and the
>>> EuroPython. In addition to what we have on python.org (
>>> https://www.python.org/psf/annual-report/2019/,
>>> https://www.python.org/psf/records/board/treasurer/), financials are
>>> also sent to voting members ([email protected]).
>>>
>> The 2018 financials will be sent there this month.
>>>
>>
>> Thanks!
>>
>>
>>>  If anyone wants to become a voting member of the PSF, let me know
>>> off-list and I'll be happy to share the available options!
>>>
>>
>>
>>>
 From Charity Navigator, it looks like PSF had about $ 2,500,000 in
 donation revenue a few years ago.

>>>
>>> As of end of 2018, the PSF had almost 3.3M in assets. In 2018, we
>>> received $515,000 from "Contributions, Membership Dues, and Grants" (
>>> https://www.python.org/psf/annual-report/2019/). In 2016, our
>>> "Contributions, Membership Dues, and Grants" totaled approximately $148,024
>>> to give you a comparison of how things are developing over time.
>>>
>>
>> $515,000 in 2018, thanks. An infographic on the donation page might
>> increase conversions.
>>
>>
>>>
>>> The Annual Impact report also addresses the need for a financial
>>> reserve:
>>>
>>> "The PSF will continue to research diversifying revenue streams, hiring
>>> additional staff, and improving our fundraising efforts, which will all
>>> affect future financials. We would like to continue to improve the service

[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread Jelle Zijlstra
El jue., 27 jun. 2019 a las 11:51,  escribió:

> excellent and extraordinarily obvious
>
> Thanks for the pointer.
>
> a bit unfortunate that old docs for a module that doesn't seem to exist in
> py3 with less clear but still correct words is still the top google result
> for python string strip.
>
> https://docs.python.org/2/library/string.html#string.lstrip
>
>  string.lstrip(s[, chars])¶
>
> Return a copy of the string with leading characters removed. If chars
> is omitted or None, whitespace characters are removed. If given and not
> None, chars must be a string; the characters in the string will be stripped
> from the beginning of the string this method is called on.
>
That function actually also behaves like str.lstrip() does in Python 3:

>>> string.lstrip('abcd', 'ba')
'cd'


> ___
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/EL26KYH6P6I6KWXKM7DUF46HVGGV6USV/
>
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/X6UYUCDH23WIANHVGGVSIO47X624DE2N/


[Python-Dev] Re: Snapshot formats in tracemalloc vs profiler

2019-06-27 Thread Victor Stinner
Hi,

I designed tracemalloc with Charles-François Natali in PEP 454. The
API is a lightweight abstraction on top of the internal C structures
used by the C _tracemalloc module which is designed to minimize the
memory footprint.

I'm not aware of the pstats format. Adding a new
tracemalloc.dump_pstats() function looks like a good idea. Does pstats
allow to attach arbitrary data to a traceback? The root structure of
tracemalloc is basically the tuple (size: int, traceback) (trace_t
structure in C).

Victor

Le jeu. 27 juin 2019 à 21:03, Yonatan Zunger  a écrit :
>
>
> Hi everyone,
>
> Something occurred to me while trying to analyze code today: profiler and 
> cProfiler emit their data in pstats format, which various tools and libraries 
> consume. tracemalloc, on the other hand, uses a completely separate format 
> which nonetheless contains similar data. In fact, in many non-Python 
> applications I've worked in, heap and CPU profiles were always emitted in 
> identical formats, which allowed things like visual representations of stack 
> traces where memory is allocated, and these have proven quite useful in 
> practice and allowed lots of sharing of tools across many applications.
>
> Is there a particular design reason why these formats are different in Python 
> right now? Would it make sense to consider allowing them to match, e.g. 
> having a tracemalloc.dump_pstats() method?
>
> Yonatan
> ___
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/[email protected]/message/3JFFWGJ57LQRZI3CVJXF5P7NYRCEWCJB/



-- 
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/64NPCX5C3MUG5CB5LR3UWH7GCXHZYYPB/


[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread Brett Cannon
My guess is that without Guido to just ask this will have to go to a PEP as it 
changes a built-in.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/BDK6BDBOG2462SJIIOC5QMYPAJ5A4523/


[Python-Dev] Re: Sponsoring Python development via the PSF

2019-06-27 Thread Brett Cannon
Discussing whether the PSF should accept cryptocurrency is a bit off-topic for 
python-dev. ;)
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/4N6AFLRBEZKGGOLY4V6CZPZMHYY2FRGP/


[Python-Dev] Re: Snapshot formats in tracemalloc vs profiler

2019-06-27 Thread Yonatan Zunger
It's similar, but not quite the same -- I was just trying to see if I could
build a neatly Pythonic library to do the conversion. The CPU profilers are
basically building a dict from (filename, lineno, funcname) to a tuple
(from a comment in profile.py):

[0] = The number of times this function was called, not counting direct
  or indirect recursion,
[1] = Number of times this function appears on the stack, minus one
[2] = Total time spent internal to this function
[3] = Cumulative time that this function was present on the stack.  In
  non-recursive functions, this is the total execution time from
start
  to finish of each invocation of a function, including time spent
in
  all subfunctions.
[4] = A dictionary indicating for each function name, the number of
times
  it was called by us.

pstats serializes this dict in a particular format which various other
tools can read, like gprof2dot. The challenge in translating is that
building (4), or handling recursion for (0) and (3), really requires
instrumentation at the CPU trace points as well, which would probably be a
good answer to my original question of why not. :)

However, there are other profiling formats which are used outside the
Python community, have good tooling support, and could be much easier to
deal with; for example, there's the pprof format
, which is almost
ludicrously versatile; it's meant for profiling both compiled and
interpreted languages, so it's very flexible as to what constitutes a
"line."

So if I have the time, and knowing that there's no intrinsic thing to fear
in all of this, I'll see if I can implement a pprof translator for
tracemalloc snapshots.


Although while I have you hear, I do have a further question about how
tracemalloc works: If I'm reading the code correctly, traces get removed by
tracemalloc when objects are free, which means that at equilibrium (e.g. at
the end of a function) the trace would show just the data which leaked.
That's very useful in most cases, but I'm trying to hunt down a situation
where memory usage is transiently spiking -- which might be due to
something being actively used, or to something building up and overwhelming
the GC, or to evil elves in the CPU for all I can tell so far. Would it be
completely insane for tracemalloc to have a mode where it either records
frees separately (e.g. as a malloc of negative space, at the trace where
the free is happening), or where it simply ignores frees altogether?

On Thu, Jun 27, 2019 at 3:08 PM Victor Stinner  wrote:

> Hi,
>
> I designed tracemalloc with Charles-François Natali in PEP 454. The
> API is a lightweight abstraction on top of the internal C structures
> used by the C _tracemalloc module which is designed to minimize the
> memory footprint.
>
> I'm not aware of the pstats format. Adding a new
> tracemalloc.dump_pstats() function looks like a good idea. Does pstats
> allow to attach arbitrary data to a traceback? The root structure of
> tracemalloc is basically the tuple (size: int, traceback) (trace_t
> structure in C).
>
> Victor
>
> Le jeu. 27 juin 2019 à 21:03, Yonatan Zunger  a écrit :
> >
> >
> > Hi everyone,
> >
> > Something occurred to me while trying to analyze code today: profiler
> and cProfiler emit their data in pstats format, which various tools and
> libraries consume. tracemalloc, on the other hand, uses a completely
> separate format which nonetheless contains similar data. In fact, in many
> non-Python applications I've worked in, heap and CPU profiles were always
> emitted in identical formats, which allowed things like visual
> representations of stack traces where memory is allocated, and these have
> proven quite useful in practice and allowed lots of sharing of tools across
> many applications.
> >
> > Is there a particular design reason why these formats are different in
> Python right now? Would it make sense to consider allowing them to match,
> e.g. having a tracemalloc.dump_pstats() method?
> >
> > Yonatan
> > ___
> > Python-Dev mailing list -- [email protected]
> > To unsubscribe send an email to [email protected]
> > https://mail.python.org/mailman3/lists/python-dev.python.org/
> > Message archived at
> https://mail.python.org/archives/list/[email protected]/message/3JFFWGJ57LQRZI3CVJXF5P7NYRCEWCJB/
>
>
>
> --
> Night gathers, and now my watch begins. It shall not end until my death.
>
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/AFVTRDKP3HZHYQJJEZTQB3QHXELV2PVK/


[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread Ned Deily
On Jun 27, 2019, at 15:27, Jelle Zijlstra  wrote:
> El jue., 27 jun. 2019 a las 11:51,  escribió:
>> excellent and extraordinarily obvious
>> 
>> Thanks for the pointer.
>> 
>> a bit unfortunate that old docs for a module that doesn't seem to exist in 
>> py3 with less clear but still correct words is still the top google result 
>> for python string strip.  
>> 
>> https://docs.python.org/2/library/string.html#string.lstrip
>> 
>>  string.lstrip(s[, chars])¶
>> 
>> Return a copy of the string with leading characters removed. If chars is 
>> omitted or None, whitespace characters are removed. If given and not None, 
>> chars must be a string; the characters in the string will be stripped from 
>> the beginning of the string this method is called on.
>> That function actually also behaves like str.lstrip() does in Python 3:
> 
> >>> string.lstrip('abcd', 'ba')
> 'cd'

I think this is just a minor documentation issue, i.e. no need to change any 
behavior.  The issue is that, in Python 2, there are the strip string methods 
as in Python 3 but there are also the old deprecated string.strip functions 
from the string module.  As Jelle points out, the py2 string function form of 
strip behaves like the string method versions of strip behave in both py2 and 
py3.

At some point the documentation for the strip string methods was changed to 
include this: "The chars argument is not a prefix or suffix; rather, all 
combinations of its values are stripped."

https://docs.python.org/2/library/stdtypes.html#str.strip

But the docs for the 2.7 string function were not so updated.  Likewise for 
lstrip and rstrip.  So if someone were motivated to create a 2.7 doc PR to 
update the wording for the three string module functions, that should lessen 
any confusion.

--
  Ned Deily
  [email protected] -- []
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/4FWGKNZROOTYAAKF3W37LAVE2WAAJDRM/


[Python-Dev] Re: Snapshot formats in tracemalloc vs profiler

2019-06-27 Thread Yonatan Zunger
Well, then. I think I'm going to have some fun with this. :)

Thank you!

On Thu, Jun 27, 2019 at 4:17 PM Victor Stinner  wrote:

> Le ven. 28 juin 2019 à 01:03, Yonatan Zunger  a écrit :
> > Although while I have you hear, I do have a further question about how
> tracemalloc works: If I'm reading the code correctly, traces get removed by
> tracemalloc when objects are free, which means that at equilibrium (e.g. at
> the end of a function) the trace would show just the data which leaked.
> That's very useful in most cases, but I'm trying to hunt down a situation
> where memory usage is transiently spiking -- which might be due to
> something being actively used, or to something building up and overwhelming
> the GC, or to evil elves in the CPU for all I can tell so far. Would it be
> completely insane for tracemalloc to have a mode where it either records
> frees separately (e.g. as a malloc of negative space, at the trace where
> the free is happening), or where it simply ignores frees altogether?
>
> My very first implementation of tracemalloc produced a log of malloc
> and free calls. Problem: transferring the log from a slow set top box
> to a desktop computer was slow, and parsing the log was very slow.
> Parsing complexity is in O(n) where n is the number of malloc or free
> calls, knowning that Python calls malloc(), realloc() or free()
> 270,000 times per second in average:
> https://www.python.org/dev/peps/pep-0454/#log-calls-to-the-memory-allocator
>
> tracemalloc is built on top of PEP 445 -- Add new APIs to customize
> Python memory allocators:
> https://www.python.org/dev/peps/pep-0445/
>
> Using these PEP 445 hooks, you should be able to do whatever you want
> on Python memory allocations and free :-)
>
> Example of toy project to inject memory allocation failures:
> https://github.com/vstinner/pyfailmalloc
>
> Victor
>
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/5NC67BB24DK246UUVY4NYOXPLTUE564X/


[Python-Dev] Re: Snapshot formats in tracemalloc vs profiler

2019-06-27 Thread Victor Stinner
Le ven. 28 juin 2019 à 01:03, Yonatan Zunger  a écrit :
> Although while I have you hear, I do have a further question about how 
> tracemalloc works: If I'm reading the code correctly, traces get removed by 
> tracemalloc when objects are free, which means that at equilibrium (e.g. at 
> the end of a function) the trace would show just the data which leaked. 
> That's very useful in most cases, but I'm trying to hunt down a situation 
> where memory usage is transiently spiking -- which might be due to something 
> being actively used, or to something building up and overwhelming the GC, or 
> to evil elves in the CPU for all I can tell so far. Would it be completely 
> insane for tracemalloc to have a mode where it either records frees 
> separately (e.g. as a malloc of negative space, at the trace where the free 
> is happening), or where it simply ignores frees altogether?

My very first implementation of tracemalloc produced a log of malloc
and free calls. Problem: transferring the log from a slow set top box
to a desktop computer was slow, and parsing the log was very slow.
Parsing complexity is in O(n) where n is the number of malloc or free
calls, knowning that Python calls malloc(), realloc() or free()
270,000 times per second in average:
https://www.python.org/dev/peps/pep-0454/#log-calls-to-the-memory-allocator

tracemalloc is built on top of PEP 445 -- Add new APIs to customize
Python memory allocators:
https://www.python.org/dev/peps/pep-0445/

Using these PEP 445 hooks, you should be able to do whatever you want
on Python memory allocations and free :-)

Example of toy project to inject memory allocation failures:
https://github.com/vstinner/pyfailmalloc

Victor
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/BMGZ4NVTCSH4QJTBOWYTQRUPZ72W7Z7G/


[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread Glenn Linderman

On 6/27/2019 3:09 PM, Brett Cannon wrote:

My guess is that without Guido to just ask this will have to go to a PEP as it 
changes a built-in.

How does adding two new methods change a built-in?

Now if an extra parameter were added to modify lstrip, rstrip, and strip 
to make them do something different, yes.


But adding new methods doesn't change anything, unless someone is 
checking for their existence.


My preferred color is  pstrip and sstrip (prefix and suffix strip) since 
lstrip and rstrip mean left and right.


And maybe there should be a psstrip, that takes two parameters, the 
prefix and the suffix to strip.


Such functions would certainly reduce code in a lot of places where I do

if  string.startswith('foo'):
    string = string[ 3: ];

as well as making it more robust, because the string and its length have 
to stay synchronized when changes are made.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/GNQGK7QFHQPCP3PIHOPY3RVNE5AMJ247/