codex-python 0.2.7__tar.gz → 0.2.8__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codex-python
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3 :: Only
6
6
  Classifier: Programming Language :: Python :: 3.13
@@ -0,0 +1,35 @@
1
+ from typing import Any, cast
2
+
3
+ from codex_native import preview_config as _preview_config
4
+ from codex_native import run_exec_collect as _run_exec_collect
5
+ from codex_native import start_exec_stream as _start_exec_stream
6
+
7
+
8
+ def run_exec_collect(
9
+ prompt: str,
10
+ *,
11
+ config_overrides: dict[str, Any] | None = None,
12
+ load_default_config: bool = True,
13
+ ) -> list[dict]:
14
+ """Run Codex natively (in‑process) and return a list of events as dicts."""
15
+ return cast(list[dict], _run_exec_collect(prompt, config_overrides, load_default_config))
16
+
17
+
18
+ def start_exec_stream(
19
+ prompt: str,
20
+ *,
21
+ config_overrides: dict[str, Any] | None = None,
22
+ load_default_config: bool = True,
23
+ ) -> Any:
24
+ """Return a native streaming iterator over Codex events (dicts)."""
25
+ return _start_exec_stream(prompt, config_overrides, load_default_config)
26
+
27
+
28
+ def preview_config(
29
+ *, config_overrides: dict[str, Any] | None = None, load_default_config: bool = True
30
+ ) -> dict:
31
+ """Return an effective config snapshot (selected fields) from native.
32
+
33
+ Useful for tests to validate override mapping without running Codex.
34
+ """
35
+ return cast(dict, _preview_config(config_overrides, load_default_config))
@@ -121,9 +121,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
121
121
 
122
122
  [[package]]
123
123
  name = "cc"
124
- version = "1.2.36"
124
+ version = "1.2.37"
125
125
  source = "registry+https://github.com/rust-lang/crates.io-index"
