osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PyPy support breaking CPython compatibility?


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