Re: [Python-Dev] Deprecating "instance method" class

2019-04-06 Thread Serhiy Storchaka
05.04.19 20:56, Jeroen Demeyer пише: On 2019-04-05 19:53, Serhiy Storchaka wrote: At Python level we can monkeypatch __gt__, but not tp_richcompare. Sure, but you're planning to use C anyway so that's not really an argument. total_ordering monkeypatches the decorated class. I'm planning to

Re: [Python-Dev] New Python Initialization API

2019-04-06 Thread Nick Coghlan
On Sun, 7 Apr 2019 at 12:45, Nick Coghlan wrote: > The original PEP 580 implementation tried to keep the config API > simpler by always complaining, but that turned out to break the world > (plenty of contexts where things get upset by unexpected output on > stderr). Err, PEP 538. No idea why my

Re: [Python-Dev] New Python Initialization API

2019-04-06 Thread Nick Coghlan
On Sat, 6 Apr 2019 at 02:16, Victor Stinner wrote: > > > ``PyPreConfig`` fields: > > > > > > * ``coerce_c_locale_warn``: if non-zero, emit a warning if the C locale > > > is coerced. > > > * ``coerce_c_locale``: if equals to 2, coerce the C locale; if equals to > > > 1, read the LC_CTYPE to de

Re: [Python-Dev] New Python Initialization API

2019-04-06 Thread Victor Stinner
Maybe I should clarify in the PEP 587 Rationale what are the use cases for the API. Embeding Python is one kind of use case, but writing your own Python with a specific config like "isolated Python" or "system Python" is also a valid use case. For a custom Python, you might want to get C locale coe