WinPython-64bit 3.9.5.0 版本变更全解读:新增、升级与移除包清单及变更记录生成机制
WinPython-64bit 3.9.5.0 版本变更全解读:新增、升级与移除包清单及变更记录生成机制
WinPython 是一套面向 Windows 平台的免费 Python 科学计算发行版(仓库定位见项目描述),其 changelogs/ 目录下为每个版本同时维护一份包索引清单(WinPython-64bit-3.9.5.0.md)和一份版本间变更记录(WinPython-64bit-3.9.5.0_History.md)。本文以变更记录为主体,完整梳理自 3.9.4.0 以来 WinPython-64bit 3.9.5.0 在 Python 包层面发生的全部变化——38 个新增包、约 160 个升级包、6 个移除包,并结合仓库中 wppm/diff.py 与 winpython/build_winpython.py 的源码,说明这类 _History.md 文档是如何被自动生成的,以及如何用 wppm -diff 自行复现任意两个版本/变体之间的包差异。读完本文,你将能看懂 WinPython 任一版本的变更记录结构,并掌握用仓库自带工具对比两个包清单的方法。
一、文档定位:_History.md 与包索引的关系
在 changelogs/ 目录中,3.9.5.0 版本对应两份文件:
- changelogs/WinPython-64bit-3.9.5.0.md:该版本完整的包索引,列出 Tools 与全部 Python 包(含版本号与简介),是"快照"性质的清单;
- changelogs/WinPython-64bit-3.9.5.0_History.md:本文讲解的主体,是"自 3.9.4.0 以来发生了什么变化"的差异视图,按
New packages/Upgraded packages/Removed packages三部分组织。
从源码看,_History.md 并非手工维护,而是由仓库的 wppm 包在构建流程中自动生成:
- wppm/diff.py 中定义了
CHANGELOGS_DIR = Path(__file__).parent.parent / "changelogs",即变更记录默认读写目录; - 核心对比逻辑在 compare_packages:对两份索引做归一化(包名统一为小写、
-转_),凡是"新索引中有、旧索引中没有"的包记入added,"两边都有但版本不同"的记入upgraded(输出格式为旧版本 → 新版本),"旧索引有、新索引没有"的记入removed; - 组装成完整 History 文档的函数是 compare_package_indexes,它通过 find_previous_version 从
changelogs/目录的文件名中解析出上一个版本(对 3.9.5.0 而言就是 3.9.4.0),再逐节(Tools、Python packages、WheelHouse)对比生成; - 构建脚本 build_winpython.py 的 "Step 7: generate changelog" 会先写包索引
WinPython{flavor}-{arch}bit-{version}.md,再调用diff.compare_package_indexes(...)生成_History.md,两份文件一并落入changelogs/。
因此,本文下面三节的内容,正是 wppm 工具对 3.9.4.0 → 3.9.5.0 两次包索引执行上述对比后得到的全部结果。
二、新增包:38 个新成员完整清单
本次发布一次性引入了 38 个新包,覆盖 NLP、GraphQL、SQLite 数据处理、深度学习教学框架、图像序列处理等多个方向。完整清单如下(名称 / 版本 / 简介均照录原文档):
| 包名 | 版本 | 简介 |
|---|---|---|
| algopy | 0.5.7 | ALGOPY: Taylor Arithmetic Computation and Algorithmic Differentiation |
| blis | 0.7.4 | (BLAS 类线性代数内核,spaCy/thinc 底层依赖) |
| catalogue | 2.0.4 | (spaCy 生态的注册表/组件目录工具) |
| csvs_to_sqlite | 1.2 | Convert CSV files into a SQLite database |
| cymem | 2.0.5 | Manage calls to calloc/free through Cython |
| dask_image | 0.6.0 | Distributed image processing |
| datasette_graphql | 1.4 | Datasette plugin providing an automatic GraphQL API for your SQLite databases |
| dateparser | 1.0.0 | Date parsing library designed to parse dates from HTML pages |
| fastai | 2.4 | fastai makes deep learning with PyTorch faster, more accurate, and easier |
| fastcore | 1.3.20 | (fastai 的底层工具库) |
| fastprogress | 1.0.0 | A nested progress with plotting options for fastai |
| flask_cors | 3.0.10 | A Flask extension adding a decorator for CORS support |
| flatbuffers | 2.0 | The FlatBuffers serialization format for Python |
| graphene | 2.1.8 | GraphQL Framework for Python |
| graphql_core | 2.3.1 | GraphQL implementation for Python, a port of GraphQL.js |
| graphql_relay | 2.0.1 | Relay library for graphql-core-next |
| matplotlib_inline | 0.1.2 | Inline Matplotlib backend for Jupyter |
| maturin | 0.10.6 | Build and publish crates with pyo3, rust-cpython and cffi bindings |
| murmurhash | 1.0.5 | Cython bindings for MurmurHash |
| pathy | 0.5.2 | (基于 smart_open 的云存储路径抽象) |
| pims | 0.5 | Python Image Sequence |
| preshed | 3.0.5 | Cython hash table that trusts the keys are pre-hashed |
| promise | 2.3 | Promises/A+ implementation for Python |
| py_lru_cache | 0.1.4 | LRU cache for python |
| python_picard | 0.6 | Preconditoned ICA for Real Data |
| slicerator | 0.9.8 | A lazy-loading, fancy-sliceable iterable |
| smart_open | 3.0.0 | (在本地/远程存储上以 open() 方式读写文件) |
| spacy | 3.0.6 | Industrial-strength Natural Language Processing (NLP) in Python |
| spacy_legacy | 3.0.6 | (spaCy 3.0 的旧版注册表兼容层) |
| sqlite_utils | 1.9 | CLI tool and Python utility functions for manipulating SQLite databases |
| srsly | 2.4.1 | (spaCy 生态的 JSON/序列化工具) |
| tabulate | 0.8.9 | Pretty-print tabular data |
| thinc | 8.0.5 | Practical Machine Learning for NLP |
| tinycss2 | 1.1.0 | tinycss2 |
| typer | 0.3.2 | Typer, build great CLIs. Easy to code. Based on Python type hints |
| wasabi | 0.8.2 | (spaCy 生态的 CLI 输出美化工具) |
| websocket_client | 1.1.0 | WebSocket client for Python. hybi13 is supported |
注:上表中括号内为笔者按包生态归属做的简要归类说明;原文档对 blis、catalogue、fastcore、pathy、smart_open、spacy_legacy、srsly、wasabi 等条目未附简介文字,此处照录其版本信息。
新增包的三个主题集群
- NLP(spaCy 3.0)全家桶:
spacy 3.0.6的引入带动了其完整依赖链——thinc 8.0.5(机器学习训练框架)、blis 0.7.4(线性代数内核)、cymem、murmurhash、preshed(Cython 底层数据结构)、catalogue(注册表)、srsly、wasabi(工具层)、spacy_legacy(旧注册表兼容),以及pathy、smart_open(远程数据读取)和typer(CLI)。这是一次成体系的生态入驻,说明该版本面向 NLP 场景做了整体补全。 - GraphQL 生态:
graphene 2.1.8+graphql_core 2.3.1+graphql_relay 2.0.1+promise 2.3,配套datasette_graphql 1.4(为 SQLite 数据自动生成 GraphQL API)。值得注意的是,升级列表中的aniso8601 9.0.1 → 7.0.0、rx 3.1.1 → 1.6.1两个"版本回退"条目与本次 GraphQL 生态引入高度相关——可以推断这是 graphene 2.x 系列对aniso8601<7、rx<2的依赖约束所致(属依赖求解下的正常调整,具体约束以 graphene 2.1.8 的元数据为准)。 - 数据科学基础设施:
dask_image 0.6.0(分布式图像处理)、pims 0.5+slicerator 0.9.8(惰性图像序列)、python_picard 0.6(预条件 ICA)、csvs_to_sqlite 1.2+sqlite_utils 1.9(CSV/SQLite 数据搬运与操作)、maturin 0.10.6(Rust/PyO3 构建发布)、flatbuffers 2.0(序列化格式)、dateparser、flask_cors、matplotlib_inline、py_lru_cache、algopy、tinycss2、tabulate、websocket_client等,进一步完善了 Web、序列化、格式化与科学计算的工具面。
三、升级包:约 160 个包的完整对照与重点解读
升级节是本次变更的主体,覆盖 Python 解释器本身及科学计算、深度学习、Web、Jupyter、地理空间等几乎所有核心栈。下表为原文档的完整转录(按原文档顺序排列,含版本变化与简介)。
| 包名 | 版本变化 | 简介 |
|---|---|---|
| aniso8601 | 9.0.1 → 7.0.0 | A library for parsing ISO 8601 strings. |
| anyio | 2.2.0 → 3.2.1 | High level compatibility layer for multiple asynchronous event loop implementations |
| arrow | 1.0.3 → 1.1.0 | Better dates & times for Python |
| asteval | 0.9.23 → 0.9.25 | Safe, minimalistic evaluator of python expression using ast module |
| astroid | 2.5.3 → 2.5.6 | An abstract syntax tree for Python with inference support. |
| attrs | 20.3.0 → 21.2.0 | Classes Without Boilerplate |
| babel | 2.9.0 → 2.9.1 | Internationalization utilities |
| black | 20.8b1 → 21.6b0 | The uncompromising code formatter. |
| blosc | 1.10.2 → 1.10.4 | Blosc data compressor |
| bokeh | 2.3.1 → 2.3.2 | Interactive plots and applications in the browser from Python |
| bqplot | 0.12.25 → 0.12.29 | Interactive plotting for the Jupyter notebook, using d3.js and ipywidgets. |
| cachelib | 0.1.1 → 0.2.0 | A collection of cache libraries in the same API interface. |
| cartopy | 0.18.0 → 0.19.0.post1 | A cartographic python library with Matplotlib support for visualisation |
| certifi | 2020.12.5 → 2021.5.30 | Python package for providing Mozilla's CA Bundle. |
| cftime | 1.4.1 → 1.5.0 | Time-handling functionality from netcdf4-python |
| cligj | 0.7.1 → 0.7.2 | Click params for commmand line interfaces to GeoJSON |
| cookiecutter | 1.7.2 → 1.7.3 | A command-line utility that creates projects from project templates |
| cvxpy | 1.1.12 → 1.1.13 | A domain-specific language for modeling convex optimization problems |
| dask | 2021.4.0 → 2021.6.2 | Parallel PyData with Task Scheduling |
| dask_labextension | 5.0.1 → 5.0.2 | A Jupyter Notebook server extension manages Dask clusters. |
| dask_ml | 1.8.0 → 1.9.0 | A library for distributed and parallel machine learning |
| datasette | 0.56 → 0.57.1 | A tool for exploring and publishing data |
| datashader | 0.12.1 → 0.13.0 | Data visualization toolchain based on aggregating into a grid |
| distlib | 0.3.1 → 0.3.2 | Distribution utilities |
| distributed | 2021.4.0 → 2021.6.2 | Distributed scheduler for Dask |
| docutils | 0.16 → 0.17.1 | Docutils -- Python Documentation Utilities |
| emcee | 3.0.2 → 3.1.0 | The Python ensemble sampling toolkit for MCMC |
| et_xmlfile | 1.0.1 → 1.1.0 | An implementation of lxml.xmlfile for the standard library |
| fastapi | 0.63.0 → 0.65.2 | FastAPI framework, high performance, easy to learn, fast to code |
| fasteners | 0.16 → 0.16.3 | A python package that provides useful locks. |
| fiona | 1.8.19 → 1.8.20 | Fiona reads and writes spatial data files |
| flask | 1.1.2 → 2.0.1 | A simple framework for building complex web applications. |
| flask_accepts | 0.17.7 → 0.18.2 | Easy, opinionated Flask input/output handling |
| flask_session | 0.3.2 → 0.4.0 | Adds server-side session support to your Flask application |
| fsspec | 0.8.7 → 2021.6.1 | File-system specification |
| gdal | 3.2.2 → 3.3.0 | GDAL: Geospatial Data Abstraction Library |
| geographiclib | 1.50 → 1.52 | The geodesic routines from GeographicLib |
| gitpython | 3.1.14 → 3.1.18 | Python Git Library |
| greenlet | 1.0.0 → 1.1.0 | Lightweight in-process concurrent programming |
| h5py | 2.10.0 → 3.3.0 | Read and write HDF5 files from Python |
| holoviews | 1.14.3 → 1.14.4 | Stop plotting your data - annotate your data and let it visualize itself. |
| httpcore | 0.12.3 → 0.13.6 | A minimal low-level HTTP client. |
| httpx | 0.17.1 → 0.18.2 | The next generation HTTP client. |
| hupper | 1.10.2 → 1.10.3 | Integrated process monitor for developing and reloading daemons. |
| hvplot | 0.7.1 → 0.7.2 | A high-level plotting API for the PyData ecosystem built on HoloViews. |
| hyperframe | 6.0.0 → 6.0.1 | HTTP/2 framing layer for Python |
| hypothesis | 6.9.2 → 6.14.0 | A library for property-based testing |
| importlib_metadata | 3.10.1 → 4.5.0 | Read metadata from Python packages |
| ipycanvas | 0.8.2 → 0.9.0 | Interactive widgets library exposing the browser's Canvas API |
| ipykernel | 5.5.3 → 5.5.5 | IPython Kernel for Jupyter |
| ipyleaflet | 0.13.6 → 0.14.0 | A Jupyter widget for dynamic Leaflet maps |
| ipython | 7.22.0 → 7.25.0 | IPython: Productive Interactive Computing |
| isort | 5.8.0 → 5.9.1 | A Python utility / library to sort Python imports. |
| itsdangerous | 1.1.0 → 2.0.1 | Various helpers to pass data to untrusted environments and back. |
| jinja2 | 2.11.3 → 3.0.1 | A small but fast and easy to use stand-alone template engine written in pure python. |
| json5 | 0.9.5 → 0.9.6 | A Python implementation of the JSON5 data format. |
| jupyter_bokeh | 3.0.0 → 3.0.2 | A Jupyter extension for rendering Bokeh content. |
| jupyter_core | 4.7.1 → 4.8.0.dev0 | Jupyter core package. A base package on which Jupyter projects rely. |
| jupyter_lsp | 1.1.4 → 1.3.0 | Multi-Language Server WebSocket proxy for Jupyter Notebook/Lab server |
| jupyter_server | 1.6.2 → 1.8.0 | The Jupyter Server |
| jupyter_server_mathjax | 0.2.2 → 0.2.3 | MathJax resources as a Jupyter Server Extension. |
| jupyterlab | 3.0.14 → 3.0.16 | The JupyterLab notebook server extension. |
| jupyterlab_git | 0.30.0 → 0.30.1 | A server extension for JupyterLab's git extension |
| jupyterlab_lsp | 3.5.0 → 3.7.0 | Language Server Protocol integration for JupyterLab |
| jupyterlab_server | 2.4.0 → 2.6.0 | JupyterLab Server |
| markupsafe | 1.1.1 → 2.0.1 | Safely add untrusted strings to HTML/XML markup. |
| marshmallow | 3.10.0 → 3.12.1 | A lightweight library for converting complex datatypes to and from native Python datatypes. |
| matplotlib | 3.4.1 → 3.4.2 | Python plotting package |
| mercantile | 1.1.6 → 1.2.1 | Web mercator XYZ tile utilities |
| msvc_runtime | 14.28.29910 → 14.29.30036 | Install the Microsoft Visual C++ runtime DLLs to the sys.prefix and Scripts directories |
| mypy | 0.812 → 0.910 | Optional static typing for Python |
| nbclassic | 0.2.7 → 0.3.1 | Jupyter Notebook as a Jupyter Server Extension. |
| nbconvert | 6.0.7 → 6.1.0 | Converting Jupyter Notebooks |
| nbdime | 3.0.0 → 3.1.0 | Diff and merge of Jupyter Notebooks |
| netcdf4 | 1.5.6 → 1.5.7 | Provides an object-oriented python interface to the netCDF version 4 library. |
| nltk | 3.6.1 → 3.6.2 | Natural Language Toolkit |
| notebook | 6.3.0 → 6.4.0 | A web-based notebook environment for interactive computing |
| numcodecs | 0.7.3 → 0.8.0 | A Python package providing buffer compression and transformation codecs |
| numdifftools | 0.9.39 → 0.9.40 | Solves automatic numerical differentiation problems in one or more variables. |
| numpy | 1.20.2+mkl → 1.21.0+mkl | NumPy is the fundamental package for array computing with Python. |
| onnxruntime | 1.7.0 → 1.8.0 | ONNX Runtime Python bindings |
| orjson | 3.4.6 → 3.5.3 | Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy |
| pandas | 1.2.4 → 1.2.5 | Powerful data structures for data analysis, time series, and statistics |
| pathspec | 0.8.0 → 0.8.1 | Utility library for gitignore style pattern matching of file paths. |
| patsy | 0.5.1 → 0.5.1+dev | A Python package for describing statistical models and for building design matrices. |
| pefile | 2019.4.18 → 2021.5.24 | Python PE parsing module |
| pip | 21.1.dev0 → 21.1.3 | The PyPA recommended tool for installing Python packages. |
| plotly | 4.14.3 → 5.0.0 | An open-source, interactive graphing library for Python |
| prometheus_client | 0.10.1 → 0.11.0 | Python client for the Prometheus monitoring system. |
| prompt_toolkit | 3.0.18 → 3.0.19 | Library for building powerful interactive command lines in Python |
| ptpython | 3.0.17 → 3.0.16 | Python REPL build on top of prompt_toolkit |
| pyarrow | 3.0.0 → 4.0.1 | Python library for Apache Arrow |
| pydantic | 1.8.1 → 1.7.4 | Data validation and settings management using python 3.6 type hinting |
| pydocstyle | 6.0.0 → 6.1.1 | Python docstring style checker |
| pyerfa | 1.7.2 → 2.0.0 | Python bindings for ERFA |
| pygments | 2.8.1 → 2.9.0 | Pygments is a syntax highlighting package written in Python. |
| pyhdf | 0.10.2 → 0.10.3 | pyhdf: Python interface to the NCSA HDF4 library. |
| pyinstaller | 4.2 → 4.3 | PyInstaller bundles a Python application and all its dependencies into a single package. |
| pyinstaller_hooks_contrib | 2021.1 → 2021.2 | Community maintained hooks for PyInstaller |
| pylint | 2.7.4 → 2.8.3 | python code static checker |
| pyls_black | 0.4.6 → 0.4.7 | Black plugin for the Python Language Server |
| pymongo | 3.11.3 → 3.11.4 | Python driver for MongoDB |
| pyproj | 3.0.1 → 3.1.0 | Python interface to PROJ (cartographic projections and coordinate transformations library) |
| pytest | 6.2.3 → 6.2.4 | pytest: simple powerful testing with Python |
| Python | 3.9.4 → 3.9.5 | Python programming language with standard library |
| python_slugify | 4.0.1 → 5.0.2 | A Python Slugify application that handles Unicode |
| pyviz_comms | 2.0.1 → 2.0.2 | Bidirectional communication for the PyViz ecosystem. |
| pywin32 | 300 → 301 | Python for Window Extensions |
| pywinpty | 0.5.7 → 1.1.3 | Python bindings for the winpty library |
| pyzmq | 22.0.3 → 22.1.0 | Python bindings for 0MQ |
| qstylizer | 0.1.10 → 0.2.0 | Stylesheet Generator for PyQt{4-5}/PySide{1-2} |
| qtconsole | 5.0.3 → 5.1.0 | Jupyter Qt console |
| quantecon | 0.4.8 → 0.5.0 | QuantEcon is a package to support all forms of quantitative economic modelling. |
| quart | 0.14.1 → 0.15.1 | A Python ASGI web microframework with the same API as Flask |
| rasterio | 1.2.3 → 1.2.6 | Fast and direct raster I/O for use with Numpy and SciPy |
| rfc3986 | 1.4.0 → 1.5.0 | Validating URI References per RFC 3986 |
| rope | 0.18.0 → 0.19.0 | a python refactoring library... |
| ruamel.yaml | 0.17.4 → 0.17.9 | A YAML parser/emitter supporting roundtrip preservation of comments, seq/map flow style, and map key order |
| ruamel.yaml.clib | 0.2.2 → 0.2.4 | C version of reader, parser and emitter for ruamel.yaml derived from libyaml |
| rx | 3.1.1 → 1.6.1 | Reactive Extensions (Rx) for Python |
| scikit_image | 0.18.1 → 0.18.2 | Image processing routines for SciPy |
| scikit_learn | 0.24.1 → 0.24.2 | A set of python modules for machine learning and data mining |
| scipy | 1.6.2 → 1.7.0 | SciPy: Scientific Library for Python |
| scs | 2.1.3 → 2.1.4 | scs: splitting conic solver |
| send2trash | 1.5.0 → 1.7.1 | Send file to trash natively under Mac OS X, Windows and Linux. |
| setuptools | 56.0.0 → 57.0.0 | Easily download, build, install, upgrade, and uninstall Python packages |
| six | 1.15.0 → 1.16.0 | Python 2 and 3 compatibility utilities |
| sklearn_contrib_lightning | 0.6.0 → 0.6.1 | Large-scale sparse linear classification, regression and ranking in Python |
| sortedcontainers | 2.3.0 → 2.4.0 | Sorted Containers -- Sorted List, Sorted Dict, Sorted Set |
| sphinx | 3.5.4 → 4.0.2 | Tool for generating documentation which uses reStructuredText as its markup language |
| sphinxcontrib_htmlhelp | 1.0.3 → 2.0.0 | sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files |
| sphinxcontrib_serializinghtml | 1.1.4 → 1.1.5 | sphinxcontrib-serializinghtml outputs "serialized" HTML files (json and pickle). |
| spyder | 5.0.1 → 5.0.4 | The Scientific Python Development Environment |
| spyder_kernels | 2.0.1 → 2.0.4 | Jupyter kernels for Spyder's console |
| sqlalchemy | 1.4.8 → 1.4.19 | Database Abstraction Library |
| sqlite_bro | 0.9.1 → 0.9.3 | a graphic SQLite Client in 1 Python file |
| starlette | 0.13.6 → 0.14.2 | The little ASGI library that shines. |
| terminado | 0.9.3 → 0.10.1 | Terminals served to xterm.js using Tornado websockets |
| testpath | 0.4.4 → 0.5.0 | Test utilities for code working with files and commands |
| tifffile | 2021.4.8 → 2021.6.14 | Read and write TIFF(r) files |
| torch | 1.8.1+cpu → 1.9.0 | Tensors and Dynamic neural networks in Python with strong GPU acceleration |
| torchaudio | 0.8.1 → 0.9.0 | An audio package for PyTorch |
| torchvision | 0.9.1+cpu → 0.10.0 | image and video datasets and models for torch deep learning |
| tqdm | 4.59.0 → 4.61.1 | Fast, Extensible Progress Meter |
| tranquilizer | 0.5.0+1.gff8dd5f → 0.5.1a1 | Put your functions to REST |
| trio | 0.18.0 → 0.19.0 | A friendly Python library for async concurrency and I/O |
| 1.18.0 → 1.19.2 | An API and command-line toolset for Twitter (twitter.com) | |
| typing_extensions | 3.7.4.3 → 3.10.0.0 | Backported and Experimental Type Hints for Python 3.5+ |
| urllib3 | 1.26.4 → 1.26.6 | HTTP library with thread-safe connection pooling, file post, and more. |
| uvicorn | 0.13.4 → 0.14.0 | The lightning-fast ASGI server. |
| vega | 3.4.0 → 3.5.0 | A Jupyter widget for Vega 5 and Vega-Lite 4 |
| virtualenv | 20.4.3 → 20.4.7 | Virtual Python Environment builder |
| voila | 0.2.9 → 0.2.10 | Serving read-only live Jupyter notebooks |
| watchdog | 1.0.2 → 2.1.2 | Filesystem events monitoring |
| werkzeug | 1.0.1 → 2.0.1 | The comprehensive WSGI web application library. |
| winpython | 4.1.20210417 → 4.3.20210620 | WinPython distribution tools, including WPPM |
| xarray | 0.17.0 → 0.18.2 | N-D labeled arrays and datasets in Python |
| xlsxwriter | 1.3.9 → 1.4.3 | A Python module for creating Excel XLSX files. |
| xlwings | 0.23.0 → 0.23.3 | Make Excel fly: Interact with Excel from Python and vice versa. |
| zarr | 2.7.1 → 2.8.3 | An implementation of chunked, compressed, N-dimensional arrays for Python. |
重点升级解读
- 解释器与基础栈:
Python 3.9.4 → 3.9.5是本版本号(3.9.5.0)的来源;numpy 1.20.2+mkl → 1.21.0+mkl(继续绑定 MKL 数学内核库,对应发行版面向科学计算的定位)、scipy 1.6.2 → 1.7.0、pandas 1.2.4 → 1.2.5、matplotlib 3.4.1 → 3.4.2、scikit_learn 0.24.1 → 0.24.2全线小幅跟进补丁版本。 - 深度学习:
torch 1.8.1+cpu → 1.9.0、torchaudio 0.8.1 → 0.9.0、torchvision 0.9.1+cpu → 0.10.0。注意旧版本号带+cpu本地构建标记,新版本为纯版本号;从变更记录看这是 CPU 版 PyTorch 的一次整体大版本升级(1.8 → 1.9)。 - 跨大版本升级:
h5py 2.10.0 → 3.3.0(HDF5 读写库跨入 3.x 主线,通常伴随 API 清理,升级前应关注其迁移说明);flask 1.1.2 → 2.0.1并带动werkzeug 1.0.1 → 2.0.1、jinja2 2.11.3 → 3.0.1、itsdangerous 1.1.0 → 2.0.1、markupsafe 1.1.1 → 2.0.1四个核心依赖同步进入 2.x/3.x,是典型的 Web 栈整体换代;watchdog 1.0.2 → 2.1.2、pywinpty 0.5.7 → 1.1.3(Jupyter 终端组件)、sphinx 3.5.4 → 4.0.2等同样属于跨主版本更新。 - 分布式与数据工程:
dask 2021.4.0 → 2021.6.2、distributed 2021.4.0 → 2021.6.2、dask_ml 1.8.0 → 1.9.0、pyarrow 3.0.0 → 4.0.1、xarray 0.17.0 → 0.18.2、zarr 2.7.1 → 2.8.3、datashader 0.12.1 → 0.13.0,分布式计算与栅格/阵列存储栈同步更新。 - Web/异步:
fastapi 0.63.0 → 0.65.2、starlette 0.13.6 → 0.14.2、uvicorn 0.13.4 → 0.14.0、httpx 0.17.1 → 0.18.2、anyio 2.2.0 → 3.2.1、trio 0.18.0 → 0.19.0、quart 0.14.1 → 0.15.1,ASGI 生态整体前移。 - Jupyter 生态:
jupyterlab 3.0.14 → 3.0.16、notebook 6.3.0 → 6.4.0、jupyter_server 1.6.2 → 1.8.0、ipython 7.22.0 → 7.25.0、nbconvert 6.0.7 → 6.1.0、nbdime 3.0.0 → 3.1.0、voila 0.2.9 → 0.2.10、ipykernel 5.5.3 → 5.5.5,以及spyder 5.0.1 → 5.0.4+spyder_kernels 2.0.1 → 2.0.4(随附 IDE 同步更新)。 - 发行版自举:
winpython 4.1.20210417 → 4.3.20210620(发行版自带工具集含 WPPM,参见 wppm 目录源码),pip 21.1.dev0 → 21.1.3、setuptools 56.0.0 → 57.0.0等构建链组件同步升级。 - 需要留意的"降级"条目:
aniso8601 9.0.1 → 7.0.0、rx 3.1.1 → 1.6.1、pydantic 1.8.1 → 1.7.4、ptpython 3.0.17 → 3.0.16四处是版本号回退。结合同期新增的 graphene 2.x GraphQL 栈,可以推断前两者是为满足 graphene 对aniso8601<7、rx<2的依赖约束;后两者大概率是为了满足其他已装包的版本上限约束(属依赖求解结果,具体约束需查对应包元数据,本文仅作推断)。
四、移除包:6 个包的退出
| 包名 | 版本 | 简介 |
|---|---|---|
| deprecation | 2.1.0 | A library to handle automated deprecations |
| jupyter_packaging | 0.9.1 | Jupyter Packaging Utilities |
| retrying | 1.3.3 | Retrying |
| tinycss | 0.4 | tinycss is a complete yet simple CSS parser for Python. |
| tomlkit | 0.7.0 | Style preserving TOML library |
| typed_ast | 1.4.3 | a fork of Python 2 and 3 ast modules with type comment support |
从搭配关系看,这 6 个移除项多为"被替代或不再需要":tinycss 与新增的 tinycss2 定位重叠,后者是新版 CSS 解析主线;typed_ast 在 Python 3.9 下可由标准库 ast 的注解解析能力替代,其维护已基本停止;jupyter_packaging 服务于 Jupyter 前端构建流水线,随 JupyterLab 3.0 生态调整而不再随发行版分发。以上为基于包生态与版本背景的推断,原文档本身只记录移除事实,不附理由。
五、随附工具链:Tools 部分
本次变更记录只覆盖 Python 包;发行版还捆绑三类非 Python 工具(见配套索引 changelogs/WinPython-64bit-3.9.5.0.md 的 Tools 节):
| 工具 | 版本 | 简介 |
|---|---|---|
| Nodejs | v14.16.1 | a JavaScript runtime built on Chrome's V8 JavaScript engine |
| npmjs | 6.14.12 | a package manager for JavaScript |
| Pandoc | 2.3 | a universal document converter |
这三者服务于 Jupyter 前端扩展、文档转换等场景,是发行版"开箱即用"体验的一部分。
六、用仓库工具复现与深挖变更记录
_History.md 的生成逻辑完全位于 wppm/diff.py,你无需下载发行版即可在仓库内复现任意两个包索引的差异:
# 对比任意两个包索引文件(任何两个版本/变体,方向不限,无需相邻)
$ wppm -diff WinPython-64bit-3.9.4.0.md WinPython-64bit-3.9.5.0.md
# 或等价地直接调用模块
$ python -m wppm.diff file1.md file2.md
# 只对比某个分区(python / tools / wheelhouse)
$ python -m wppm.diff file1.md file2.md --section python python
# 按版本号对比(自动从 changelogs/ 目录查找上一版本)
$ python -m wppm.diff 3.9.5.0 3.9.4.0 changelogs "" 64
# 将对比结果写入 _History.md 文件(并可选拷贝到 basedir)
$ python -m wppm.diff --write-changelog 3.9.5.0 3.9.4.0 changelogs "" 64
(命令用法与参数说明见 wppm/diff.py 及 README_PYPI.md。)
值得注意的实现细节:
- 上一版本完全由文件名决定:
find_previous_version通过正则WinPython{flavor}-{arch}bit-(.+)\.(txt|md)扫描changelogs/,再用packaging.version解析排序取最近早于目标版本者(wppm/diff.py)。因此 3.9.5.0 的 History 开头写着"since version 3.9.4.0",正是由该目录下文件推断而来。 - PEP 440 语义排序:带 release level 的版本(如
b1、rc1、post1)也能正确排序,不会被3.14.7.1b1这类名字漏掉——这一行为被 tests/test_diff_versions.py 的测试固定下来。 - 变体(flavor)与位数隔离:
dot/slim等变体、32/64 位各自独立成线,互不干扰,相应测试见 tests/test_diff_versions.py。 _History.md不入发布归档:构建产物只把包索引、锁文件与需求文件归档进changelogs/,_History.md仅供构建者预览"相对上一版本的变化",原因与取舍在 tests/test_changelog_files.py 的模块文档中说明;读者若想获得版本对比,直接用wppm -diff选择任意两份索引即可。
七、小结
WinPython-64bit 3.9.5.0 是一次覆盖面极广的常规更新:以 Python 3.9.5 为核心,引入 spaCy 3.0 与 GraphQL 两条全新生态线,同步刷新科学计算、深度学习、Web/异步、Jupyter、地理空间全栈,并清理了 6 个被替代或不必要的包。而这份变更记录本身,正是仓库 wppm 工具链"包索引 + 自动差异"能力的直接产物——阅读 wppm/diff.py、winpython/build_winpython.py 与其测试(tests/test_diff_versions.py、tests/test_changelog_files.py),即可完整理解 WinPython 各版本变更文档的生成原理,并在本地用 wppm -diff 对任意两个版本/变体做同样的对比分析。