Skip to content

Upgrading pytest-postgresql 3 to 4

Breaking3.1.3 → 4.1.1Breaking3New1Changed5Fixed1Other2

BreakingUpgrade verdict

2 breaking changes.

  • The client fixture ignores the load setting from configuration now.
  • Client fixtures now hand back psycopg 3 connection objects, so code expecting psycopg 2 connections must be updated.
2 items need code or config changes

Adds setuptools.

Installs 9 packages in all (was 8).

Breaking2
The client fixture no longer uses the configuration's load parameter.
client
Uses psycopg 3 and returns its connections in client fixtures.
psycopg

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • removed: export psycopg2
  • removed: function check_for_psycopg2() -> None
  • removed: variable psycopg2
  • added: export psycopg
  • added: function check_for_psycopg() -> None
  • added: variable psycopg
  • changed: constructor PostgreSQLExecutor(executable: str, host: str, port: int, datadir: str, unixsocketdir: str, logfile: str, startparams: str, shell: bool=…, timeout: Optional[int]=…, sleep: float=…, user: str=…, password: str=…, dbname: Optional[str]=…, options: str=…, postgres_options: str=…) → constructor PostgreSQLExecutor(executable: str, host: str, port: int, datadir: str, unixsocketdir: str, logfile: str, startparams: str, dbname: str, shell: bool=…, timeout: Optional[int]=…, sleep: float=…, user: str=…, password: str=…, options: str=…, postgres_options: str=…)
  • changed: constructor NoopExecutor(host: str, port: Union[str, int], user: str, options: str, password: Optional[str]=…, dbname: Optional[str]=…) → constructor NoopExecutor(host: str, port: Union[str, int], user: str, options: str, dbname: str, password: Optional[str]=…)
  • changed: function postgresql(process_fixture_name: str, dbname: Optional[str]=…, load: Optional[List[Union[Callable, str]]]=…, isolation_level: Optional[int]=…) -> Callable[[FixtureRequest], connection] → function postgresql(process_fixture_name: str, dbname: Optional[str]=…, load: Optional[List[Union[Callable, str]]]=…, isolation_level: Optional[psycopg.IsolationLevel]=…) -> Callable[[FixtureRequest], Iterator[connection]]
  • added: function xdistify_dbname(dbname: str) -> str
  • changed: constructor DatabaseJanitor(user: str, host: str, port: Union[str, int], dbname: str, version: Union[str, float, Version], password: Optional[str]=…, isolation_level: Optional[int]=…, connection_timeout: int=…) -> None → constructor DatabaseJanitor(user: str, host: str, port: Union[str, int], dbname: str, version: Union[str, float, Version], password: Optional[str]=…, isolation_level: Optional[psycopg.IsolationLevel]=…, connection_timeout: int=…) -> None
  • changed: method DatabaseJanitor.cursor() -> cursor → method DatabaseJanitor.cursor() -> Iterator[cursor]
  • changed: function loader(sql_filename: str, **kwargs: Dict) -> None → function loader(sql_filename: str, **kwargs: Any) -> None