On Fri, Jul 13, 2018 at 11:46 PM Ivan Pozdeev via Python-Dev <python-dev@python.org> wrote: > > If the use case for stability is only .pyc compilation, I doubt it's even > relevant 'cuz .pyc's are supposed to be compiled in isolation from other > current objects (otherwise, they wouldn't be reusable or would be invalidated > when dependent modules change, neither of which is the case), so relevant > reference counts should always be the same. > I may be mistaking though. >
Good point! You're right. Currently, there is one unstable pyc issue (except frozenset order which can be fixed by PYTHONHASHSEED). https://bugzilla.opensuse.org/show_bug.cgi?id=1049186 This is caused by interned string. Because of interning, reference count can be unstable. Like that, long objects, tuples and some others are cached and reused automatically. But they has refcnt>1 always: reference from object and cache. So we can use FLAG_REF always for interned string, even if refcnt==1. Let's try it and wait another issue are found. Thanks! -- INADA Naoki <songofaca...@gmail.com> _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com