<p dir="auto"><strong>Migrated issue, originally created by Dmytro Starosud (<a href="https://github.com/dima-starosud">@dima-starosud</a>)</strong></p>
<p dir="auto">This is using sqlalchemy 1.2.0b3.</p>
<p dir="auto">Please consider following code snippet.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        class A(Base):
            __tablename__ = 'a'
            id = Column(Integer, primary_key=True)
            value = Column(String)

        mapper = inspect(A).mapper
        print('Initial', mapper.all_orm_descriptors.keys())

        A.value_2 = hybrid_property(lambda me: me.value)
        configure_mappers()
        print('Added', mapper.all_orm_descriptors.keys())

        del A.value_2
        configure_mappers()
        print('Deleted', mapper.all_orm_descriptors.keys())

        from sqlalchemy.orm.mapper import _memoized_configured_property
        _memoized_configured_property.expire_instance(mapper)
        print('Expired', mapper.all_orm_descriptors.keys())

&gt;&gt;&gt;
Initial ['value', '__mapper__', 'id']
Added ['value', 'value_2', '__mapper__', 'id']
Deleted ['value', 'value_2', '__mapper__', 'id']
Expired ['value', '__mapper__', 'id']
"><pre class="notranslate"><code class="notranslate">        class A(Base):
            __tablename__ = 'a'
            id = Column(Integer, primary_key=True)
            value = Column(String)

        mapper = inspect(A).mapper
        print('Initial', mapper.all_orm_descriptors.keys())

        A.value_2 = hybrid_property(lambda me: me.value)
        configure_mappers()
        print('Added', mapper.all_orm_descriptors.keys())

        del A.value_2
        configure_mappers()
        print('Deleted', mapper.all_orm_descriptors.keys())

        from sqlalchemy.orm.mapper import _memoized_configured_property
        _memoized_configured_property.expire_instance(mapper)
        print('Expired', mapper.all_orm_descriptors.keys())

&gt;&gt;&gt;
Initial ['value', '__mapper__', 'id']
Added ['value', 'value_2', '__mapper__', 'id']
Deleted ['value', 'value_2', '__mapper__', 'id']
Expired ['value', '__mapper__', 'id']

</code></pre></div>
<p dir="auto">I think <code class="notranslate">_memoized_configured_property</code> is not supposed to be used outside lib code.<br>
Is there <em>official</em> way to do this?</p>
<p dir="auto"><strong>Migrated issue, originally created by Dmytro Starosud (<a href="https://github.com/dima-starosud">@dima-starosud</a>)</strong></p>
<p dir="auto">This is using sqlalchemy 1.2.0b3.</p>
<p dir="auto">I've faced weird behavior shown in following code snippet. Assertion in that test fails. But if you comment either <code class="notranslate">#1</code> or <code class="notranslate">#2</code> or both it will pass.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        Base = declarative_base()

        class Target(Base):
            __tablename__ = 'target'
            id = Column(Integer, primary_key=True)

        descriptors = lambda: inspect(Target).all_orm_descriptors.keys()

        # these two calls make test fail
        configure_mappers()  #1
        descriptors()        #2

        Target.value = hybrid_property(lambda _: 'Hello!')
        configure_mappers()
        assert 'value' in descriptors()"><pre class="notranslate"><code class="notranslate">        Base = declarative_base()

        class Target(Base):
            __tablename__ = 'target'
            id = Column(Integer, primary_key=True)

        descriptors = lambda: inspect(Target).all_orm_descriptors.keys()

        # these two calls make test fail
        configure_mappers()  #1
        descriptors()        #2

        Target.value = hybrid_property(lambda _: 'Hello!')
        configure_mappers()
        assert 'value' in descriptors()
</code></pre></div>
<p dir="auto">Please let me know if I get it wrong.</p>
<p dir="auto">Thanks a lot in advance!</p>