From 9619bce5bfe3d77e4037c7a7c5562d5488ff9d71 Mon Sep 17 00:00:00 2001 From: Scott Motte Date: Wed, 29 Jul 2026 13:03:10 -0700 Subject: [PATCH 1/3] update subscription --- pyproject.toml | 2 +- src/dotenvx/__version__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2c14d42..a7ede9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "maturin" [project] name = "python-dotenvx" version = "2.0.0" -description = "A better dotenv, backed by dotenvx Rust primitives" +description = "a secure dotenv–from the creator of `dotenv`" readme = "README.md" requires-python = ">=3.8" license = { text = "BSD-3-Clause" } diff --git a/src/dotenvx/__version__.py b/src/dotenvx/__version__.py index 3dd8cbb..831f744 100644 --- a/src/dotenvx/__version__.py +++ b/src/dotenvx/__version__.py @@ -1,5 +1,5 @@ __title__ = "python-dotenvx" -__description__ = "[dotenvx.com] a better dotenv–from the creator of `dotenv`" +__description__ = "a secure dotenv–from the creator of `dotenv`" __url__ = "https://github.com/dotenvx/python-dotenvx" __version__ = "2.0.0" __author__ = "dotenv" From 6aae31add2bfc0a9e9055f169ed350fe2154ae87 Mon Sep 17 00:00:00 2001 From: Scott Motte Date: Wed, 29 Jul 2026 13:03:43 -0700 Subject: [PATCH 2/3] single version change --- DEVELOPMENT.md | 28 ++++++++++++++++++---------- pyproject.toml | 2 +- src/dotenvx/__version__.py | 4 +++- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index a2eb0a5..4938a39 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -23,17 +23,26 @@ The resulting wheel is written to `target/wheels`. ## Version changes -Keep these versions synchronized: +`Cargo.toml` is the single source of truth for the package version: -- `pyproject.toml`: Python distribution version -- `Cargo.toml`: native extension version -- `src/dotenvx/__version__.py`: Python runtime version +```toml +[package] +version = "2.0.1" +``` + +Maturin uses that value for the PyPI distribution because `pyproject.toml` +declares `version` as dynamic. At runtime, `dotenvx.__version__` reads the +installed distribution metadata. `Cargo.lock` is generated from +`Cargo.toml`. + +After changing the version, refresh the lockfile: -Unlike npm, Python packaging has no built-in `npm version patch` equivalent. -Update all three files to the chosen semantic version before tagging. +```sh +cargo check +``` -The `dotenvx-primitives` dependency version in `Cargo.toml` is independent. It -should identify the crate release that this Python package embeds. +The `dotenvx-primitives` dependency version is independent. Change it only +when this package should embed a newer primitives release. ## Publishing @@ -53,5 +62,4 @@ git tag v0.0.0 git push origin v0.0.0 ``` -The tag version must match `pyproject.toml`, `Cargo.toml`, and -`src/dotenvx/__version__.py`. +The tag version must match `Cargo.toml`. diff --git a/pyproject.toml b/pyproject.toml index a7ede9f..8b74934 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "python-dotenvx" -version = "2.0.0" +dynamic = ["version"] description = "a secure dotenv–from the creator of `dotenv`" readme = "README.md" requires-python = ">=3.8" diff --git a/src/dotenvx/__version__.py b/src/dotenvx/__version__.py index 831f744..b730679 100644 --- a/src/dotenvx/__version__.py +++ b/src/dotenvx/__version__.py @@ -1,7 +1,9 @@ +from importlib.metadata import version + __title__ = "python-dotenvx" __description__ = "a secure dotenv–from the creator of `dotenv`" __url__ = "https://github.com/dotenvx/python-dotenvx" -__version__ = "2.0.0" +__version__ = version("python-dotenvx") __author__ = "dotenv" __author_email__ = "mot@dotenvx.com" __license__ = "BSD-3-Clause" From afa947d4beaea4d9820ec6c55bde1b8908a644f8 Mon Sep 17 00:00:00 2001 From: Scott Motte Date: Wed, 29 Jul 2026 13:06:01 -0700 Subject: [PATCH 3/3] update --- Cargo.lock | 60 +++++++++++------------------------------------------- Cargo.toml | 3 ++- 2 files changed, 14 insertions(+), 49 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c739d79..0679057 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,12 +52,6 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" -[[package]] -name = "autocfg" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" - [[package]] name = "base16ct" version = "0.2.0" @@ -395,15 +389,6 @@ dependencies = [ "hmac 0.8.1", ] -[[package]] -name = "indoc" -version = "2.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" -dependencies = [ - "rustversion", -] - [[package]] name = "inout" version = "0.1.4" @@ -504,15 +489,6 @@ version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - [[package]] name = "once_cell" version = "1.21.4" @@ -596,37 +572,32 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.22.6" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ - "cfg-if", - "indoc", "libc", - "memoffset", "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", - "unindent", ] [[package]] name = "pyo3-build-config" -version = "0.22.6" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ - "once_cell", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.22.6" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -634,9 +605,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.22.6" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -646,13 +617,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.22.6" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn 2.0.119", ] @@ -863,9 +833,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.16" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" [[package]] name = "typenum" @@ -879,12 +849,6 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" -[[package]] -name = "unindent" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" - [[package]] name = "universal-hash" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index 8f5da21..b21f676 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "python-dotenvx-native" version = "2.0.0" edition = "2021" +rust-version = "1.83" publish = false [lib] @@ -11,4 +12,4 @@ path = "rust/lib.rs" [dependencies] dotenvx-primitives = "=2.1.1" -pyo3 = { version = "0.22", features = ["abi3-py38"] } +pyo3 = { version = "0.29", features = ["abi3-py38"] }