Skip to content

Commit 2d2d17f

Browse files
committed
Python: Treat all .dev versions as local dev builds, not just .dev0
CI builds produce timestamped versions like 8.75.0.dev20260227100441 which are also not published to PyPI. Use .contains(".dev") instead of .endsWith(".dev0") to catch all PEP 440 dev versions.
1 parent a7455ad commit 2d2d17f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rewrite-python/src/main/java/org/openrewrite/python/rpc/PythonRewriteRpc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ public Builder pythonVersion(String pythonVersion) {
539539
public PythonRewriteRpc get() {
540540
String version = StringUtils.readFully(
541541
PythonRewriteRpc.class.getResourceAsStream("/META-INF/rewrite-python-version.txt")).trim();
542-
boolean isDevBuild = version.isEmpty() || version.endsWith(".dev0") || "unspecified".equals(version);
542+
boolean isDevBuild = version.isEmpty() || version.contains(".dev") || "unspecified".equals(version);
543543

544544
Path resolvedPipPackagesPath = null;
545545
if (!isDevBuild) {

0 commit comments

Comments
 (0)