Skip to content

Lift the sqlalchemy<2.1 cap once advanced-alchemy handles 2.1 #40

Description

@lesnik512

#39 caps sqlalchemy[asyncio]<2.1 because the suite cannot pass on 2.1 today. Three things stand between this repo and 2.1; the first two are upstream.

  1. advanced-alchemy does not translate 2.1 integrity errors with asyncpg (litestar-org/advanced-alchemy#803, fix PR #807 open). Duplicate username and unknown member id return 500 instead of 409/400: test_register_rejects_duplicate_username, test_create_chat_rejects_unknown_member_id. Verified independent of anything in this repo.
  2. advanced-alchemy's mixins use @declarative_mixin, deprecated in 2.1 (#804). With filterwarnings = ["error"] the warning is a collection error for every test module. Until upstream drops it, an ignore scoped to that message and sqlalchemy.exc.SADeprecationWarning is needed.
  3. This repo's two lazy="noload" relationships (ChatsTable.members, ChatsTable.last_message). noload is deprecated in 2.1 and the warning surfaces from configure_mappers(). lazy="raise" is the replacement: with it, plus the ignore from (2), the full suite on 2.1.1 passed every test except the two from (1). Both relationships are viewonly and always loaded explicitly with selectinload, so raise matches the intent.

Lift the cap when a released advanced-alchemy closes #803, applying (3) and, if #804 is still open, (2) in the same PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions