psycopg-binary 3.3.1__cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- psycopg_binary/__init__.py +14 -0
- psycopg_binary/_psycopg.c +104300 -0
- psycopg_binary/_psycopg.cpython-312-aarch64-linux-gnu.so +0 -0
- psycopg_binary/_psycopg.pyi +83 -0
- psycopg_binary/_uuid.py +30 -0
- psycopg_binary/pq.c +40404 -0
- psycopg_binary/pq.cpython-312-aarch64-linux-gnu.so +0 -0
- psycopg_binary/py.typed +0 -0
- psycopg_binary/types/numutils.c +218 -0
- psycopg_binary/version.py +12 -0
- psycopg_binary-3.3.1.dist-info/METADATA +67 -0
- psycopg_binary-3.3.1.dist-info/RECORD +31 -0
- psycopg_binary-3.3.1.dist-info/WHEEL +6 -0
- psycopg_binary-3.3.1.dist-info/licenses/LICENSE.txt +165 -0
- psycopg_binary-3.3.1.dist-info/top_level.txt +1 -0
- psycopg_binary.libs/libcom_err-6d8d18aa.so.2.1 +0 -0
- psycopg_binary.libs/libcrypt-258f54d5.so.1.1.0 +0 -0
- psycopg_binary.libs/libcrypto-3dc39733.so.1.1.1k +0 -0
- psycopg_binary.libs/libcrypto-fabc29ad.so.3 +0 -0
- psycopg_binary.libs/libgssapi_krb5-fe951f80.so.2.2 +0 -0
- psycopg_binary.libs/libk5crypto-84470bb3.so.3.1 +0 -0
- psycopg_binary.libs/libkeyutils-fe6e95a9.so.1.6 +0 -0
- psycopg_binary.libs/libkrb5-26ef5d84.so.3.3 +0 -0
- psycopg_binary.libs/libkrb5support-875e89dc.so.0.1 +0 -0
- psycopg_binary.libs/liblber-1b1f70b4.so.2.0.200 +0 -0
- psycopg_binary.libs/libldap-e766b6da.so.2.0.200 +0 -0
- psycopg_binary.libs/libpcre2-8-8701a61e.so.0.7.1 +0 -0
- psycopg_binary.libs/libpq-a31dfdb3.so.5.18 +0 -0
- psycopg_binary.libs/libsasl2-076b3c1f.so.3.0.0 +0 -0
- psycopg_binary.libs/libselinux-5700a1fd.so.1 +0 -0
- psycopg_binary.libs/libssl-ade8e7c2.so.3 +0 -0
|
Binary file
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Stub representation of the public objects exposed by the _psycopg module.
|
|
3
|
+
|
|
4
|
+
TODO: this should be generated by mypy's stubgen but it crashes with no
|
|
5
|
+
information. Will submit a bug.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
# Copyright (C) 2020 The Psycopg Team
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
from typing import Any, Sequence
|
|
13
|
+
from collections import deque
|
|
14
|
+
|
|
15
|
+
from psycopg import BaseConnection, abc, pq
|
|
16
|
+
from psycopg.rows import Row, RowMaker
|
|
17
|
+
from psycopg.adapt import AdaptersMap, PyFormat
|
|
18
|
+
from psycopg.pq.abc import PGcancelConn, PGconn, PGresult
|
|
19
|
+
|
|
20
|
+
class Transformer(abc.AdaptContext):
|
|
21
|
+
types: tuple[int, ...] | None
|
|
22
|
+
formats: list[pq.Format] | None
|
|
23
|
+
def __init__(self, context: abc.AdaptContext | None = None): ...
|
|
24
|
+
@classmethod
|
|
25
|
+
def from_context(cls, context: abc.AdaptContext | None) -> "Transformer": ...
|
|
26
|
+
@property
|
|
27
|
+
def connection(self) -> BaseConnection[Any] | None: ...
|
|
28
|
+
@property
|
|
29
|
+
def encoding(self) -> str: ...
|
|
30
|
+
@property
|
|
31
|
+
def adapters(self) -> AdaptersMap: ...
|
|
32
|
+
@property
|
|
33
|
+
def pgresult(self) -> PGresult | None: ...
|
|
34
|
+
def set_pgresult(
|
|
35
|
+
self,
|
|
36
|
+
result: "PGresult" | None,
|
|
37
|
+
*,
|
|
38
|
+
set_loaders: bool = True,
|
|
39
|
+
format: pq.Format | None = None,
|
|
40
|
+
) -> None: ...
|
|
41
|
+
def set_dumper_types(self, types: Sequence[int], format: pq.Format) -> None: ...
|
|
42
|
+
def set_loader_types(self, types: Sequence[int], format: pq.Format) -> None: ...
|
|
43
|
+
def dump_sequence(
|
|
44
|
+
self, params: Sequence[Any], formats: Sequence[PyFormat]
|
|
45
|
+
) -> Sequence[abc.Buffer | None]: ...
|
|
46
|
+
def as_literal(self, obj: Any) -> bytes: ...
|
|
47
|
+
def get_dumper(self, obj: Any, format: PyFormat) -> abc.Dumper: ...
|
|
48
|
+
def load_rows(self, row0: int, row1: int, make_row: RowMaker[Row]) -> list[Row]: ...
|
|
49
|
+
def load_row(self, row: int, make_row: RowMaker[Row]) -> Row: ...
|
|
50
|
+
def load_sequence(self, record: Sequence[abc.Buffer | None]) -> tuple[Any, ...]: ...
|
|
51
|
+
def get_loader(self, oid: int, format: pq.Format) -> abc.Loader: ...
|
|
52
|
+
|
|
53
|
+
# Generators
|
|
54
|
+
def connect(conninfo: str, *, timeout: float = 0.0) -> abc.PQGenConn[PGconn]: ...
|
|
55
|
+
def cancel(
|
|
56
|
+
cancel_conn: PGcancelConn, *, timeout: float = 0.0
|
|
57
|
+
) -> abc.PQGenConn[None]: ...
|
|
58
|
+
def execute(pgconn: PGconn) -> abc.PQGen[list[PGresult]]: ...
|
|
59
|
+
def send(pgconn: PGconn) -> abc.PQGen[None]: ...
|
|
60
|
+
def fetch_many(pgconn: PGconn) -> abc.PQGen[list[PGresult]]: ...
|
|
61
|
+
def fetch(pgconn: PGconn) -> abc.PQGen[PGresult | None]: ...
|
|
62
|
+
def pipeline_communicate(
|
|
63
|
+
pgconn: PGconn, commands: deque[abc.PipelineCommand]
|
|
64
|
+
) -> abc.PQGen[list[list[PGresult]]]: ...
|
|
65
|
+
def wait_c(
|
|
66
|
+
gen: abc.PQGen[abc.RV], fileno: int, interval: float | None = None
|
|
67
|
+
) -> abc.RV: ...
|
|
68
|
+
|
|
69
|
+
# Copy support
|
|
70
|
+
def format_row_text(
|
|
71
|
+
row: Sequence[Any], tx: abc.Transformer, out: bytearray
|
|
72
|
+
) -> None: ...
|
|
73
|
+
def format_row_binary(
|
|
74
|
+
row: Sequence[Any], tx: abc.Transformer, out: bytearray
|
|
75
|
+
) -> None: ...
|
|
76
|
+
def parse_row_text(data: abc.Buffer, tx: abc.Transformer) -> tuple[Any, ...]: ...
|
|
77
|
+
def parse_row_binary(data: abc.Buffer, tx: abc.Transformer) -> tuple[Any, ...]: ...
|
|
78
|
+
|
|
79
|
+
# Arrays optimization
|
|
80
|
+
def array_load_text(
|
|
81
|
+
data: abc.Buffer, loader: abc.Loader, delimiter: bytes = b","
|
|
82
|
+
) -> list[Any]: ...
|
|
83
|
+
def array_load_binary(data: abc.Buffer, tx: abc.Transformer) -> list[Any]: ...
|
psycopg_binary/_uuid.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Internal objects to support the UUID adapters.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# Copyright (C) 2025 The Psycopg Team
|
|
6
|
+
|
|
7
|
+
import uuid
|
|
8
|
+
|
|
9
|
+
# Re-exports
|
|
10
|
+
UUID = uuid.UUID
|
|
11
|
+
SafeUUID_unknown = uuid.SafeUUID.unknown
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class _WritableUUID(UUID):
|
|
15
|
+
"""Temporary class, with the same memory layout of UUID, but writable.
|
|
16
|
+
|
|
17
|
+
This class must have the same memory layout of the UUID class, so we can
|
|
18
|
+
create one, setting the `int` attribute, and changing the `__class__`,
|
|
19
|
+
which should be faster than calling the complex UUID.__init__ machinery.
|
|
20
|
+
|
|
21
|
+
u = _WritableUUID()
|
|
22
|
+
u.is_safe = ...
|
|
23
|
+
u.int = ...
|
|
24
|
+
u.__class__ = UUID
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
__slots__ = () # Give the class the same memory layout of the base clasee
|
|
28
|
+
|
|
29
|
+
# Make the class writable.
|
|
30
|
+
__setattr__ = object.__setattr__ # type: ignore[assignment]
|