126
- checksum = "5252b3d2648e5eedbc1a6f501e3c795e07025c1e93bbf8bbdd6eef7f447a6d54"
126
+ checksum = "65193589c6404eb80b450d618eaf9a2cafaaafd57ecce47370519ef674a7bd44"
127
127
  dependencies = [
128
128
  "find-msvc-tools",
129
129
  "shlex",
@@ -253,11 +253,12 @@ dependencies = [
253
253
 
254
254
  [[package]]
255
255
  name = "codex_native"
256
- version = "0.2.7"
256
+ version = "0.2.8"
257
257
  dependencies = [
258
258
  "anyhow",
259
259
  "codex-core",
260
260
  "codex-protocol",
261
+ "openssl-sys",
261
262
  "pyo3",
262
263
  "serde",
263
264
  "serde_json",
@@ -388,7 +389,7 @@ dependencies = [
388
389
  "libc",
389
390
  "option-ext",
390
391
  "redox_users",
391
- "windows-sys 0.59.0",
392
+ "windows-sys 0.61.0",
392
393
  ]
393
394
 
394
395
  [[package]]
@@ -468,7 +469,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
468
469
  checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
469
470
  dependencies = [
470
471
  "libc",
471
- "windows-sys 0.59.0",
472
+ "windows-sys 0.61.0",
472
473
  ]
473
474
 
474
475
  [[package]]
@@ -869,9 +870,9 @@ dependencies = [
869
870
 
870
871
  [[package]]
871
872
  name = "iana-time-zone"
872
- version = "0.1.63"
873
+ version = "0.1.64"
873
874
  source = "registry+https://github.com/rust-lang/crates.io-index"
874
- checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8"
875
+ checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb"
875
876
  dependencies = [
876
877
  "android_system_properties",
877
878
  "core-foundation-sys",
@@ -1145,9 +1146,9 @@ checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
1145
1146
 
1146
1147
  [[package]]
1147
1148
  name = "libredox"
1148
- version = "0.1.9"
1149
+ version = "0.1.10"
1149
1150
  source = "registry+https://github.com/rust-lang/crates.io-index"
1150
- checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3"
1151
+ checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb"
1151
1152
  dependencies = [
1152
1153
  "bitflags 2.9.4",
1153
1154
  "libc",
@@ -1782,7 +1783,7 @@ dependencies = [
1782
1783
  "errno",
1783
1784
  "libc",
1784
1785
  "linux-raw-sys 0.11.0",
1785
- "windows-sys 0.59.0",
1786
+ "windows-sys 0.61.0",
1786
1787
  ]
1787
1788
 
1788
1789
  [[package]]
@@ -1809,9 +1810,9 @@ dependencies = [
1809
1810
 
1810
1811
  [[package]]
1811
1812
  name = "rustls-webpki"
1812
- version = "0.103.4"
1813
+ version = "0.103.5"
1813
1814
  source = "registry+https://github.com/rust-lang/crates.io-index"
1814
- checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc"
1815
+ checksum = "b5a37813727b78798e53c2bec3f5e8fe12a6d6f8389bf9ca7802add4c9905ad8"
1815
1816
  dependencies = [
1816
1817
  "ring",
1817
1818
  "rustls-pki-types",
@@ -1897,18 +1898,28 @@ dependencies = [
1897
1898
 
1898
1899
  [[package]]
1899
1900
  name = "serde"
1900
- version = "1.0.219"
1901
+ version = "1.0.221"
1901
1902
  source = "registry+https://github.com/rust-lang/crates.io-index"
1902
- checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
1903
+ checksum = "341877e04a22458705eb4e131a1508483c877dca2792b3781d4e5d8a6019ec43"
1904
+ dependencies = [
1905
+ "serde_core",
1906
+ "serde_derive",
1907
+ ]
1908
+
1909
+ [[package]]
1910
+ name = "serde_core"
1911
+ version = "1.0.221"
1912
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1913
+ checksum = "0c459bc0a14c840cb403fc14b148620de1e0778c96ecd6e0c8c3cacb6d8d00fe"
1903
1914
  dependencies = [
1904
1915
  "serde_derive",
1905
1916
  ]
1906
1917
 
1907
1918
  [[package]]
1908
1919
  name = "serde_derive"
1909
- version = "1.0.219"
1920
+ version = "1.0.221"
1910
1921
  source = "registry+https://github.com/rust-lang/crates.io-index"
1911
- checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
1922
+ checksum = "d6185cf75117e20e62b1ff867b9518577271e58abe0037c40bb4794969355ab0"
1912
1923
  dependencies = [
1913
1924
  "proc-macro2",
1914
1925
  "quote",
@@ -1917,15 +1928,15 @@ dependencies = [
1917
1928
 
1918
1929
  [[package]]
1919
1930
  name = "serde_json"
1920
- version = "1.0.143"
1931
+ version = "1.0.144"
1921
1932
  source = "registry+https://github.com/rust-lang/crates.io-index"
1922
- checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a"
1933
+ checksum = "56177480b00303e689183f110b4e727bb4211d692c62d4fcd16d02be93077d40"
1923
1934
  dependencies = [
1924
1935
  "indexmap 2.11.1",
1925
1936
  "itoa",
1926
1937
  "memchr",
1927
1938
  "ryu",
1928
- "serde",
1939
+ "serde_core",
1929
1940
  ]
1930
1941
 
1931
1942
  [[package]]
@@ -1983,9 +1994,9 @@ dependencies = [
1983
1994
 
1984
1995
  [[package]]
1985
1996
  name = "serial2"
1986
- version = "0.2.31"
1997
+ version = "0.2.32"
1987
1998
  source = "registry+https://github.com/rust-lang/crates.io-index"
1988
- checksum = "26e1e5956803a69ddd72ce2de337b577898801528749565def03515f82bad5bb"
1999
+ checksum = "349bb79c63bd2690fe4ca8ef7072a6d9ca36b3a1687a08393e733ea56d573911"
1989
2000
  dependencies = [
1990
2001
  "cfg-if",
1991
2002
  "libc",
@@ -2190,7 +2201,7 @@ dependencies = [
2190
2201
  "getrandom 0.3.3",
2191
2202
  "once_cell",
2192
2203
  "rustix 1.1.2",
2193
- "windows-sys 0.59.0",
2204
+ "windows-sys 0.61.0",
2194
2205
  ]
2195
2206
 
2196
2207
  [[package]]
@@ -2795,9 +2806,9 @@ dependencies = [
2795
2806
 
2796
2807
  [[package]]
2797
2808
  name = "wildmatch"
2798
- version = "2.4.0"
2809
+ version = "2.5.0"
2799
2810
  source = "registry+https://github.com/rust-lang/crates.io-index"
2800
- checksum = "68ce1ab1f8c62655ebe1350f589c61e505cf94d385bc6a12899442d9081e71fd"
2811
+ checksum = "39b7d07a236abaef6607536ccfaf19b396dbe3f5110ddb73d39f4562902ed382"
2801
2812
 
2802
2813
  [[package]]
2803
2814
  name = "winapi"
@@ -2821,7 +2832,7 @@ version = "0.1.11"
2821
2832
  source = "registry+https://github.com/rust-lang/crates.io-index"
2822
2833
  checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
2823
2834
  dependencies = [
2824
- "windows-sys 0.59.0",
2835
+ "windows-sys 0.61.0",
2825
2836
  ]
2826
2837
 
2827
2838
  [[package]]
@@ -2832,15 +2843,15 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
2832
2843
 
2833
2844
  [[package]]
2834
2845
  name = "windows-core"
2835
- version = "0.61.2"
2846
+ version = "0.62.0"
2836
2847
  source = "registry+https://github.com/rust-lang/crates.io-index"
2837
- checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
2848
+ checksum = "57fe7168f7de578d2d8a05b07fd61870d2e73b4020e9f49aa00da8471723497c"
2838
2849
  dependencies = [
2839
2850
  "windows-implement",
2840
2851
  "windows-interface",
2841
- "windows-link 0.1.3",
2842
- "windows-result",
2843
- "windows-strings",
2852
+ "windows-link 0.2.0",
2853
+ "windows-result 0.4.0",
2854
+ "windows-strings 0.5.0",
2844
2855
  ]
2845
2856
 
2846
2857
  [[package]]
@@ -2884,8 +2895,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2884
2895
  checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e"
2885
2896
  dependencies = [
2886
2897
  "windows-link 0.1.3",
2887
- "windows-result",
2888
- "windows-strings",
2898
+ "windows-result 0.3.4",
2899
+ "windows-strings 0.4.2",
2889
2900
  ]
2890
2901
 
2891
2902
  [[package]]
@@ -2897,6 +2908,15 @@ dependencies = [
2897
2908
  "windows-link 0.1.3",
2898
2909
  ]
2899
2910
 
2911
+ [[package]]
2912
+ name = "windows-result"
2913
+ version = "0.4.0"
2914
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2915
+ checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f"
2916
+ dependencies = [
2917
+ "windows-link 0.2.0",
2918
+ ]
2919
+
2900
2920
  [[package]]
2901
2921
  name = "windows-strings"
2902
2922
  version = "0.4.2"
@@ -2906,6 +2926,15 @@ dependencies = [
2906
2926
  "windows-link 0.1.3",
2907
2927
  ]
2908
2928
 
2929
+ [[package]]
2930
+ name = "windows-strings"
2931
+ version = "0.5.0"
2932
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2933
+ checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda"
2934
+ dependencies = [
2935
+ "windows-link 0.2.0",
2936
+ ]
2937
+
2909
2938
  [[package]]
2910
2939
  name = "windows-sys"
2911
2940
  version = "0.52.0"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "codex_native"
3
- version = "0.2.7"
3
+ version = "0.2.8"
4
4
  edition = "2021"
5
5
 
6
6
  [lib]
@@ -8,7 +8,7 @@ name = "codex_native"
8
8
  crate-type = ["cdylib"]
9
9
 
10
10
  [dependencies]
11
- pyo3 = { version = "0.26", features = ["extension-module"] }
11
+ pyo3 = { version = "0.26", features = ["extension-module", "abi3-py312"] }
12
12
  anyhow = "1"
13
13
  serde = { version = "1", features = ["derive"] }
14
14
  serde_json = "1"
@@ -24,3 +24,16 @@ codex-protocol = { git = "https://github.com/openai/codex", package = "codex-pro
24
24
  [package.metadata.maturin]
25
25
  python-source = "../../"
26
26
  name = "codex-python"
27
+
28
+ # Ensure OpenSSL is available during manylinux (glibc) builds by vendoring it.
29
+ # Upstream codex-core vendors OpenSSL for musl targets; extend that to glibc
30
+ # so Docker images don't need system openssl-devel. This avoids the
31
+ # "Could not find directory of OpenSSL installation" error from openssl-sys.
32
+ [target.x86_64-unknown-linux-gnu.dependencies]
33
+ openssl-sys = { version = "*", features = ["vendored"] }
34
+
35
+ [target.aarch64-unknown-linux-gnu.dependencies]
36
+ openssl-sys = { version = "*", features = ["vendored"] }
37
+
38
+ # Prefer rustls over native-tls/openssl across the dependency graph
39
+ # to avoid OpenSSL toolchain requirements inside manylinux containers.
@@ -1,56 +0,0 @@
1
- from typing import Any, cast
2
-
3
- try:
4
- from codex_native import preview_config as _preview_config
5
- from codex_native import run_exec_collect as _run_exec_collect
6
- from codex_native import start_exec_stream as _start_exec_stream
7
- except Exception as _e: # pragma: no cover - optional native path
8
- _run_exec_collect = None
9
- _start_exec_stream = None
10
- _preview_config = None
11
-
12
-
13
- def run_exec_collect(
14
- prompt: str,
15
- *,
16
- config_overrides: dict[str, Any] | None = None,
17
- load_default_config: bool = True,
18
- ) -> list[dict]:
19
- """Run Codex natively (in‑process) and return a list of events as dicts.
20
-
21
- Requires the native extension to be built/installed (see `make dev-native`).
22
- Falls back to raising if the extension is not available.
23
- """
24
- if _run_exec_collect is None:
25
- raise RuntimeError(
26
- "codex_native extension not installed. Run `make dev-native` or build wheels via maturin."
27
- )
28
- return cast(list[dict], _run_exec_collect(prompt, config_overrides, load_default_config))
29
-
30
-
31
- def start_exec_stream(
32
- prompt: str,
33
- *,
34
- config_overrides: dict[str, Any] | None = None,
35
- load_default_config: bool = True,
36
- ) -> Any:
37
- """Return a native streaming iterator over Codex events (dicts)."""
38
- if _start_exec_stream is None:
39
- raise RuntimeError(
40
- "codex_native extension not installed. Run `make dev-native` or build wheels via maturin."
41
- )
42
- return _start_exec_stream(prompt, config_overrides, load_default_config)
43
-
44
-
45
- def preview_config(
46
- *, config_overrides: dict[str, Any] | None = None, load_default_config: bool = True
47
- ) -> dict:
48
- """Return an effective config snapshot (selected fields) from native.
49
-
50
- Useful for tests to validate override mapping without running Codex.
51
- """
52
- if _preview_config is None: # pragma: no cover
53
- raise RuntimeError(
54
- "codex_native extension not installed. Run `make dev-native` or build wheels via maturin."
55
- )
56
- return cast(dict, _preview_config(config_overrides, load_default_config))
File without changes
File without changes
File without changes