ITADN

Switch to SPDX license headers

#4521OpenMikeGoldsmith 创建于 2026-05-01
M
MikeGoldsmithcommented
## Description All Python files in this repo currently use the full Apache 2.0 license header (13 lines): ```python # Copyright The OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ``` Other OTel SDKs have already moved to the shorter SPDX format (2 lines): ```python # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 ``` This is functionally and legally equivalent. It reduces visual noise and is consistent with the direction other SDKs have taken. ## Precedent - **Go SDK**: open-telemetry/opentelemetry-go#4986 / open-telemetry/opentelemetry-go#4987 - **Java SDK**: Already uses SPDX format - **Python SDK**: open-telemetry/opentelemetry-python#5170 ## Scope ~1488 `.py` files in this repo would be updated. ## Steps - [ ] Write a script to replace the 13-line Apache header with the 2-line SPDX header across all `.py` files - [ ] Verify no files are missed (check for header variations) - [ ] Update any CI or pre-commit checks that validate the header format - [ ] Submit PR (single large PR, best timed during a quiet period to minimize rebase conflicts) - [ ] Update contributing docs if they reference the old header format ## Notes There is no runtime performance impact — Python strips comments during bytecode compilation. The benefit is purely reduced boilerplate and consistency with other OTel SDKs.
0 条评论