[Python-Dev] Decision of having a deprecation period or not for changing csv.DictReader returning type.

2017-12-16 Thread 尚辉
Hi, guys In https://github.com/python/cpython/pull/4904, I made csv.DictReader returning regular dict instead of OrderedDict. But this code could break existing code that relied on methods like move_to_end() which are present in OrderedDict() but not in dict(). As rhettinger suggested, such code

Re: [Python-Dev] Usefulness of binary compatibility accross Python versions?

2017-12-16 Thread Guido van Rossum
Well then, maybe you can propose some specific set of changes? (I'm about to go on vacation and I'd like to focus on other things for the next two weeks though, so don't count on me too much.) On Sat, Dec 16, 2017 at 3:49 PM, Antoine Pitrou wrote: > On Sat, 16 Dec 2017 11:42:15 -0800 > Guido van

Re: [Python-Dev] Usefulness of binary compatibility accross Python versions?

2017-12-16 Thread Antoine Pitrou
On Sat, 16 Dec 2017 11:42:15 -0800 Guido van Rossum wrote: > > If it's only a warning, I worry that if we stop checking the flag bits it > can cause wild pointer following. This sounds like it would be a potential > security issue (load a module, ignore the warning, try to use a certain API > on

Re: [Python-Dev] Usefulness of binary compatibility accross Python versions?

2017-12-16 Thread Guido van Rossum
On Sat, Dec 16, 2017 at 11:14 AM, Antoine Pitrou wrote: > On Sat, 16 Dec 2017 19:37:54 +0100 > Antoine Pitrou wrote: > > > > Currently, you can pass a `module_api_version` to PyModule_Create2(), > > but that function is for specialists only :-) > > > > ("""Most uses of this function should be us

Re: [Python-Dev] Usefulness of binary compatibility accross Python versions?

2017-12-16 Thread Antoine Pitrou
On Sat, 16 Dec 2017 19:37:54 +0100 Antoine Pitrou wrote: > > Currently, you can pass a `module_api_version` to PyModule_Create2(), > but that function is for specialists only :-) > > ("""Most uses of this function should be using PyModule_Create() > instead; only use this if you are sure you nee

Re: [Python-Dev] Usefulness of binary compatibility accross Python versions?

2017-12-16 Thread Antoine Pitrou
On Sat, 16 Dec 2017 09:34:02 -0800 Guido van Rossum wrote: > I think it's more acceptable to require matching versions now than it was > 10 years ago -- people are much more likely to use installer tools like pip > and conda that can check version compatibility. > > I think I'd be okay with dropp

Re: [Python-Dev] Usefulness of binary compatibility accross Python versions?

2017-12-16 Thread Guido van Rossum
I think it's more acceptable to require matching versions now than it was 10 years ago -- people are much more likely to use installer tools like pip and conda that can check version compatibility. I think I'd be okay with dropping the flag-based mechanism you describe if we were to introduce a cl

[Python-Dev] Usefulness of binary compatibility accross Python versions?

2017-12-16 Thread Antoine Pitrou
Hello, Nowadays we have an official mechanism for third-party C extensions to be binary-compatible accross feature releases of Python: the stable ABI. But, for non-stable ABI-using C extensions, there are also mechanisms in place to *try* and ensure binary compatibility. One of them is the way