Changelog#
All notable changes to this project will be documented in this file.
0.20.0 (unreleased)#
Added#
MinioService.endpoint_urlandRustfsService.endpoint_url(http://orhttps://persecure), andMinioService.ensure_bucket(name)/RustfsService.ensure_bucket(name)to create extra buckets.minio_image(defaultcgr.dev/chainguard/minio:latest) andrustfs_image(defaultrustfs/rustfs:latest) fixtures; overriding them changes the imageminio_service/rustfs_servicestart.Python 3.14 and 3.15 classifiers.
Podman support. The runtime is resolved from
PYTEST_DATABASES_CONTAINER_RUNTIME_ENDPOINT,DOCKER_HOST,CONTAINER_HOST, the current Docker context, the default Docker socket, Podman connection files, and the rootless and rootful Podman sockets, preferring Docker inautomode.--container-runtimeoption andcontainer_runtimeini setting (auto,dockerorpodman); thePYTEST_DATABASES_CONTAINER_RUNTIMEenvironment variable sets the same choice.container_runtime,container_clientandcontainer_servicefixtures.docker_clientanddocker_serviceremain as aliases, andDockerServiceis an alias ofContainerService.ContainerRuntimeConfig,RuntimeType,RuntimeCandidate,RuntimeResolutionError,derive_session_owner_id,stop_owned_containers,stop_all_containersand theMANAGED_LABEL,OWNER_LABELandSERVICE_LABELconstants exported frompytest_databases.PYTEST_DATABASES_NAMESPACEenvironment variable, appended to the session owner ID so concurrent runs from the same checkout do not share containers.ContainerService.run_container,resolve_port,get_internal_network_ipand theextra_portsargument ofContainerService.run.xdist_spanner_isolation_level(defaultdatabase),spanner_project,spanner_instance_nameandspanner_database_namefixtures,SpannerService.rest_port/rest_endpoint,provide_spanner_serviceandbootstrap_spanner_emulator(host, rest_port, ...).Keyword-only
ContainerService.runargumentswait_for_health,entrypoint,privileged,ipc_mode,cap_add,devices,hostnameandvolumes, forwarded to the container runtime;commandalso accepts a list.wait_for_container_health(container, service_name, timeout, pause), which waits forState.Health.Statusto becomehealthyand fails at once when the image defines noHEALTHCHECK.run(wait_for_health=True)uses it before the other readiness checks.--keep-containersoption andPYTEST_DATABASES_KEEP_CONTAINERSenvironment variable to leave session containers running after pytest exits, plusshould_keep_containers(config).gizmosql_duckdb_serviceandgizmosql_sqlite_servicefixtures (gizmosql_servicestays the DuckDB service),GizmoSQLService.backendandconnection_kwargs, andexec_gizmosql.alloydb_omni_18_service,alloydb_omni_18_connectionandalloydb_omni_18_port(envALLOYDB_OMNI_18_PORT).exec_psql,create_worker_database,make_connection_string,clone_template_databaseanddrop_database_forceinpytest_databases.docker.postgres, plusPostgresService.clone_template_databaseandPostgresService.drop_database_force.pytest_databases.helpers.tcp_port_open(host, port, timeout).ensure_azurite_container,azurite_container_existsandbuild_shared_key_authorizationinpytest_databases.docker.azure_blobfor stdlib SharedKey-signed Azurite requests.query_bigquery_emulator,provide_bigquery_serviceandprovide_bigquery_clientinpytest_databases.docker.bigquery.elasticsearch_9_servicewithelasticsearch_7_image,elasticsearch_8_imageandelasticsearch_9_image(defaultelasticsearch:9.5.5) fixtures, andprovide_elasticsearch_service.mariadb_118_service(mariadb:11.8),mariadb_123_service(mariadb:12.3),mariadb_130_service(mariadb:13.0) andprovide_mariadb_service.mysql_97_service(mysql:9.7) andprovide_mysql_service.mssql_2022_serviceandmssql_2025_servicewithmssql_2022_imageandmssql_2025_image(defaultmcr.microsoft.com/mssql/server:2025-latest),exec_sqlcmd(tries themssql-tools18,mssql-toolsandPATHsqlcmdbinaries) andprovide_mssql_service.xdist_oracle_isolation_level(defaultdatabase),oracle_user,oracle_passwordandoracle_system_passwordfixtures,ensure_oracle_userandprovide_oracle_service.provide_cockroachdb_service,provide_mongodb_serviceandprovide_dolt_service;dolt_imagefixture (defaultdolthub/dolt-sql-server:latest).mysql_platform,dolt_platformandbigquery_platformfixtures.mysql_56_service/mysql_57_service,dolt_serviceandbigquery_serviceread their container platform from these.redpanda_service(RedpandaServicewithbootstrap_serversandtopic_prefix),redpanda_image(defaultdocker.redpanda.com/redpandadata/redpanda:v26.1.13, envREDPANDA_IMAGE),redpanda_port(envREDPANDA_PORT),xdist_redpanda_isolation_level(defaultdatabase),provide_redpanda_serviceandfetch_kafka_brokers. The broker advertises the host port the runtime maps.localstack_service(LocalStackServicewithendpoint_url, credentials,resource_prefixandexec_aws_cli()),provide_localstack_serviceand thelocalstack_image,localstack_auth_token,localstack_region,localstack_access_key,localstack_secret_key,localstack_services,localstack_resource_prefixandxdist_localstack_isolation_levelfixtures (each with aLOCALSTACK_*environment variable). The default image is MiniStack (ministackorg/ministack:latest); setLOCALSTACK_IMAGEandLOCALSTACK_AUTH_TOKENfor a LocalStack image.pytest_databases.helpers.http_get_ok(url, *, timeout)andhttp_get_json(url, *, timeout)HTTP readiness probes.pubsub_service(PubSubServicewithproject,emulator_hostandendpoint),pubsub_image(defaultgcr.io/google.com/cloudsdktool/google-cloud-cli:577.0.0-emulators, envPUBSUB_IMAGE),pubsub_project,xdist_pubsub_isolation_level(defaultdatabase: one emulator, a project per worker) andprovide_pubsub_service.rabbitmq_service(RabbitMQServicewithamqp_url,management_portandmanagement_url),rabbitmq_image(defaultrabbitmq:4.3-management),rabbitmq_username,rabbitmq_password,rabbitmq_vhost,xdist_rabbitmq_isolation_level(defaultdatabase: one broker, a virtual host per worker) andprovide_rabbitmq_service.db2_service(Db2Servicewithdsn,connection_config,exec_sql()andcreate_worker_database()),db2_image(defaulticr.io/db2_community/db2:12.1.5.0, envDB2_IMAGE),db2_dbname,db2_username,db2_password,db2_startup_timeout,xdist_db2_isolation_level(defaultdatabase: one container, aptdb_<worker>database per worker),exec_db2_sql,create_worker_database,validate_db2_database_nameandprovide_db2_service. The container runs privileged.db2_4k_device_support(defaultTrue, envDB2_4K_DEVICE_SUPPORT) setsDB2_4K_DEVICE_SUPPORT=ONandDB2_DIRECT_IO=NObefore the firstdb2startso the database is created on storage with 4096-byte logical sectors.oracle_adb_service(OracleADBServicewith TLS, mTLS, ORDS and MongoDB API ports,wallet_dir,ords_url,apex_url,sql_developer_url,mongo_uri,extract_wallet()andenable_ords_schema()) for Oracle Autonomous AI Database Free (defaultcontainer-registry.oracle.com/database/adb-free:latest-26ai, envORACLE_ADB_IMAGE), theoracle_adb_image,oracle_adb_workload_type,oracle_adb_hostname,oracle_adb_tz,oracle_adb_password,oracle_adb_admin_password,oracle_adb_wallet_password,oracle_adb_wallet_dir,oracle_adb_volumes,oracle_adb_devicesandoracle_adb_filesystemio_optionsfixtures, andprovide_oracle_adb_service,ensure_oracle_adb_user,enable_oracle_ords_schema,extract_adb_wallet,parse_tnsnames,rewrite_tnsnamesandrewrite_sqlnet_ora.oracle_adb_filesystemio_options(defaultNONE, envORACLE_ADB_FILESYSTEMIO_OPTIONS) rewrites the server parameter file before the database starts so the instance opens on storage with 4096-byte logical sectors.Floci cloud emulators in
pytest_databases.docker.floci:floci_aws_service(FlociAWSServicewithensure_bucket(bucket_name) -> None, imagefloci/floci:2.4.0, port4566),floci_az_service(FlociAzureServicewithblob_endpoint,floci/floci-az:0.16.0, port4577),floci_gcp_service(FlociGCPServicewithensure_bucket(),storage_emulator_hostandpubsub_emulator_host,floci/floci-gcp:0.12.0, port4588) backed by the session-scopedfloci_gcp_compat_proxy(FLOCI_GCP_COMPAT_PROXY, defaultTrue) forobstore,gcsfs, andgoogle-cloud-storagecompatibility, andfloci_oci_service(FlociOCIServicewithensure_bucket(),floci/floci-oci:0.6.0, port4599), withfloci_<cloud>_imagefixtures (envFLOCI_AWS_IMAGE,FLOCI_AZ_IMAGE,FLOCI_GCP_IMAGE,FLOCI_OCI_IMAGE),floci_aws_region,floci_aws_access_key,floci_aws_secret_key,floci_az_account_name,floci_az_account_key,floci_gcp_project,floci_oci_namespace(defaultfloci-local),floci_oci_region,floci_oci_compartment_id,floci_resource_prefix,xdist_floci_isolation_level(defaultdatabase: one container per cloud),provide_floci_container,provide_floci_gcp_service,check_floci_health,ensure_gcs_bucket,ensure_oci_bucket,FLOCI_CONTAINER_PORTSandFLOCI_HEALTH_PATHS(gh-188).snowflake_service(SnowflakeServicewithendpoint,connection_kwargs,login()andquery()) for the Embucket Snowflake-compatible emulator (defaultembucket/embucket:0.2.2, envSNOWFLAKE_IMAGE, port3000), thesnowflake_image,snowflake_user,snowflake_password,snowflake_account,snowflake_database,snowflake_schema,snowflake_warehouse,snowflake_role,snowflake_wire_compat(SNOWFLAKE_WIRE_COMPAT, defaultTrue) andxdist_snowflake_isolation_level(defaultdatabase: one container, apublic_<worker>schema per worker) fixtures, andprovide_snowflake_service(..., wire_compat=True)(enabling gzip decompression, positional?binding substitution, and stringifiedrowsetcells forsnowflake-connector-python),check_snowflake_health,login_snowflake_emulatorandquery_snowflake_emulator.query()logs in assnowflake_userand runs insnowflake_database/snowflake_schema(gh-187).sybase_service(SybaseServicewithconnection_config,dsn,exec_sql()andcreate_worker_database()) for SAP ASE (defaultdatagrip/sybase:16.0, envSYBASE_IMAGE, port5000), thesybase_image,sybase_user,sybase_password,sybase_database,sybase_startup_timeoutandxdist_sybase_isolation_level(defaultdatabase: one container and a<sybase_database>_<worker>database per worker,pytestdb_<worker>whensybase_databaseismaster) fixtures, andprovide_sybase_service,exec_isql,create_worker_databaseandvalidate_sybase_database_name.sqlanywhere_service(SQLAnywhereServicewithconnection_config,dsnandexec_sql()) for SAP SQL Anywhere (defaultjaschweder/sybase:latest, envSQLANYWHERE_IMAGE, port2638), thesqlanywhere_image,sqlanywhere_user,sqlanywhere_password,sqlanywhere_database,sqlanywhere_server,sqlanywhere_startup_timeoutandxdist_sqlanywhere_isolation_level(default and only supported valueserver: one container per worker) fixtures, thesqlanywhere_client_libsfixture (extracts the native client libraries and setsSQLANY16/SQLANY_API_DLLfor the session), andprovide_sqlanywhere_service,exec_dbisql,extract_sqlanywhere_client_libsandsqlanywhere_client_environment.hardcharger_service(HardchargerServicewithuriandconnection_kwargs) for Hardcharger (defaultghcr.io/gizmodata/hardcharger:latest, port31337, plain HTTP), thehardcharger_image,hardcharger_username,hardcharger_passwordandxdist_hardcharger_isolation_level(defaultdatabase; one container per worker at either level) fixtures, andprovide_hardcharger_service,exec_hardchargerandHARDCHARGER_PORT."template"value forxdist_postgres_isolation_level(typedPostgresXdistIsolationLevel): one container, a template database built once under a file lock, and the service database cloned from it withCREATE DATABASE ... TEMPLATE, with or withoutpytest-xdist, for every PostgreSQL family service. Fixturespostgres_template_name,postgres_template_setup(SQL statements,.sqlpaths, or a callable),postgres_template_fingerprint_sources,postgres_template_lock_dirandpostgres_template_options(PostgresTemplateOptions); the setup SQL and file contents are hashed into the template name (pytest_databases_template_<digest>).PostgresService.ensure_template(),create_worker_database_from_template(),sweep_worker_databases()andcompute_fingerprint().pytest_databases.embedded.postgres:embedded_postgres_service(EmbeddedPostgresServicewithdsn,connection_config,passworddefaulting to"",exec_sql(..., tuples_only=False, timeout=30.0) -> tuple[int, bytes], and the same template helpers includinginit_sqlstaging asPostgresService) runs localinitdb/postgresbinaries with trust authentication on a loopback port, without a container runtime orpsql. Binaries come fromembedded_postgres_bin_dir,PG_BIN_DIR, the newembedded-postgresextra (pgembedon Python 3.12+,pgserveron 3.11), thePATH,pg_config --bindir, or common install directories. Fixturesembedded_postgres_user,embedded_postgres_database,embedded_postgres_port,embedded_postgres_bin_dir,embedded_postgres_template_name,embedded_postgres_template_setup,embedded_postgres_template_fingerprint_sources,embedded_postgres_template_lock_dir,postgres_any_service, andxdist_embedded_postgres_isolation_level(defaulttemplate: xdist workers share one cluster and each gets a database cloned from the template).provide_embedded_postgres_service(..., password="", init_sql=None),resolve_postgres_binariesandPostgresBinaries(gh-185, gh-193).cloudflare_service(CloudflareServicewithapi_base_url,r2_s3_endpoint_url,kv_put(),kv_get(),r2_put(),r2_get()andd1_query()) for Cloudflare KV, R2 and D1, backed by Miniflare’s Local Explorer API and R2 S3 endpoint in anode:22-slimcontainer (envCLOUDFLARE_IMAGE, port8787; Miniflare5.20261104.0-betais installed from npm on first start unless the image provides it). Fixturescloudflare_image,cloudflare_miniflare_version,cloudflare_kv_namespaces,cloudflare_r2_buckets,cloudflare_d1_databases(default("default",)),cloudflare_access_key_id,cloudflare_secret_access_key,cloudflare_startup_timeout(default300) andxdist_cloudflare_isolation_level(defaultdatabase: one container binding<name>_<worker>for every worker), andprovide_cloudflare_service.ContainerService.temp_direxposing a session-scoped temporarypathlib.Pathoncontainer_service/docker_servicefor cross-workerFileLockand session state coordination (gh-184, gh-186).pytest_databases.send_http_request(returning(status, headers, body)),ssl_contextsupport onpytest_databases.helpers.http_request(returning(status, body)), and publicpytest_databases.create_s3_bucket(..., timeout=10.0, ssl_context=None) -> bool(also exported frompytest_databases.helpers) for creating S3 buckets without routing through ambientHTTP_PROXY/HTTPS_PROXY/ALL_PROXYvariables (gh-184, gh-188).PostgresServiceProtocol,PostgresBackend,--postgres-backendCLI flag /postgres_backendini setting /PYTEST_DATABASES_POSTGRES_BACKENDenv var (resolved viaresolve_postgres_backend), and portable session-scopedpostgres_any_servicefixture switching cleanly between Docker and embedded PostgreSQL (gh-193).postgres_startup_timeout(default60),alloydb_omni_shm_size(default"512m"),alloydb_omni_startup_timeout(default90),alloydb_omni_commandandalloydb_omni_legacy_command(build_alloydb_omni_command), automaticCREATE EXTENSION IF NOT EXISTS vectoracrosspgvector_serviceandpgvector_13_service..``pgvector_18_service``, out-of-the-box AlloyDB Omnigoogle_columnar_engine,pg_stat_statements,vector,alloydb_scann,google_ml_integration, andalloydb_ai_nl(versions 15–18) pluspg_textsearchBM25 (versions 17/18), andinit_sqlstaging onPostgresTemplateSupport.ensure_template(gh-185).CockroachDBService.user(default"root"),CockroachDBService.dsn,CockroachDBService.connection_config("database"key aligned withPostgresService),CockroachDBService.exec_sql(...) -> tuple[int, bytes], and publicexec_cockroach_sql(gh-193).SpannerService.emulator_hostandconfigure_spanner_emulator_client_guardsdisabling built-in client metrics, shorteningDatabaseSessionsManager._MAINTENANCE_THREAD_POLLING_INTERVALto 100ms, raising session-manager logger verbosity toWARNING, and suppressing closed-streamValueErrorteardown tracebacks (gh-189).BigQueryService.is_healthy(*, timeout=5.0)andBIGQUERY_IMAGEenvironment override onbigquery_image(gh-190).db2_volumesfixture (gh-186), publicexec_sqlplus,OracleADBService.mtls_alias, andOracleADBService.build_wallet_zipwith optionalcryptographyPKCS#12ewallet.p12synthesis (gh-191), andSybaseService.write_freetds_confplus session-scopedsybase_freetds_aliasfor FreeTDS 5.0 clients (gh-192).oracle_startup_timeout(default180, envORACLE_STARTUP_TIMEOUT) andoracle_adb_startup_timeout(default420, envORACLE_ADB_STARTUP_TIMEOUT) fixtures, plus validated keyword-onlytimeoutandpauseparameters onprovide_oracle_service(defaults180and1.0) andprovide_oracle_adb_service(defaults420and2.0).copy_to_container,copy_from_containerandexec_container_commandinpytest_databases.types(also exported frompytest_databases), plusServiceContainer.copy_to(),ServiceContainer.copy_from()andServiceContainer.exec_command()for transferring files and executing commands inside service containers over the Docker/Podman SDK archive API.has_active_owner_sessions(owner_id)and advisory OSFileLocksession leases so concurrent localpytestruns sharing an owner ID leave containers running until the final active session exits, while sweeping stale leases from crashed processes automatically.Keyword-only
user,tmpfsandextra_hostsparameters onContainerService.run, pluspytest_databases.helpers.env_port,read_init_scriptsandrun_container_init_once.ExternalPostgresService,provide_external_postgres_service,postgres_external_host(envPOSTGRES_EXTERNAL_HOST),postgres_external_port(envPOSTGRES_EXTERNAL_PORT) andpostgres_external_serviceinpytest_databases.docker.postgresfor attaching to pre-started PostgreSQL endpoints with"database"or"template"isolation over the stdlib v3 wire client (which now supportstrust, cleartext, MD5 andSCRAM-SHA-256authentication).PostgresService.dsn,PostgresService.connection_configandPostgresService.exec_sql(), thepostgres_databasefixture (default"pytest_databases", envPOSTGRES_DATABASE),POSTGRES_USERenv override onpostgres_user, and keyword-onlydatabase,command,env,shm_size,mem_limit,volumesandinit_sqlparameters onprovide_postgres_service.teradata_service(TeradataService) andteradata_external_service(ExternalTeradataService) inpytest_databases.docker.teradatawithdbs_port,connection_config,provide_teradata_service,provide_external_teradata_service, and session fixturesteradata_image(envTERADATA_IMAGE/TERADATA_TEST_IMAGE),teradata_external_host(envTERADATA_EXTERNAL_HOST/TERADATA_HOST),teradata_external_port(envTERADATA_EXTERNAL_PORT/TERADATA_PORT),teradata_port,teradata_user,teradata_password,teradata_database,teradata_logmech,teradata_logdata,teradata_sslmode,teradata_encryptdata,teradata_tmode,teradata_startup_timeout(default300.0),teradata_service_environmentandxdist_teradata_isolation_level(default"server"), plusimage_requiredsupport in the CI provider manifest.exec_mysql/MySQLService.exec_sql()andexec_mariadb/MariaDBService.exec_sql()(passing credentials viaMYSQL_PWD),mysql_port(envMYSQL_PORT) andmariadb_port(envMARIADB_PORT) fixtures,MYSQL_*/MARIADB_*environment variable lookups on user/password/database fixtures,rootapplication user support, and keyword-onlyhost_port,command,envandinit_sqlparameters onprovide_mysql_serviceandprovide_mariadb_service.MSSQLService.exec_sql(),mssql_port(envMSSQL_PORT),MSSQL_USER/MSSQL_PASSWORD/MSSQL_DATABASEenvironment variable overrides, multi-batch standaloneGOandsql_filestaging withSQLCMDPASSWORDcredential delivery andquery_timeoutinexec_sqlcmd, and keyword-onlyhost_port,env,mem_limit,shm_sizeandinit_sqlparameters onprovide_mssql_service.oracle_26ai_service(aliased byoracle_service),oracle_26ai_image(defaultgvenzl/oracle-free:23-slim-faststartdelivering Oracle AI Database 26ai Free23.26.x, envORACLE_26AI_IMAGE),oracle_26ai_service_name(envORACLE_26AI_SERVICE_NAME),exec_oracle_sqlandOracleService.exec_sql()(supporting both PDB TNS targets and OS-authenticatedCDB$ROOTsqlplus -L -S / as sysdbaexecution),oracle_port(envORACLE_PORT),oracle_26ai_port(envORACLE_26AI_PORT, falling back tooracle_port),oracle_18c_port(envORACLE_18C_PORT) andoracle_adb_port(envORACLE_ADB_PORT) fixtures,ORACLE_USER/ORACLE_PASSWORD/ORACLE_SYSTEM_PASSWORDenvironment variable overrides, and keyword-onlyhost_port,env,volumes,shm_size,mem_limitandinit_sqlparameters onprovide_oracle_serviceandprovide_oracle_adb_service.activate_db2_database,Db2Service.activate_database(),db2_activate_database(defaultTrue, envDB2_ACTIVATE_DATABASE, keeping in-memoryMON_GET_*metrics alive across disconnects),db2_port(envDB2_PORT), and keyword-onlyactivate_database,host_port,env,registry_vars,shm_size,mem_limit,platformandinit_sqlparameters onprovide_db2_service.configure_sybase_monitoring,sybase_enable_monitoring(defaultFalse, envSYBASE_ENABLE_MONITORING) andsybase_port(envSYBASE_PORT) fixtures,user/passwordoverrides onSybaseService.exec_sql(), and keyword-onlyenable_monitoring,host_port,envandinit_sqlparameters onprovide_sybase_service.exec_mongosh,MongoDBService.uri,MongoDBService.exec_js(),MongoDBService.set_profiling_level()andMongoDBService.replica_set, session fixturesmongodb_username(envMONGODB_USER;""orNonefor unauthenticated mode),mongodb_password(envMONGODB_PASSWORD),mongodb_database_name(envMONGODB_DATABASE),mongodb_port(envMONGODB_PORT) andmongodb_replica_set(envMONGODB_REPLICA_SET, bootstrapping a single-node replica set with an automatic internal--keyFileand writablePRIMARYelection), and keyword-onlyhost_port,replica_set,command,env,init_js,profiling_levelandslow_msparameters onprovide_mongodb_service.
Changed#
Default MinIO image changed from
quay.io/minio/miniotocgr.dev/chainguard/minio:latest.minio_serviceandrustfs_servicecreate the default bucket with an AWS SigV4-signed HTTPPUTfrom the test process. Theminio/mc:latestandrustfs/rc:latesthelper containers (run withnetwork_mode="host") are no longer pulled or started. Withminio_secure/rustfs_secureenabled the request skips TLS certificate verification.Containers start with a dynamic host port retry when the runtime reports the port is already in use, and a container that exits during startup fails the fixture at once with its last log lines.
ContainerService.run(shm_size=...)is now passed to the container runtime (it was accepted and ignored) and also accepts size strings such as"2g".Without
pytest-xdist, an interpreter-exit hook stops the session’s containers if pytest exits before its normal teardown.spanner_servicecreates the emulator instance and database through the emulator REST API (port 9020) instead of running thegcr.io/google.com/cloudsdktool/cloud-sdk:slimimage. Underpytest-xdistwith the defaultdatabaseisolation, workers share one emulator and each getsemulator-test-database_<worker>.yugabyte_servicereadiness verifies the database inside the service container and probes the mapped port, instead of starting a secondysqlshcontainer withnetwork_mode="host".redis_service,dragonfly_service,keydb_serviceandvalkey_servicecheck readiness with a RESPPINGover a stdlib socket; theredisandvalkeypackages are no longer imported by the plugin.Under
pytest-xdistwith the defaultdatabaseisolation, Redis-family services give each worker logical database<worker> % 16and start an extra shared container (<service>_shared_<n>) for every 16 workers, instead of using database<worker>in one container.valkey_serviceunderpytest-xdistwith the defaultdatabaseisolation now shares one container and gives each worker its own logical database (ValkeyService.db), instead of starting a container per worker.gizmosql_servicechecks readiness by runningSELECT 4242throughgizmosql_clientinside the container and matching the exact value;adbc-driver-flightsqlis no longer imported by the plugin.GizmoSQL container names include the backend (
gizmosql-duckdb,gizmosql-sqlite); underpytest-xdistevery worker still gets its own container per backend for both isolation levels.Postgres-family services (
postgres_*,pgvector_*,paradedb_*,alloydb_omni_*) check readiness withpsqlinside the container followed by a TCP probe of the published port, and create the per-worker database withpsql;psycopgis no longer imported by the plugin.Default
alloydb_omni_imagechanged fromgoogle/alloydbomni:17togcr.io/alloydb-omni/alloydbomni:18.alloydb_omni_15_service,alloydb_omni_16_serviceandalloydb_omni_17_servicepull fromgcr.io/alloydb-omni/alloydbomni:<version>instead ofgoogle/alloydbomni:<version>.azure_blob_servicechecks readiness and creates its default container with stdlib HTTP requests signed with SharedKey;azure-storage-blobis no longer imported by the plugin.bigquery_servicechecks readiness with a stdlib HTTP query against the emulator REST API; the Google Cloud libraries are no longer imported by the plugin.bigquery_clientnow closes its client at teardown.Pinned default
bigquery_imagetoghcr.io/goccy/bigquery-emulator:0.8.1(DEFAULT_BIGQUERY_IMAGE) and changed defaultxdist_bigquery_isolation_levelto"server"(non-transient shared container in single-process sessions, transient per-worker containers underpytest-xdistto avoid SQLite catalog DDL races); overridexdist_bigquery_isolation_levelto"database"for per-workertest-dataset_<worker>datasets on a shared container (gh-190).Default
db2_ipc_modechanged to"host"across Docker and Podman (setDB2_IPC_MODE=""or overridedb2_ipc_modetoNoneto opt into private container IPC namespaces) to preventSQL1042CSysV semaphore exhaustion (gh-186).Under
pytest-xdistwith the defaultdatabaseisolation, Oracle services start one shared container per version and give each worker its own user, soOracleService.userisapp_<worker>instead ofapp. Setxdist_oracle_isolation_leveltoserverfor the previous container per worker.oracle_servicenow aliasesoracle_26ai_service, and the default Oracle Free logical service label/container stem changed fromoracle23aitooracle26ai.dolt_serviceandmysql_8_service/mysql_84_service/mysql_96_servicerun the native image platform instead oflinux/x86_64.mysql_56_serviceandmysql_57_servicekeeplinux/x86_64.MySQL and MariaDB services start with
--performance-schema=ON.elasticsearch_service_memory_limitdefault changed from500mto1gand is now applied to the Elasticsearch containers (0.19.0 always used1g).mssql_servicereuses themssql_2022_servicecontainer whenmssql_imageequalsmssql_2022_image, and SQL Server services wait until the per-worker database isONLINE.elasticsearch_serviceandoracle_startup_connectionresolve again; in 0.19.0 they requested the undefined fixtureselasticsearch8_serviceandoracle_23ai_startup_connection.The deprecated
@contextmanagerconnection helpers warn withstacklevel=3, which attributes the warning to the fixture rather thancontextlib.CI workflows
docs.ymlandrelease.yamlenforceuv sync --frozen, and the unusedcd.yamlworkflow is removed.scripts/ci/select_provider_tests.pycomputes provider cost budgets dynamically from.github/ci/provider-groups.json, dropping the unusedcloud-sdk:slimimage fromspanner.
Fixed#
Bypass ambient
HTTP_PROXY,HTTPS_PROXY, andALL_PROXYvariables across S3, MinIO, RustFS, Azurite, Elasticsearch, Snowflake, Floci, Spanner, and BigQuery HTTP readiness probes while preserving SigV4 and SharedKey signatures (gh-184).Serialize concurrent
pytest-xdistuser grant provisioning inprovide_mysql_serviceandprovide_mariadb_service, serialize Db2 4Kndb2stop forcerecovery (SQL1013N/ SQLSTATE42705) andcreate_worker_databaseviaFileLockunderContainerService.temp_dirand in-containerflock, and fast-fail immediately on Db2SQL1042C/SQLSTATE=57019container startup errors (gh-184, gh-186).Forward
command,timeout,shm_size, andinit_sqlthrough PostgreSQL family fixture factories and run providerinit_sqlstatements inside containerized, external, and embedded staging template databases prior to userpostgres_template_setupandembedded_postgres_template_setuphooks (gh-185).Loading the
pytest11plugin (pytest_databases._service) no longer importspytest_databases.dockeron startup;TRUE_VALUESis now defined inpytest_databases.helpersand re-exported frompytest_databases.dockerfor backward compatibility.provide_oracle_service(timeout=180,pause=1.0) andprovide_oracle_adb_service(timeout=420,pause=2.0) now gatesqlplusreadiness probes withtcp_port_openbefore running in-container queries,ensure_oracle_usersynchronizes and unlocks existingpytest-xdistworker users idempotently (toleratingORA-01920andORA-28007), andensure_oracle_user,ensure_oracle_adb_user, andenable_oracle_ords_schemaescape single quotes in PL/SQL literals and retry transientORA-*startup, listener, and lock errors.provide_postgres_servicenow forwardsPOSTGRES_USERandPOSTGRES_DBinto the container environment (and omits an emptyPOSTGRES_PASSWORDwhenPOSTGRES_HOST_AUTH_METHOD=trustis supplied) so non-postgressuperusers and custom base database names pass readiness and provisioning cleanly.provide_mysql_serviceandprovide_mariadb_servicenow honor theirdatabaseparameter onservice.db(and<database>_<worker>underpytest-xdist"database"isolation) instead of hardcoding"pytest_databases", and combine in-container readiness queries withtcp_port_open(alongsidedb2andmongodb).provide_oracle_servicenow runsensure_oracle_userunder a cross-worker file lock in single-process runs andpytest-xdist"server"isolation as well as"database"isolation, granting consistentCONNECT,RESOURCE,DBAandQUOTA UNLIMITED ON USERSprivileges across all execution modes.ContainerService.run(exec_after_start=...)now runs once per shared container under a cross-worker file lock and raisesRuntimeErrorwhen the post-start command exits with a non-zero status.
Deprecated#
pytest_databases.docker.valkey.valkey_responsive; usepytest_databases.docker.redis.redis_responsive. Removal in 1.0.0.gizmosql_connection; usegizmosql_servicewith itsuriandconnection_kwargsand open your own ADBC Flight SQL connection. Removal in 1.0.0.Postgres-family
*_connectionfixtures (postgres_connection,postgres_<version>_connection,pgvector_*_connection,paradedb_*_connection,alloydb_omni_*_connection); use the matching*_servicefixture and open your ownpsycopgconnection. Removal in 1.0.0.azure_blob_container_clientandazure_blob_async_container_client; useazure_blob_serviceand build your ownContainerClientfromconnection_string. Removal in 1.0.0.bigquery_client,BigQueryService.credentials,BigQueryService.client_optionsand thecredentialsargument ofBigQueryService(now ignored); buildAnonymousCredentials()andClientOptions(api_endpoint=service.endpoint)yourself. Removal in 1.0.0.cockroachdb_connection; usecockroachdb_serviceand open your ownpsycopgconnection. Removal in 1.0.0.mongodb_connectionandmongodb_database; usemongodb_serviceand open your ownpymongoclient. Each now emits a single warning. Removal in 1.0.0.oracle_18c_connection,oracle_23ai_connection,oracle_26ai_connection,oracle_startup_connectionandoracle_responsive; useoracle_service(or the versioned services) and open your ownoracledbconnection. Removal in 1.0.0.oracle_23ai_service,oracle_23ai_imageandoracle_23ai_service_name, and overriding them outsidepytest_databases; use and overrideoracle_26ai_service,oracle_26ai_imageandoracle_26ai_service_nameinstead. Removal in 1.0.0.spanner_connection,SpannerService.credentials,SpannerService.client_optionsand thecredentialsargument ofSpannerService(now ignored); build the client,AnonymousCredentials()andClientOptions(api_endpoint=service.endpoint)yourself. Removal in 1.0.0.elasticsearch7_responsiveandelasticsearch8_responsive; the Elasticsearch services check readiness without a client. Removal in 1.0.0.The bare
platformfixture and overriding it. Aplatformoverride defined outsidepytest_databasesis still honored by the MySQL, Dolt and BigQuery services with one warning; overridemysql_platform,dolt_platformorbigquery_platforminstead. Removal in 1.0.0.DockerServiceRegistry; use thedocker_servicefixture. Removal in 1.0.0.
Breaking#
requires-pythonraised from>=3.9to>=3.11. Python 3.9 and 3.10 are no longer supported.The
alloptional extra has been removed; install the specific provider extras or client packages directly.Container names changed from
pytest_databases_<service>topytest_databases_<service>_<owner>, where<owner>is derived from the pytest root path (plusPYTEST_DATABASES_NAMESPACE). Scripts that address containers by the old name must filter on thepytest_databases.servicelabel instead.Container labels changed from the list
["pytest_databases"]to a mapping withpytest_databases,pytest_databases.ownerandpytest_databases.servicekeys.Session start and end only remove containers carrying this session’s
pytest_databases.ownerlabel, instead of every container labelledpytest_databases. Usestop_all_containersfor the previous behavior.get_docker_host()returns the endpoint of the resolved runtime instead of parsingdocker context ls, and raisesRuntimeResolutionErrorwhen no Docker or Podman endpoint is reachable.Under
pytest-xdistwith the defaultdatabaseisolation,minio_default_bucket_nameandrustfs_default_bucket_nameare nowpytest-databases-<worker>(previouslypytest-databasesfor all workers). Read the bucket from the fixture instead of hard-coding it.A failure to create the MinIO or RustFS default bucket now raises
RuntimeErrorduring fixture setup instead of being ignored.azure_blob_servicecreates theazure_blob_default_container_namecontainer (pytest-databases) before yielding, soazure_blob_container_client.create_container()on the default container now raisesResourceExistsError. Drop the call or guard it withexists().The
cockroachdb(psycopg),elasticsearch7,elasticsearch8,mongodb(pymongo),oracle(oracledb) andvalkeyextras no longer install a driver, because the services check readiness without one. If you use the deprecatedcockroachdb_connection,mongodb_connection,mongodb_databaseororacle_*_connectionfixtures, installpsycopg,pymongoororacledbdirectly.
0.19.0 (2026-05-23)#
Added#
host_portkwarg onDockerService.runthat pins a specific host-side port for the container instead of letting Docker pick one. Closes gh-131.Per-version
*_portfixtures for every postgres-family service (postgres_NN_port,pgvector_NN_port,paradedb_NN_port,alloydb_omni_NN_port) that read a matching*_PORTenv var.Per-version pgvector services:
pgvector_13_servicethroughpgvector_18_service(plus matching_connectionfixtures).Per-version ParadeDB services:
paradedb_15_servicethroughparadedb_18_service(plus matching_connectionfixtures).Per-version AlloyDB Omni services:
alloydb_omni_15_servicethroughalloydb_omni_17_service(plus matching_connectionfixtures).
Changed#
Bumped default
pgvector_imagefrompgvector/pgvector:pg15topgvector/pgvector:pg18.Bumped default
paradedb_imagefromparadedb/paradedb:0.21.5-pg16toparadedb/paradedb:latest-pg18.Bumped default
alloydb_omni_imagefromgoogle/alloydbomni:16togoogle/alloydbomni:17.RustFS credential defaults changed from
rustfsadmin/rustfsadmin(which currentrustfs/rustfs:latestimages reject as “insecure default credentials”) topytest-databases-rustfs/pytest-databases-rustfs-secret. Closes gh-132.
Fixed#
alloydb_omni_servicewas using thepgvector_imagefixture instead ofalloydb_omni_image;alloydb_omni_connectionwas wired topgvector_serviceinstead ofalloydb_omni_service. Both fixtures now use their own image / service.DockerService.run’scontextmanagernow wraps itsyieldintry/finallyso transient teardown always runs even when the test body raises (previously could leak containers).
0.18.0 (2026-05-12)#
What’s Changed#
feat(rustfs): add RustFS object storage support by @cofin in #117
feat(mysql,mariadb): migrate to oneshot and add new versions by @cofin in #118
feat(dolt): add dolt database service support by @cofin in #119
ci: pre-pull docker images with retry to fight registry flakes by @cofin in #122
feat: expose container by @provinzkraut in #121
ci: Add missing Python versions by @provinzkraut in #124
feat: move MariaDB to clientless validation by @cofin in #126
feat: move Dolt to clientless validation by @cofin in #125
Full Changelog: v0.17.0…v0.18.0
0.17.0 (2026-03-10)#
What’s Changed#
New Contributors#
@ftsartek made their first contribution in #110
Full Changelog: v0.16.0…v0.17.0
0.16.0 (2026-01-20)#
What’s Changed#
feat(gizmosql): add GizmoSQL database fixture by @cofin in #108
feat: implement support for yugabyte by @cofin in #84
feat: implement support for mongodb by @cofin in #85
Full Changelog: v0.15.1…v0.16.0
0.15.1 (2026-01-05)#
What’s Changed#
fix(mysql): handle InterfaceError during health check by @cofin in #105
Full Changelog: v0.15.0…v0.15.1
0.15.0 (2025-10-06)#
What’s Changed#
feat: Add support for PostgreSQL 18 by @Kumzy in #98
fix: resolve StopIteration error in BigQuery emulator fixture by @cofin in #99
Full Changelog: v0.14.1…v0.15.0
0.14.1 (2025-09-11)#
What’s Changed#
New Contributors#
@tylovejoy made their first contribution in #95
Full Changelog: v0.14.0…v0.14.1
0.14.0 (2025-06-14)#
What’s Changed#
feat: Enhance Postgres Services with configurable container host by @am1ter in #87
New Contributors#
@am1ter made their first contribution in #87
Full Changelog: v0.13.0…v0.14.0
0.13.0 (2025-05-25)#
What’s Changed#
chore(docs): initial revision of docs by @cofin in #74
chore(docs): build redirect index by @cofin in #77
chore(docs): ensure output directory exists by @cofin in #78
fix: tests failing on ARM MacOS by @peterHoburg in #82
feat: add valkey module and keydb and dragonfly redis services by @cofin in #83
New Contributors#
@peterHoburg made their first contribution in #82
Full Changelog: v0.12.3…v0.13.0
0.12.3 (2025-04-21)#
What’s Changed#
fix(oracle): correct service names used in fixture by @cofin in #73
Full Changelog: v0.12.2…v0.12.3
0.12.1 (2025-04-06)#
What’s Changed#
fix(oracle): use the 18c xe image by @cofin in #70
Full Changelog: v0.12.0…v0.12.1
0.12.2 (2025-04-06)#
What’s Changed#
fix(oracle): additional oracle updates by @cofin in #71
Full Changelog: v0.12.1…v0.12.2
0.12.0 (2025-03-23)#
What’s Changed#
feat: add support for minio by @cofin in #69
Full Changelog: v0.11.1…v0.12.0
0.11.1 (2025-02-11)#
What’s Changed#
fix: ensure container metadata is available by @provinzkraut in #67
Full Changelog: v0.11.0…v0.11.1
0.11.0 (2025-02-10)#
What’s Changed#
feat(everything)!: rewrite, I guess by @provinzkraut in #54
fix(CI): Install missing dependencies by @provinzkraut in #66
Full Changelog: v0.10.0…v0.11.0
0.10.0 (2024-10-20)#
What’s Changed#
New Contributors#
@Kumzy made their first contribution in #51
Full Changelog: v0.9.0…v0.10.0
0.9.0 (2024-09-07)#
What’s Changed#
refactor: Remove async dependency by @provinzkraut in #50
Full Changelog: v0.8.0…v0.9.0
0.8.0 (2024-08-20)#
What’s Changed#
feat: rebrand Oracle 23 to Oracle 23AI by @cofin in #48
Full Changelog: v0.7.2…v0.8.0
0.7.2 (2024-08-07)#
What’s Changed#
feat: consolidate groupings by @cofin in #46
fix: correctly check for env variables by @cofin in #47
Full Changelog: v0.7.1…v0.7.2
0.7.1 (2024-07-02)#
What’s Changed#
fix(valkey): Use the correct image name by @Alc-Alc in #45
New Contributors#
@Alc-Alc made their first contribution in #45
Full Changelog: v0.7.0…v0.7.1
0.7.0 (2024-06-11)#
What’s Changed#
chore: remove license in each file by @cofin in #40
feat: valkey support & startup_connection fixture by @cofin in #42
Full Changelog: v0.6.0…v0.7.0
0.6.0 (2024-05-25)#
What’s Changed#
feat: Add azure blob storage with azurite by @provinzkraut in #39
New Contributors#
@provinzkraut made their first contribution in #39
Full Changelog: v0.5.0…v0.6.0
0.5.0 (2024-04-21)#
What’s Changed#
build(deps): bump codecov/codecov-action from 4.0.1 to 4.3.0 by @dependabot in #34
feat: independent service configurations by @cofin in #35
Full Changelog: v0.4.1…v0.5.0
0.4.0 (2024-04-19)#
What’s Changed#
Full Changelog: v0.3.1…v0.4.0
0.4.1 (2024-04-19)#
What’s Changed#
feat: enabled codecov by @cofin in #33
Full Changelog: v0.4.0…v0.4.1
0.3.0 (2024-04-18)#
What’s Changed#
build(deps): bump sqlparse from 0.4.4 to 0.5.0 in /requirements by @dependabot in #27
feat: split compose into multiple files by @cofin in #28
feat: support for Google AlloyDB Omni by @cofin in #29
Full Changelog: v0.2.5…v0.3.0
0.3.1 (2024-04-18)#
What’s Changed#
fix: addresses an issue with the alloydb omni integration by @cofin in #31
Full Changelog: v0.3.0…v0.3.1
0.2.4 (2024-04-10)#
What’s Changed#
feat: custom project name & parallel testing by @cofin in #26
Full Changelog: v0.2.3…v0.2.4
0.2.5 (2024-04-10)#
What’s Changed#
feat: Add Elasticsearch support by @kedod in #24
New Contributors#
@kedod made their first contribution in #24
Full Changelog: v0.2.4…v0.2.5
0.2.3 (2024-04-09)#
What’s Changed#
fix: set defaults for all env vars by @cofin in #25
Full Changelog: v0.2.2…v0.2.3
0.2.2 (2024-04-06)#
What’s Changed#
feat: fixture now configured docker env variables. by @cofin in #23
Full Changelog: v0.2.1…v0.2.2
0.2.1 (2024-04-05)#
What’s Changed#
fix(ci): build corrections by @cofin in #22
Full Changelog: v0.2.0…v0.2.1
0.2.0 (2024-04-04)#
What’s Changed#
chore(docs): use Litestar branding by @cofin in #19
build(deps): bump actions/download-artifact from 3 to 4 by @dependabot in #18
chore(ci): enable license header requirement by @cofin in #20
feat: add support for redis, keydb, and dragonfly by @cofin in #21
Full Changelog: v0.1.0…v0.2.0
0.1.0 (2024-04-03)#
What’s Changed#
Initial Release
feat: implements existing fixtures by @cofin in https://github.com/jolt-org/pytest-databases/pull/6
build(deps): bump actions/download-artifact from 3 to 4 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/5
build(deps): bump pypa/gh-action-pypi-publish from 1.6.4 to 1.8.14 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/4
build(deps): bump softprops/action-gh-release from 1 to 2 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/3
build(deps): bump actions/checkout from 3 to 4 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/2
build(deps): bump actions/upload-artifact from 3 to 4 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/1
fix(build): requirements update by @cofin in https://github.com/jolt-org/pytest-databases/pull/7
build(deps): bump docker/setup-qemu-action from 2 to 3 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/9
build(deps): bump pypa/cibuildwheel from 2.11.4 to 2.17.0 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/8
feat: docs and build pipeline by @cofin in https://github.com/jolt-org/pytest-databases/pull/10
feat: mariadb services and configurable database connections by @cofin in https://github.com/jolt-org/pytest-databases/pull/11
feat(ci): build updates by @cofin in https://github.com/jolt-org/pytest-databases/pull/12
build(deps): bump github/codeql-action from 2 to 3 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/17
build(deps): bump actions/github-script from 6 to 7 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/16
build(deps): bump actions/upload-artifact from 3 to 4 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/15
build(deps): bump actions/setup-python from 4 to 5 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/14
build(deps): bump dawidd6/action-download-artifact from 2 to 3 by @dependabot in https://github.com/jolt-org/pytest-databases/pull/13
New Contributors#
@cofin made their first contribution in https://github.com/jolt-org/pytest-databases/pull/6
@dependabot made their first contribution in https://github.com/jolt-org/pytest-databases/pull/5
Full Changelog: https://github.com/jolt-org/pytest-databases/commits/v0.1.0