vsycopg-binary 5.0.2__cp313-cp313-win_amd64.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.
@@ -0,0 +1,28 @@
1
+ """
2
+ vsycopg -- PostgreSQL database adapter for Python -- C optimization package
3
+ """
4
+
5
+
6
+ # start delvewheel patch
7
+ def _delvewheel_patch_1_13_0():
8
+ import os
9
+ if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'vsycopg_binary.libs'))):
10
+ os.add_dll_directory(libs_dir)
11
+
12
+
13
+ _delvewheel_patch_1_13_0()
14
+ del _delvewheel_patch_1_13_0
15
+ # end delvewheel patch
16
+
17
+ # Copyright (C) 2020 The Vsycopg Team
18
+
19
+ import sys
20
+
21
+ # This package shouldn't be imported before vsycopg itself, or weird things
22
+ # will happen
23
+ if "vsycopg" not in sys.modules:
24
+ raise ImportError("the vsycopg package should be imported before vsycopg_binary")
25
+
26
+ from .version import __vb_version__ as __vb_version__ # noqa: F401
27
+ from .version import __vb_version_info__ as __vb_version_info__ # noqa: F401
28
+ from .version import __version__ as __version__ # noqa
@@ -0,0 +1,30 @@
1
+ """
2
+ Internal objects to support the UUID adapters.
3
+ """
4
+
5
+ # Copyright (C) 2025 The Vsycopg 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]