PyPy support breaking CPython compatibility?

Chris Angelico rosuav at gmail.com
Wed Jan 31 04:36:36 EST 2018


On Wed, Jan 31, 2018 at 8:15 PM, Etienne Robillard <tkadm30 at yandex.com> wrote:
>
>
> Le 2018-01-30 à 16:38, Ned Batchelder a écrit :
>>>
>>> I'm confused by this:
>>>
>>> -if os.environ.get('SCHEVO_OPTIMIZE', '1') == '1':
>>> +if os.environ.get('SCHEVO_OPTIMIZE', '1') == True:
>>>
>> I was also curious about this: when does os.environ.get return anything
>> but a string?
>
>
> I was probably high when I coded this! ;)
>
> I think a better solution is to write :
>
> if os.environ.get('SCHEVO_OPTIMIZE', '0')  == '1':
>  ...
>
> Anyways, what do you think about the weakref case?
>

I think, without any real facts to justify it, that this sort of thing
is *probably* an unintended compatibility break. So if you can show a
minimal test-case that highlights the difference, you can probably
raise an issue against PyPy and maybe get it fixed.

But like I said, I don't have any facts to back that conjecture.

ChrisA



More information about the Python-list mailing list