Skip to content

build(deps): bump peewee from 3.19.0 to 4.5.1 - #158

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/uv/peewee-4.5.1
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/uv/peewee-4.5.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 20, 2026

Copy link
Copy Markdown
Contributor

Bumps peewee from 3.19.0 to 4.5.1.

Release notes

Sourced from peewee's releases.

4.5.1

Couple little things for EnumField.

  • EnumField and IntEnumField validate member value types (str and int respectively) at field construction.
  • EnumField and IntEnumField default choices to (value, name) pairs derived from the enum.
  • Fix #3075, migration generation for EnumField. Generated migrations will emit the storage field type (e.g. IntegerField) rather than EnumField().

View commits

4.5.0

Backwards-incompatible:

  • MySQL and MariaDB connections no longer set sql_mode. Peewee had been setting PIPES_AS_CONCAT, but the param replaced the server's mode rather than adding to it, which silently disabled STRICT_TRANS_TABLES (etc). Going forward Peewee will not modify sql_mode by default and use CONCAT() rather than || for MySQL/MariaDB.
  • MySQL and MariaDB connection charset defaults to utf8mb4 instead of utf8, which is an alias for utf8mb3 and cannot store 4-byte characters.
  • A field's sequence= is now qualified with the model's Meta.schema. If the name you pass already contains a dot it is treated as fully-qualified and used as-is, so sequence='other.seq' is unaffected by Meta.schema. Also, sequence_exists() accepts a schema-qualified name.
  • SQLite BEGIN, COMMIT and ROLLBACK are issued directly on a cursor rather than through execute_sql(), so they are no longer debug-logged, do not fire query hooks and are not counted by count_queries(). This matches Postgres and MySQL.
  • atomic() and transaction() on a closed database with autoconnect=False now raise InterfaceError on Postgres and MySQL, as they already did on SQLite (and as queries do). Previously begin() opened a connection regardless of autoconnect.

Improvements:

  • Add SqliteDatabase(..., lock_type=...) to set the default locking strategy for transactions that do not specify one, e.g. lock_type='IMMEDIATE'.
  • Postgres introspection (get_tables(), get_columns(), get_indexes(), get_primary_keys(), get_foreign_keys(), get_views()) with no schema now follows the search path via current_schema() instead of assuming public, matching MySQL's DATABASE() behavior.
  • Add Runner(db, schema=...) and pwmigrate --schema for running migrations against a specific schema. The history table lives in that schema, so each schema tracks its own applied set and one set of migration files can be run against any number of schemas.
  • Add SchemaMigrator(db, schema=...), which qualifies every table name w/the given schema (or database on MySQL). Not supported for SQLite, as the table-rebuild rewrites DDL straight from sqlite_master.
  • Add websearch=True to TSVectorField.match() and Match() to parse the query using websearch_to_tsquery() (pg 11+). Accepts user input without raising (quoted phrases, or, and -negation).
  • Add Database.query_hooks, a list of callables invoked after every query with a QueryEvent named tuple (sql, params, duration, exception), on success and failure both. No timing overhead when the list is empty.
  • Add Database.after_commit(fn), which runs a callable after the outermost transaction commits. Hook is discarded on rollback and runs immediately if no transaction is active. Use for, e.g., writing a row PK to a task queue.
  • Add EnumField and IntEnumField to playhouse.fields, storing member.value and returning the member, rejecting unknown values on write and comparison. to_pydantic() maps any field with an enum_class attribute to the enum itself, so schemas validate membership.
  • Add Database.dispose() / PooledDatabase.dispose() for discarding and resetting local connection state, e.g. in a child process after fork().
  • Model.bind_ctx() and Database.bind_ctx() can be used as decorators, like the other peewee context-managers. Previously the decorator form raised TypeError: '_BoundModelsContext' object is not callable.
  • TimeField supports utc offsets like DateTimeField, parsing e.g. '11:12:13+02:00' to an aware datetime.time instead of returning str. Only sqlite stores the offset. The postgres/mysql drivers drop it on write.

View commits

4.4.0

