Skip to content

Regression in 1.3.14 #5196

@sbrunner

Description

@sbrunner

While upgrading sqlalchemy from 1.3.13 to 1.3.14 I get this error:

...
/opt/c2cgeoportal/geoportal/c2cgeoportal_geoportal/lib/__init__.py:275: in get_role_id
    return DBSession.query(main.Role.id).filter(main.Role.name == name).all()[0]
/usr/local/lib/python3.7/dist-packages/sqlalchemy/orm/query.py:3236: in all
    return list(self)
/usr/local/lib/python3.7/dist-packages/sqlalchemy/orm/query.py:3394: in __iter__
    self.session._autoflush()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sqlalchemy.orm.session.Session object at 0x7fec23e0e590>

    def _autoflush(self):
        if self.autoflush and not self._flushing:
            try:
                self.flush()
            except sa_exc.StatementError as e:
                # note we are reraising StatementError as opposed to
                # raising FlushError with "chaining" to remain compatible
                # with code that catches StatementError, IntegrityError,
                # etc.
                e.add_detail(
                    "raised as a result of Query-invoked autoflush; "
                    "consider using a session.no_autoflush block if this "
                    "flush is occurring prematurely"
                )
>               util.raise_(e, with_traceback=sys.exc_info[2])
E               TypeError: 'builtin_function_or_method' object is not subscriptable

/usr/local/lib/python3.7/dist-packages/sqlalchemy/orm/session.py:1602: TypeError

For me, it looks to be a regression, what do you think?

Full log: https://github.com/camptocamp/c2cgeoportal/pull/5964/checks?check_run_id=498945019

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockerissue that must be resolved asap as it is preventing things from workingbugSomething isn't workingormregressionsomething worked and was broken by a change

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions