主题: compatibility
-
musl versus glibc on Alpine: why some prebuilt binaries, Python wheels and DNS behaviour differ
Alpine's musl libc is not binary-compatible with glibc, has a different (parallel, non-search-falling-back) DNS resolver, defaults to the C.UTF-8 locale rather than a full locale database, and does not support lazy symbol binding — differences that explain glibc-linked binaries failing to run, manylinux Python wheels being rejected, and some legacy DNS configurations behaving differently. gcompat can run some unmodified glibc binaries but cannot be used to build software that itself requires glibc headers.
-
Protocol Buffers:字段编号、未知字段与消息演进规则
在 Protocol Buffers 的传输格式中,标识字段的是编号而非名称,因此编号绝不能改变或复用。新增字段对传输格式安全;删除字段只有在编号永不复用时才安全,可用 reserved 声明强制保证。旧读取端保留未知字段,将 int32 扩宽为 int64 仅在一定条件下安全。ProtoJSON 有另一套规则。
-
Diffing the OpenAPI document in CI catches breaking changes that code review misses
Hypothesis: a CI step that compares the OpenAPI document of each change against the released one with a breaking-change classifier such as oasdiff flags removed fields, narrowed types and new required parameters that human review of the code diff misses, so fewer unintended breaking changes reach a release.
-
Deprecating a function in a library: warn, document the replacement, remove on schedule
A library deprecation has four parts: a replacement that exists first, a runtime warning plus a documentation note naming the version and the replacement, a changelog entry, and a removal release fixed in advance by policy. PEP 387 requires a deprecation period of at least two years under Python's annual cadence and describes a documentation-only soft deprecation; Django removes shims no earlier than two feature releases after the warning.
-
Schema evolution with Avro and Parquet: reader and writer schemas, merged files and compatibility modes
Avro resolves a writer's schema against a reader's schema field by field, filling missing fields from reader defaults and ignoring unknown ones; Parquet files with different but compatible schemas can be merged by the reading engine at a cost; a schema registry enforces backward, forward or full compatibility. Adding optional fields with defaults is the safe move, renaming and type changes are not.
-
使用 Deprecation 和 Sunset 头弃用 API 端点
直接在响应中宣布生命周期结束:Deprecation 头(RFC 9745)将资源标记为已弃用,Sunset 头(RFC 8594)说明何时停止工作,指向文档的 Link 则解释替代方案;同时记录仍在调用的客户端。
-
Protocol Buffers 枚举:按运行时行为处理未知数值
根据所选模式和语言实现,规划向前兼容的枚举处理。
-
支持多条发布线:哪些修复应进入哪些版本
支持策略是一张列出各发布线状态(功能开发、缺陷修复、仅安全更新、生命周期结束)的表,以及按修复类别规定回移目标的规则。Python 为一个系列提供两年的缺陷修复版本,再提供三年仅含安全修复的版本;Django 将关键修复回移到最后一个功能版本,将安全和数据丢失修复回移到最后两个功能版本及长期支持线;Rust 仅支持最新稳定版。小型项目应发布该表,并默认作出自己能够兑现的最小范围承诺。
-
让主张与其适用版本相对应
明确记录版本适用范围,拒绝将当前文档中的主张直接套用于版本未知或不兼容的安装环境。
机器可读: JSON