In which we learn to migrate (somewhat).

  • Add playhouse.migrations for running migration scripts. Migrations are python files defining up(migrator, db) and optionally down(...). Migrations are applied in numeric order a-la Django, and stored by name in a history table. CLI via pwmigrate accepting status, up, down, initial, create, generate, fake and diff. To run from python, migrations.run(db).
  • Add basic playhouse.schema_diff for comparing models against the schema and reporting differences (tables to create, columns added or removed, indexes added or removed).
  • Allow adding column to existing table as NOT NULL with migrator, which allows skipping the 3-step process of add nullable, populate default, set not null.
  • db_url.connect() raises ValueError for a url with no database name, e.g. postgres://dbname (two slashes reads dbname as the host).
  • Add a SchemaMigrator.migration_context() helper for wrapping migrations. This was wanted for SQLite in order to disable FK pragma, which could trigger cascading deletes while recreating tables.
  • Allow SchemaMigrator.from_database() to support database proxies.
  • Add support for newer SQLite ALTER TABLE functionality from 3.53.0.
  • Do not allow delete() method to be called on a model instance. Model.delete() is a classmethod for constructing a DELETE query, and model.delete_instance() has always been the correct path for deleting a model instance. This new check just ensures that a new user cannot accidentally delete their whole table by using the class-version from an instance. Fixes #2277.
  • Server-side cursors opened inside a transaction on psycopg3 are no longer declared WITH HOLD. They stream and are scoped to the transaction, rather than spooling their remaining rows server-side at commit.

... (truncated)

Changelog

Sourced from peewee's changelog.

4.5.1

  • EnumField and IntEnumField validate member value types (str and int respectively) at field construction.
  • EnumField and IntEnumField default choices to (value, name) pairs derived from the enum.
  • Fix #3075, migration generation for EnumField. Generated migrations will emit the storage field type (e.g. IntegerField) rather than EnumField().

View commits

4.5.0

Backwards-incompatible:

  • MySQL and MariaDB connections no longer set sql_mode. Peewee had been setting PIPES_AS_CONCAT, but the param replaced the server's mode rather than adding to it, which silently disabled STRICT_TRANS_TABLES (etc). Going forward Peewee will not modify sql_mode by default and use CONCAT() rather than || for MySQL/MariaDB.
  • MySQL and MariaDB connection charset defaults to utf8mb4 instead of utf8, which is an alias for utf8mb3 and cannot store 4-byte characters.
  • A field's sequence= is now qualified with the model's Meta.schema. If the name you pass already contains a dot it is treated as fully-qualified and used as-is, so sequence='other.seq' is unaffected by Meta.schema. Also, sequence_exists() accepts a schema-qualified name.
  • SQLite BEGIN, COMMIT and ROLLBACK are issued directly on a cursor rather than through execute_sql(), so they are no longer debug-logged, do not fire query hooks and are not counted by count_queries(). This matches Postgres and MySQL.
  • atomic() and transaction() on a closed database with autoconnect=False now raise InterfaceError on Postgres and MySQL, as they already did on SQLite (and as queries do). Previously begin() opened a connection regardless of autoconnect.

Improvements:

  • Add SqliteDatabase(..., lock_type=...) to set the default locking strategy for transactions that do not specify one, e.g. lock_type='IMMEDIATE'.
  • Postgres introspection (get_tables(), get_columns(), get_indexes(), get_primary_keys(), get_foreign_keys(), get_views()) with no schema now follows the search path via current_schema() instead of assuming public, matching MySQL's DATABASE() behavior.
  • Add Runner(db, schema=...) and pwmigrate --schema for running migrations against a specific schema. The history table lives in that schema, so each schema tracks its own applied set and one set of migration files can be run against any number of schemas.
  • Add SchemaMigrator(db, schema=...), which qualifies every table name w/the given schema (or database on MySQL). Not supported for SQLite, as the table-rebuild rewrites DDL straight from sqlite_master.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [peewee](https://github.com/coleifer/peewee) from 3.19.0 to 4.5.1.
- [Release notes](https://github.com/coleifer/peewee/releases)
- [Changelog](https://github.com/coleifer/peewee/blob/master/CHANGELOG.md)
- [Commits](coleifer/peewee@3.19.0...4.5.1)

---
updated-dependencies:
- dependency-name: peewee
  dependency-version: 4.5.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Sep 20, 2026
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: a99beba1-e51a-48d1-bc42-c7818db53c6d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants