Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Unintentional changes in sqlite3.connect() #93044

Closed
Labels
3.11only security fixestopic-sqlite3type-bugAn unexpected behavior, bug, or error
@serhiy-storchaka

Description

@serhiy-storchaka

There are some unintentional consequences of convertingsqlite3.connect() to Argument Clinic in#40956.

  1. Thedatabase argument always converted to bytes.
  2. Keyword arguments are passed as positional arguments tofactory().
  3. If an argument is not passed tosqlite3.connect(), its default value is passed tofactory().

It all works with the defaultfactory=Connection, butfactory can be an arbitrary callable, not completely compatible withConnection(). There may be a user code which uses a factory which only works with stringdatabase and does not support theuri argument. It worked fine in older versions when it is called with correct arguments, bet will become failing in 3.11.

This is a hypothetical scenario, but we should at least add a note about potential incompatibility. And I think that it is better to get rid ofPyUnicode_FSConverter here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixestopic-sqlite3type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp