about summary refs log tree commit diff
path: root/.venv/lib/python3.12/site-packages/psycopg_binary
diff options
context:
space:
mode:
Diffstat (limited to '.venv/lib/python3.12/site-packages/psycopg_binary')
-rw-r--r--.venv/lib/python3.12/site-packages/psycopg_binary/__init__.py14
-rw-r--r--.venv/lib/python3.12/site-packages/psycopg_binary/_psycopg.cpython-312-x86_64-linux-gnu.sobin0 -> 865441 bytes
-rw-r--r--.venv/lib/python3.12/site-packages/psycopg_binary/_psycopg.pyi83
-rw-r--r--.venv/lib/python3.12/site-packages/psycopg_binary/_uuid.py28
-rw-r--r--.venv/lib/python3.12/site-packages/psycopg_binary/pq.cpython-312-x86_64-linux-gnu.sobin0 -> 386313 bytes
-rw-r--r--.venv/lib/python3.12/site-packages/psycopg_binary/py.typed0
-rw-r--r--.venv/lib/python3.12/site-packages/psycopg_binary/version.py12
7 files changed, 137 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/psycopg_binary/__init__.py b/.venv/lib/python3.12/site-packages/psycopg_binary/__init__.py
new file mode 100644
index 00000000..ce8c33e3
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/psycopg_binary/__init__.py
@@ -0,0 +1,14 @@
+"""
+psycopg -- PostgreSQL database adapter for Python -- C optimization package
+"""
+
+# Copyright (C) 2020 The Psycopg Team
+
+import sys
+
+# This package shouldn't be imported before psycopg itself, or weird things
+# will happen
+if "psycopg" not in sys.modules:
+    raise ImportError("the psycopg package should be imported before psycopg_binary")
+
+from .version import __version__ as __version__  # noqa
diff --git a/.venv/lib/python3.12/site-packages/psycopg_binary/_psycopg.cpython-312-x86_64-linux-gnu.so b/.venv/lib/python3.12/site-packages/psycopg_binary/_psycopg.cpython-312-x86_64-linux-gnu.so
new file mode 100644
index 00000000..ca821ef6
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/psycopg_binary/_psycopg.cpython-312-x86_64-linux-gnu.so
Binary files differdiff --git a/.venv/lib/python3.12/site-packages/psycopg_binary/_psycopg.pyi b/.venv/lib/python3.12/site-packages/psycopg_binary/_psycopg.pyi
new file mode 100644
index 00000000..fe19c120
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/psycopg_binary/_psycopg.pyi
@@ -0,0 +1,83 @@
+"""
+Stub representation of the public objects exposed by the _psycopg module.
+
+TODO: this should be generated by mypy's stubgen but it crashes with no
+information. Will submit a bug.
+"""
+
+# Copyright (C) 2020 The Psycopg Team
+
+from __future__ import annotations
+
+from typing import Any, Sequence
+
+from psycopg import BaseConnection, abc, pq
+from psycopg.rows import Row, RowMaker
+from psycopg.adapt import AdaptersMap, PyFormat
+from psycopg.pq.abc import PGcancelConn, PGconn, PGresult
+from psycopg._compat import Deque
+
+class Transformer(abc.AdaptContext):
+    types: tuple[int, ...] | None
+    formats: list[pq.Format] | None
+    def __init__(self, context: abc.AdaptContext | None = None): ...
+    @classmethod
+    def from_context(cls, context: abc.AdaptContext | None) -> "Transformer": ...
+    @property
+    def connection(self) -> BaseConnection[Any] | None: ...
+    @property
+    def encoding(self) -> str: ...
+    @property
+    def adapters(self) -> AdaptersMap: ...
+    @property
+    def pgresult(self) -> PGresult | None: ...
+    def set_pgresult(
+        self,
+        result: "PGresult" | None,
+        *,
+        set_loaders: bool = True,
+        format: pq.Format | None = None,
+    ) -> None: ...
+    def set_dumper_types(self, types: Sequence[int], format: pq.Format) -> None: ...
+    def set_loader_types(self, types: Sequence[int], format: pq.Format) -> None: ...
+    def dump_sequence(
+        self, params: Sequence[Any], formats: Sequence[PyFormat]
+    ) -> Sequence[abc.Buffer | None]: ...
+    def as_literal(self, obj: Any) -> bytes: ...
+    def get_dumper(self, obj: Any, format: PyFormat) -> abc.Dumper: ...
+    def load_rows(self, row0: int, row1: int, make_row: RowMaker[Row]) -> list[Row]: ...
+    def load_row(self, row: int, make_row: RowMaker[Row]) -> Row | None: ...
+    def load_sequence(self, record: Sequence[abc.Buffer | None]) -> tuple[Any, ...]: ...
+    def get_loader(self, oid: int, format: pq.Format) -> abc.Loader: ...
+
+# Generators
+def connect(conninfo: str, *, timeout: float = 0.0) -> abc.PQGenConn[PGconn]: ...
+def cancel(
+    cancel_conn: PGcancelConn, *, timeout: float = 0.0
+) -> abc.PQGenConn[None]: ...
+def execute(pgconn: PGconn) -> abc.PQGen[list[PGresult]]: ...
+def send(pgconn: PGconn) -> abc.PQGen[None]: ...
+def fetch_many(pgconn: PGconn) -> abc.PQGen[list[PGresult]]: ...
+def fetch(pgconn: PGconn) -> abc.PQGen[PGresult | None]: ...
+def pipeline_communicate(
+    pgconn: PGconn, commands: Deque[abc.PipelineCommand]
+) -> abc.PQGen[list[list[PGresult]]]: ...
+def wait_c(
+    gen: abc.PQGen[abc.RV], fileno: int, interval: float | None = None
+) -> abc.RV: ...
+
+# Copy support
+def format_row_text(
+    row: Sequence[Any], tx: abc.Transformer, out: bytearray | None = None
+) -> bytearray: ...
+def format_row_binary(
+    row: Sequence[Any], tx: abc.Transformer, out: bytearray | None = None
+) -> bytearray: ...
+def parse_row_text(data: abc.Buffer, tx: abc.Transformer) -> tuple[Any, ...]: ...
+def parse_row_binary(data: abc.Buffer, tx: abc.Transformer) -> tuple[Any, ...]: ...
+
+# Arrays optimization
+def array_load_text(
+    data: abc.Buffer, loader: abc.Loader, delimiter: bytes = b","
+) -> list[Any]: ...
+def array_load_binary(data: abc.Buffer, tx: abc.Transformer) -> list[Any]: ...
diff --git a/.venv/lib/python3.12/site-packages/psycopg_binary/_uuid.py b/.venv/lib/python3.12/site-packages/psycopg_binary/_uuid.py
new file mode 100644
index 00000000..ec6b5338
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/psycopg_binary/_uuid.py
@@ -0,0 +1,28 @@
+"""
+Internal objects to support the UUID adapters.
+"""
+
+# Copyright (C) 2025 The Psycopg Team
+
+import uuid
+
+# Re-exports
+UUID = uuid.UUID
+SafeUUID_unknown = uuid.SafeUUID.unknown
+
+
+class _WritableUUID(UUID):
+    """Temporary class, with the same memory layout of UUID, but writable.
+
+    This class must have the same memory layout of the UUID class, so we can
+    create one, setting the `int` attribute, and changing the `__class__`,
+    which should be faster than calling the complex UUID.__init__ machinery.
+
+        u = _WritableUUID()
+        u.is_safe = ...
+        u.int = ...
+        u.__class__ = UUID
+    """
+
+    __slots__ = ()  # Give the class the same memory layout of the base clasee
+    __setattr__ = object.__setattr__  # make the class writable
diff --git a/.venv/lib/python3.12/site-packages/psycopg_binary/pq.cpython-312-x86_64-linux-gnu.so b/.venv/lib/python3.12/site-packages/psycopg_binary/pq.cpython-312-x86_64-linux-gnu.so
new file mode 100644
index 00000000..e8e1d7a8
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/psycopg_binary/pq.cpython-312-x86_64-linux-gnu.so
Binary files differdiff --git a/.venv/lib/python3.12/site-packages/psycopg_binary/py.typed b/.venv/lib/python3.12/site-packages/psycopg_binary/py.typed
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/psycopg_binary/py.typed
diff --git a/.venv/lib/python3.12/site-packages/psycopg_binary/version.py b/.venv/lib/python3.12/site-packages/psycopg_binary/version.py
new file mode 100644
index 00000000..47bdfbce
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/psycopg_binary/version.py
@@ -0,0 +1,12 @@
+"""
+psycopg-c distribution version file.
+"""
+
+# Copyright (C) 2020 The Psycopg Team
+
+from importlib import metadata
+
+try:
+    __version__ = metadata.version("psycopg-c")
+except metadata.PackageNotFoundError:
+    __version__ = "0.0.0.0"