Skip to content

Commit

Permalink
Bump edgedb-python to 3.0.0b4 (#8046)
Browse files Browse the repository at this point in the history
The Cython extensions must skip the CI cache and get
rebuilt when bumping the version of edgedb-python,
because `edb/protocol/protocol.pyx` links to the protocol
binary in edgedb-python.

---------

Co-authored-by: Fantix King <[email protected]>
  • Loading branch information
msullivan and fantix authored Nov 28, 2024
1 parent 0504ebe commit e41c48b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
5 changes: 4 additions & 1 deletion edb/buildmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ def get_extension_dir_path() -> pathlib.Path:
def hash_dirs(
dirs: Sequence[Tuple[str, str]],
*,
extra_files: Optional[Sequence[Union[str, pathlib.Path]]]=None
extra_files: Optional[Sequence[Union[str, pathlib.Path]]]=None,
extra_data: Optional[bytes] = None,
) -> bytes:
def hash_dir(dirname, ext, paths):
with os.scandir(dirname) as it:
Expand All @@ -247,6 +248,8 @@ def hash_dir(dirname, ext, paths):
with open(path, 'rb') as f:
h.update(f.read())
h.update(str(sys.version_info[:2]).encode())
if extra_data is not None:
h.update(extra_data)
return h.digest()


Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Gel Server"
requires-python = '>=3.12.0'
dynamic = ["version"]
dependencies = [
'edgedb==3.0.0b3',
'edgedb==3.0.0b4',

'httptools>=0.6.0',
'immutables>=0.18',
Expand Down Expand Up @@ -103,7 +103,7 @@ requires = [
"wheel",

"parsing ~= 2.0",
"edgedb==3.0.0b3",
"edgedb==3.0.0b4",
]
# Custom backend needed to set up build-time sys.path because
# setup.py needs to import `edb.buildmeta`.
Expand Down
18 changes: 12 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,12 +691,18 @@ def run(self):
print(binascii.hexlify(rust_hash).decode())

elif self.type == 'ext':
ext_hash = hash_dirs([
(pkg_dir, '.pyx'),
(pkg_dir, '.pyi'),
(pkg_dir, '.pxd'),
(pkg_dir, '.pxi'),
])
import gel

ext_hash = hash_dirs(
[
(pkg_dir, '.pyx'),
(pkg_dir, '.pyi'),
(pkg_dir, '.pxd'),
(pkg_dir, '.pxi'),
],
# protocol.pyx for tests links to edgedb-python binary
extra_data=gel.__version__.encode(),
)
print(
binascii.hexlify(ext_hash).decode() + '-'
+ _get_libpg_query_source_stamp()
Expand Down

0 comments on commit e41c48b

Please sign in to comment.