From cafd7f2902439d822b461e9de8da3683bf15d9d8 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Wed, 25 Sep 2024 15:16:48 -0600 Subject: [PATCH] Rename `version.py` files to `version/__init__.py` (#4099) * Rename version.py files to version/__init__.py Fixes #4097 * Use a better variable name --- .github/workflows/prepare-release-branch.yml | 6 ++++ .../error_handler_0/pyproject.toml | 2 +- .../{version.py => version/__init__.py} | 0 .../error_handler_1/pyproject.toml | 2 +- .../{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../grpc/{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../http/{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../otlp/{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../json/{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../http/{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../b3/{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../{version.py => version/__init__.py} | 0 scripts/eachdist.py | 30 ++++++++++++++----- .../pyproject.toml | 2 +- .../{version.py => version/__init__.py} | 0 .../pyproject.toml | 2 +- .../{version.py => version/__init__.py} | 0 tests/opentelemetry-test-utils/pyproject.toml | 2 +- .../test/{version.py => version/__init__.py} | 0 34 files changed, 44 insertions(+), 24 deletions(-) rename docs/examples/error_handler/error_handler_0/src/error_handler_0/{version.py => version/__init__.py} (100%) rename docs/examples/error_handler/error_handler_1/src/error_handler_1/{version.py => version/__init__.py} (100%) rename exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/{version.py => version/__init__.py} (100%) rename exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/{version.py => version/__init__.py} (100%) rename exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/{version.py => version/__init__.py} (100%) rename exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/{version.py => version/__init__.py} (100%) rename exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/{version.py => version/__init__.py} (100%) rename exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/{version.py => version/__init__.py} (100%) rename exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/{version.py => version/__init__.py} (100%) rename exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/{version.py => version/__init__.py} (100%) rename exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/{version.py => version/__init__.py} (100%) rename propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/{version.py => version/__init__.py} (100%) rename propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/{version.py => version/__init__.py} (100%) rename shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/{version.py => version/__init__.py} (100%) rename shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/{version.py => version/__init__.py} (100%) rename tests/opentelemetry-test-utils/src/opentelemetry/test/{version.py => version/__init__.py} (100%) diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 936a41f5e77..3a19de88dfd 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -41,6 +41,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install toml + run: pip install toml + - name: Create release branch env: PRERELEASE_VERSION: ${{ github.event.inputs.prerelease_version }} @@ -105,6 +108,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install toml + run: pip install toml + - name: Set environment variables env: PRERELEASE_VERSION: ${{ github.event.inputs.prerelease_version }} diff --git a/docs/examples/error_handler/error_handler_0/pyproject.toml b/docs/examples/error_handler/error_handler_0/pyproject.toml index fb8c889e61f..f2b9d6b0d30 100644 --- a/docs/examples/error_handler/error_handler_0/pyproject.toml +++ b/docs/examples/error_handler/error_handler_0/pyproject.toml @@ -32,7 +32,7 @@ dependencies = [ error_handler_0 = "error_handler_0:ErrorHandler0" [tool.hatch.version] -path = "src/error_handler_0/version.py" +path = "src/error_handler_0/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/docs/examples/error_handler/error_handler_0/src/error_handler_0/version.py b/docs/examples/error_handler/error_handler_0/src/error_handler_0/version/__init__.py similarity index 100% rename from docs/examples/error_handler/error_handler_0/src/error_handler_0/version.py rename to docs/examples/error_handler/error_handler_0/src/error_handler_0/version/__init__.py diff --git a/docs/examples/error_handler/error_handler_1/pyproject.toml b/docs/examples/error_handler/error_handler_1/pyproject.toml index 5f72ff58480..31fb80f4c39 100644 --- a/docs/examples/error_handler/error_handler_1/pyproject.toml +++ b/docs/examples/error_handler/error_handler_1/pyproject.toml @@ -32,7 +32,7 @@ dependencies = [ error_handler_1 = "error_handler_1:ErrorHandler1" [tool.hatch.version] -path = "src/error_handler_1/version.py" +path = "src/error_handler_1/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/docs/examples/error_handler/error_handler_1/src/error_handler_1/version.py b/docs/examples/error_handler/error_handler_1/src/error_handler_1/version/__init__.py similarity index 100% rename from docs/examples/error_handler/error_handler_1/src/error_handler_1/version.py rename to docs/examples/error_handler/error_handler_1/src/error_handler_1/version/__init__.py diff --git a/exporter/opentelemetry-exporter-opencensus/pyproject.toml b/exporter/opentelemetry-exporter-opencensus/pyproject.toml index 00a612aecc2..1c9af54af1a 100644 --- a/exporter/opentelemetry-exporter-opencensus/pyproject.toml +++ b/exporter/opentelemetry-exporter-opencensus/pyproject.toml @@ -43,7 +43,7 @@ opencensus = "opentelemetry.exporter.opencensus.trace_exporter:OpenCensusSpanExp Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-opencensus" [tool.hatch.version] -path = "src/opentelemetry/exporter/opencensus/version.py" +path = "src/opentelemetry/exporter/opencensus/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version/__init__.py similarity index 100% rename from exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py rename to exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version/__init__.py diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/pyproject.toml b/exporter/opentelemetry-exporter-otlp-proto-common/pyproject.toml index 4453eb9eb86..6aa455e615d 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp-proto-common/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-otlp-proto-common" [tool.hatch.version] -path = "src/opentelemetry/exporter/otlp/proto/common/version.py" +path = "src/opentelemetry/exporter/otlp/proto/common/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/version.py b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py similarity index 100% rename from exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/version.py rename to exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml b/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml index f2ed898e7dc..c6c3fedc6fd 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml @@ -49,7 +49,7 @@ otlp_proto_grpc = "opentelemetry.exporter.otlp.proto.grpc.trace_exporter:OTLPSpa Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-otlp-proto-grpc" [tool.hatch.version] -path = "src/opentelemetry/exporter/otlp/proto/grpc/version.py" +path = "src/opentelemetry/exporter/otlp/proto/grpc/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version/__init__.py similarity index 100% rename from exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py rename to exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version/__init__.py diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml b/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml index 77f6063f467..b062d94e35a 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml @@ -49,7 +49,7 @@ otlp_proto_http = "opentelemetry.exporter.otlp.proto.http._log_exporter:OTLPLogE Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-otlp-proto-http" [tool.hatch.version] -path = "src/opentelemetry/exporter/otlp/proto/http/version.py" +path = "src/opentelemetry/exporter/otlp/proto/http/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version/__init__.py similarity index 100% rename from exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py rename to exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version/__init__.py diff --git a/exporter/opentelemetry-exporter-otlp/pyproject.toml b/exporter/opentelemetry-exporter-otlp/pyproject.toml index 7566929537a..5812c296af3 100644 --- a/exporter/opentelemetry-exporter-otlp/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp/pyproject.toml @@ -45,7 +45,7 @@ otlp = "opentelemetry.exporter.otlp.proto.grpc.trace_exporter:OTLPSpanExporter" Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-otlp" [tool.hatch.version] -path = "src/opentelemetry/exporter/otlp/version.py" +path = "src/opentelemetry/exporter/otlp/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py similarity index 100% rename from exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py rename to exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version/__init__.py diff --git a/exporter/opentelemetry-exporter-prometheus/pyproject.toml b/exporter/opentelemetry-exporter-prometheus/pyproject.toml index e3b09d18267..33844ef9391 100644 --- a/exporter/opentelemetry-exporter-prometheus/pyproject.toml +++ b/exporter/opentelemetry-exporter-prometheus/pyproject.toml @@ -40,7 +40,7 @@ prometheus = "opentelemetry.exporter.prometheus:_AutoPrometheusMetricReader" Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-prometheus" [tool.hatch.version] -path = "src/opentelemetry/exporter/prometheus/version.py" +path = "src/opentelemetry/exporter/prometheus/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version/__init__.py similarity index 100% rename from exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py rename to exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version/__init__.py diff --git a/exporter/opentelemetry-exporter-zipkin-json/pyproject.toml b/exporter/opentelemetry-exporter-zipkin-json/pyproject.toml index 70b4f72ea48..992f2471564 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/pyproject.toml +++ b/exporter/opentelemetry-exporter-zipkin-json/pyproject.toml @@ -40,7 +40,7 @@ zipkin_json = "opentelemetry.exporter.zipkin.json:ZipkinExporter" Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-zipkin-json" [tool.hatch.version] -path = "src/opentelemetry/exporter/zipkin/json/version.py" +path = "src/opentelemetry/exporter/zipkin/json/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version/__init__.py similarity index 100% rename from exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py rename to exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version/__init__.py diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml b/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml index 71018d2263c..10d43412b79 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml @@ -42,7 +42,7 @@ zipkin_proto = "opentelemetry.exporter.zipkin.proto.http:ZipkinExporter" Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-zipkin-proto-http" [tool.hatch.version] -path = "src/opentelemetry/exporter/zipkin/proto/http/version.py" +path = "src/opentelemetry/exporter/zipkin/proto/http/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version/__init__.py similarity index 100% rename from exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py rename to exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version/__init__.py diff --git a/exporter/opentelemetry-exporter-zipkin/pyproject.toml b/exporter/opentelemetry-exporter-zipkin/pyproject.toml index b9e51b04757..59b0a9c6041 100644 --- a/exporter/opentelemetry-exporter-zipkin/pyproject.toml +++ b/exporter/opentelemetry-exporter-zipkin/pyproject.toml @@ -39,7 +39,7 @@ zipkin = "opentelemetry.exporter.zipkin.proto.http:ZipkinExporter" Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-zipkin" [tool.hatch.version] -path = "src/opentelemetry/exporter/zipkin/version.py" +path = "src/opentelemetry/exporter/zipkin/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py b/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version/__init__.py similarity index 100% rename from exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py rename to exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version/__init__.py diff --git a/propagator/opentelemetry-propagator-b3/pyproject.toml b/propagator/opentelemetry-propagator-b3/pyproject.toml index f8abf0bc3ce..a4d2ce7e7e0 100644 --- a/propagator/opentelemetry-propagator-b3/pyproject.toml +++ b/propagator/opentelemetry-propagator-b3/pyproject.toml @@ -39,7 +39,7 @@ b3multi = "opentelemetry.propagators.b3:B3MultiFormat" Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/propagator/opentelemetry-propagator-b3" [tool.hatch.version] -path = "src/opentelemetry/propagators/b3/version.py" +path = "src/opentelemetry/propagators/b3/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py b/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version/__init__.py similarity index 100% rename from propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py rename to propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version/__init__.py diff --git a/propagator/opentelemetry-propagator-jaeger/pyproject.toml b/propagator/opentelemetry-propagator-jaeger/pyproject.toml index 9bdf0513b02..42df05ed5d9 100644 --- a/propagator/opentelemetry-propagator-jaeger/pyproject.toml +++ b/propagator/opentelemetry-propagator-jaeger/pyproject.toml @@ -37,7 +37,7 @@ jaeger = "opentelemetry.propagators.jaeger:JaegerPropagator" Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/propagator/opentelemetry-propagator-jaeger" [tool.hatch.version] -path = "src/opentelemetry/propagators/jaeger/version.py" +path = "src/opentelemetry/propagators/jaeger/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version/__init__.py similarity index 100% rename from propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py rename to propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version/__init__.py diff --git a/scripts/eachdist.py b/scripts/eachdist.py index 12ce83d4379..5a2b7603899 100755 --- a/scripts/eachdist.py +++ b/scripts/eachdist.py @@ -7,6 +7,7 @@ import shutil import subprocess import sys +from toml import load from configparser import ConfigParser from inspect import cleandoc from itertools import chain @@ -554,14 +555,27 @@ def filter_packages(targets, packages): def update_version_files(targets, version, packages): - print("updating version.py files") - targets = filter_packages(targets, packages) - update_files( - targets, - "version.py", - "__version__ .*", - f'__version__ = "{version}"', - ) + print("updating version/__init__.py files") + + search = "__version__ .*" + replace = f'__version__ = "{version}"' + + for target in filter_packages(targets, packages): + + version_file_path = target.joinpath( + load(target.joinpath("pyproject.toml")) + ["tool"]["hatch"]["version"]["path"] + ) + + with open(version_file_path) as file: + text = file.read() + + if replace in text: + print(f"{version_file_path} already contains {replace}") + continue + + with open(version_file_path, "w", encoding="utf-8") as file: + file.write(re.sub(search, replace, text)) def update_dependencies(targets, version, packages): diff --git a/shim/opentelemetry-opencensus-shim/pyproject.toml b/shim/opentelemetry-opencensus-shim/pyproject.toml index b4fdfb6e9f8..1301f4b6692 100644 --- a/shim/opentelemetry-opencensus-shim/pyproject.toml +++ b/shim/opentelemetry-opencensus-shim/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/shim/opentelemetry-opencensus-shim" [tool.hatch.version] -path = "src/opentelemetry/shim/opencensus/version.py" +path = "src/opentelemetry/shim/opencensus/version/__init__.py" [tool.hatch.build.targets.sdist] include = ["/src", "/tests"] diff --git a/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/version.py b/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/version/__init__.py similarity index 100% rename from shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/version.py rename to shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/version/__init__.py diff --git a/shim/opentelemetry-opentracing-shim/pyproject.toml b/shim/opentelemetry-opentracing-shim/pyproject.toml index 0345178f903..69e4aa4b178 100644 --- a/shim/opentelemetry-opentracing-shim/pyproject.toml +++ b/shim/opentelemetry-opentracing-shim/pyproject.toml @@ -36,7 +36,7 @@ dependencies = [ Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/shim/opentelemetry-opentracing-shim" [tool.hatch.version] -path = "src/opentelemetry/shim/opentracing_shim/version.py" +path = "src/opentelemetry/shim/opentracing_shim/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py b/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version/__init__.py similarity index 100% rename from shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py rename to shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version/__init__.py diff --git a/tests/opentelemetry-test-utils/pyproject.toml b/tests/opentelemetry-test-utils/pyproject.toml index 3512307a2f9..0bce586b98e 100644 --- a/tests/opentelemetry-test-utils/pyproject.toml +++ b/tests/opentelemetry-test-utils/pyproject.toml @@ -35,7 +35,7 @@ dependencies = [ Homepage = "https://github.com/open-telemetry/opentelemetry-python/tests/opentelemetry-test-utils" [tool.hatch.version] -path = "src/opentelemetry/test/version.py" +path = "src/opentelemetry/test/version/__init__.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/version/__init__.py similarity index 100% rename from tests/opentelemetry-test-utils/src/opentelemetry/test/version.py rename to tests/opentelemetry-test-utils/src/opentelemetry/test/version/__init__.py