WinPython-64bit 3.8.7.0 发行版包清单深度解析:从 changelog 到包索引的自动生成机制
WinPython-64bit 3.8.7.0 发行版包清单深度解析:从 changelog 到包索引的自动生成机制
导读
本文以仓库 changelogs/WinPython-64bit-3.8.7.0.md 为主体,完整解读 WinPython 64 位 3.8.7.0 发行版的工具与 Python 包构成,并结合其配套文档 WinPython-64bit-3.8.7.0_History.md 梳理自 3.8.6.0 以来的新增、升级与移除明细。同时,本文深入 wppm/wppm.py、wppm/diff.py 与 winpython/build_winpython.py 源码,揭示这份清单并非手工维护,而是由构建流程自动生成。读完你将掌握:如何阅读一份 WinPython changelog、3.8.7.0 发行版的完整软件构成,以及如何用 wppm -diff 自行对比任意两个发行版包索引。
一、这是一份什么文档:WinPython 发行版的"逐包清单"
WinPython 是一个面向 Windows 平台的免费 Python 发行版,以"开箱即用、随解压随运行"的便携式形态为特色,内置了大量面向科学计算场景的预编译包(参见 README.rst)。每个发行版发布时,都会在 changelogs/ 目录下留下两类 Markdown 文件:
- 包索引文档(如
WinPython-64bit-3.8.7.0.md):列出该版本实际包含的全部工具与 Python 包,相当于发行版的"货架清单"; - 历史变更文档(如
WinPython-64bit-3.8.7.0_History.md):记录该版本相对上一个版本新增、升级、移除了哪些包。
3.8.7.0 的包索引文档结构非常清晰,正文分为两个一级小节:
### Tools:随发行版附带的非 Python 桌面工具;### Python packages:通过 pip 安装的 Python 包。
每个小节内都是一张三列表格,表头固定为:
Name | Version | Description
-----|---------|------------
这种格式并非手写约定,而是由 WPPM(WinPython Package Manager)在构建时自动输出的。在 wppm/wppm.py 中,Distribution.render_markdown_for_list 会按名称、URL、版本、摘要四元组逐行渲染出这张表,再拼装成完整文档;generate_package_index_markdown(wppm/wppm.py)则负责生成文档标题(## WinPython 3.8.7.0)与"以下包已包含在 WinPython-64bit v3.8.7.0 中"的引导句。也就是说,你看到的每一行表格,都对应着发行版里一个真实安装的软件实体。
二、Tools 工具集:与 Python 一同打包的桌面工具
3.8.7.0 发行版附带了三个非 Python 工具:
| Name | Version | Description |
|---|---|---|
| Nodejs | v14.15.0 | a JavaScript runtime built on Chrome's V8 JavaScript engine |
| npmjs | 6.14.8 | a package manager for JavaScript |
| Pandoc | 2.3 | a universal document converter |
这三个工具的选择与 WinPython 的定位高度契合:Node.js/npm 支撑 JupyterLab 等前端生态与前端工程化,Pandoc 则服务于文档转换(配合 pypandoc、nbconvert 可把 notebook 转成多种格式)。
从源码看,这一节并非手工填写,而是由 wppm/utils.py 的 get_installed_tools 对发行版根目录做存在性探测生成的:
Python一行始终存在,版本号取自python.exe的 Windows FileVersion 资源;- 若
root / "n" / "node.exe"存在,则输出 Nodejs 行(版本同样来自 FileVersion); - 若
root / "t" / "pandoc.exe"存在,则调用pandoc -v解析版本输出 Pandoc 行; - 若
root / "t" / "VSCode" / "Code.exe"存在,还会输出 VSCode 行(3.8.7.0 未打包 VSCode,故文档中不出现)。
注意其中 n、t 这类单字母目录:这是 WinPython 便携式设计的一部分——工具目录用短名存放,避免长路径问题,同时让探测逻辑可以稳定地按固定相对位置查找。
三、Python 包清单:3.8.7.0 的科学计算生态快照
本版本共打包约 480 个 Python 包,构成一个覆盖科学计算、机器学习、可视化、Web、GIS、GUI、工程工具链的完整生态。以下为该版本完整包清单(省略各包指向 PyPI 的外部链接,名称、版本、描述均忠实于原文档):
| Name | Version | Description |
|---|---|---|
| Python | 3.8.7 | Python programming language with standard library |
| adodbapi | 2.6.1.3 | A pure Python package implementing PEP 249 DB-API using Microsoft ADO. |
| affine | 2.3.0 | Matrices describing affine transformation of the plane. |
| aiofiles | 0.6.0 | File support for asyncio. |
| aiohttp | 3.7.3 | Async http client/server framework (asyncio) |
| aiosqlite | 0.16.0 | asyncio bridge to the standard sqlite3 module |
| alabaster | 0.7.12 | A configurable sidebar-enabled Sphinx theme |
| altair | 4.1.0 | Altair: A declarative statistical visualization library for Python. |
| altair_data_server | 0.4.1 | A background data server for Altair charts. |
| altair_transform | 0.2.0 | A python engine for evaluating Altair transforms. |
| altair_widgets | 0.2.2 | Altair Widgets: An interactive visualization for statistical data for Python. |
| altgraph | 0.17 | Python graph (network) package |
| amply | 0.1.4 | Amply allows you to load and manipulate AMPL/GLPK data as Python data structures |
| aniso8601 | 8.0.0 | A library for parsing ISO 8601 strings. |
| ansiwrap | 0.8.4 | textwrap, but savvy to ANSI colors and styles |
| anyio | 2.0.2 | High level compatibility layer for multiple asynchronous event loop implementations |
| appdirs | 1.4.4 | A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir". |
| argon2_cffi | 20.1.0 | The secure Argon2 password hashing algorithm. |
| asciitree | 0.3.3 | Draws ASCII trees. |
| asgi_csrf | 0.6.1 | ASGI middleware for protecting against CSRF attacks |
| asgiref | 3.3.1 | ASGI specs, helper code, and adapters |
| asteval | 0.9.21 | Safe, minimalistic evaluator of python expression using ast module |
| astroid | 2.4.2 | An abstract syntax tree for Python with inference support. |
| astroml | 0.4.1 | tools for machine learning and data mining in Astronomy |
| astropy | 4.1 | Community-developed python astronomy tools |
| async_generator | 1.10 | Async generators and context managers for Python 3.5+ |
| async_timeout | 3.0.1 | Timeout context manager for asyncio programs |
| atomicwrites | 1.4.0 | Atomic file writes. |
| attrs | 20.3.0 | Classes Without Boilerplate |
| autopep8 | 1.5.3 | A tool that automatically formats Python code to conform to the PEP 8 style guide |
| babel | 2.9.0 | Internationalization utilities |
| backcall | 0.2.0 | Specifications for callback functions passed in to an API |
| backports_abc | 0.5 | A backport of recent additions to the 'collections.abc' module. |
| baresql | 0.7.6 | playing SQL directly on Python datas |
| bcrypt | 3.1.7 | Modern password hashing for your software and your servers |
| beautifulsoup4 | 4.9.3 | Screen-scraping library |
| black | 20.8b1 | The uncompromising code formatter. |
| bleach | 3.2.1 | An easy safelist-based HTML-sanitizing tool. |
| blinker | 1.4 | Fast, simple object-to-object and broadcast signaling |
| blosc | 1.9.2 | Blosc data compressor |
| bloscpack | 0.16.0 | Command line interface to and serialization format for Blosc |
| bokeh | 2.2.3 | Interactive plots and applications in the browser from Python |
| botorch | 0.3.2 | Bayesian Optimization in PyTorch |
| bottleneck | 1.3.2 | Fast NumPy array functions written in C |
| bqplot | 0.12.19 | Interactive plotting for the Jupyter notebook, using d3.js and ipywidgets. |
| branca | 0.4.1 | Generate complex HTML+JS pages with Python |
| brewer2mpl | 1.4.1 | Connect colorbrewer2.org color maps to Python and matplotlib |
| brotli | 1.0.9 | Python bindings for the Brotli compression library |
| cachelib | 0.1.1 | A collection of cache libraries in the same API interface. |
| cartopy | 0.18.0 | A cartographic python library with Matplotlib support for visualisation |
| certifi | 2020.12.5 | Python package for providing Mozilla's CA Bundle. |
| cffi | 1.14.4 | Foreign Function Interface for Python calling C code. |
| cftime | 1.3.0 | Time-handling functionality from netcdf4-python |
| chardet | 3.0.4 | Universal encoding detector for Python 2 and 3 |
| click | 7.1.2 | Composable command line interface toolkit |
| click_default_group | 1.2.2 | Extends click.Group to invoke a command without explicit subcommand name |
| click_plugins | 1.1.1 | An extension module for click to enable registering CLI commands via setuptools entry-points. |
| cligj | 0.7.1 | Click params for commmand line interfaces to GeoJSON |
| cloudpickle | 1.6.0 | Extended pickling support for Python objects |
| clrmagic | 0.0.1a2 | IPython cell magic to use .NET languages |
| colorama | 0.4.4 | Cross-platform colored terminal text. |
| colorcet | 2.0.2 | Collection of perceptually uniform colormaps |
| coverage | 5.3.1 | Code coverage measurement for Python |
| cryptography | 3.3.1 | cryptography is a package which provides cryptographic recipes and primitives to Python developers. |
| cvxopt | 1.2.5 | Convex optimization package |
| cvxpy | 1.1.7 | A domain-specific language for modeling convex optimization problems in Python. |
| cx_freeze | 6.4.2 | create standalone executables from Python scripts |
| cycler | 0.10.0 | Composable style cycles |
| cython | 0.29.21 | The Cython compiler for writing C extensions for the Python language. |
| cytoolz | 0.11.0 | Cython implementation of Toolz: High performance functional utilities |
| dask | 2020.12.0 | Parallel PyData with Task Scheduling |
| dask_glm | 0.2.0 | Generalized Linear Models with Dask |
| dask_labextension | 4.0.1 | A Jupyter Notebook server extension manages Dask clusters. |
| dask_ml | 1.7.0 | A library for distributed and parallel machine learning |
| dask_searchcv | 0.2.0 | Tools for doing hyperparameter search with Scikit-Learn and Dask |
| databases | 0.4.1 | Async database support for Python. |
| datasette | 0.53 | A tool for exploring and publishing data |
| datashader | 0.11.1 | Data visualization toolchain based on aggregating into a grid |
| datashape | 0.5.2 | A data description language. |
| db.py | 0.5.4b1 | a db package that doesn't suck |
| decorator | 4.4.2 | Decorators for Humans |
| defusedxml | 0.6.0 | XML bomb protection for Python stdlib modules |
| deprecated | 1.2.10 | Python @deprecated decorator to deprecate old python classes, functions or methods. |
| descartes | 1.1.0 | Use geometric objects as matplotlib paths and patches |
| diff_match_patch | 20200713 | Repackaging of Google's Diff Match and Patch libraries. Offers robust algorithms to perform the operations required for synchronizing plain text. |
| distlib | 0.3.1 | Distribution utilities |
| distributed | 2020.12.0 | Distributed scheduler for Dask |
| docopt | 0.6.2 | Pythonic argument parser, that will make you smile |
| docrepr | 0.1.1 | docrepr renders Python docstrings in HTML |
| docutils | 0.16 | Docutils -- Python Documentation Utilities |
| ecos | 2.0.7.post1 | This is the Python package for ECOS: Embedded Cone Solver. See Github page for more information. |
| emcee | 3.0.2 | The Python ensemble sampling toolkit for MCMC |
| entrypoints | 0.3 | Discover and load entry points from installed packages. |
| fast_histogram | 0.9 | Fast simple 1D and 2D histograms |
| fastapi | 0.63.0 | FastAPI framework, high performance, easy to learn, fast to code, ready for production |
| fasteners | 0.16 | A python package that provides useful locks. |
| fastparquet | 0.4.1 | Python support for Parquet file format |
| feather_format | 0.4.1 | Simple wrapper library to the Apache Arrow-based Feather File Format |
| filelock | 3.0.12 | A platform independent file lock. |
| fiona | 1.8.18 | Fiona reads and writes spatial data files |
| flake8 | 3.8.4 | the modular source code checker: pep8, pyflakes and co |
| flask | 1.1.2 | A simple framework for building complex web applications. |
| flask_accepts | 0.17.4 | Easy, opinionated Flask input/output handling with Flask-restx and Marshmallow |
| flask_mail | 0.9.1 | Flask extension for sending email |
| flask_restx | 0.2.0 | Fully featured framework for fast, easy and documented API development with Flask |
| flask_session | 0.3.2 | Adds server-side session support to your Flask application |
| flask_sqlalchemy | 2.4.4 | Adds SQLAlchemy support to your Flask application. |
| flaskerize | 0.14.0 | Python CLI build/dev tool for templated code generation and project modification. Think Angular schematics for Python. |
| folium | 0.11.0 | Make beautiful maps with Leaflet.js & Python |
| formlayout | 2.0.0a0 | The most easy way to create Qt form dialogs and widgets with Python |
| fs | 2.4.11 | Python's filesystem abstraction layer |
| fsspec | 0.8.5 | File-system specification |
| future | 0.18.2 | Clean single-source support for Python 3 and 2 |
| fuzzywuzzy | 0.18.0 | Fuzzy string matching in python |
| gdal | 3.1.4 | GDAL: Geospatial Data Abstraction Library |
| geographiclib | 1.50 | The geodesic routines from GeographicLib |
| geopandas | 0.8.1 | Geographic pandas extensions |
| geopy | 2.0.0 | Python Geocoding Toolbox |
| geoviews | 1.8.1 | GeoViews is a Python library that makes it easy to explore and visualize geographical, meteorological, and oceanographic datasets, such as those used in weather, climate, and remote sensing research. |
| gmpy2 | 2.0.8 | GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x |
| gpytorch | 1.2.1 | An implementation of Gaussian Processes in Pytorch |
| greenlet | 0.4.17 | Lightweight in-process concurrent programming |
| guidata | 1.7.9 | Automatic graphical user interfaces generation for easy dataset editing and display |
| guiqwt | 3.0.5 | guiqwt is a set of tools for curve and image plotting (extension to PythonQwt) |
| h11 | 0.11.0 | A pure-Python, bring-your-own-I/O implementation of HTTP/1.1 |
| h2 | 4.0.0 | HTTP/2 State-Machine based protocol implementation |
| h5py | 2.10.0 | Read and write HDF5 files from Python |
| heapdict | 1.0.1 | a heap with decrease-key and increase-key operations |
| helpdev | 0.7.1 | HelpDev - Extracts information about the Python environment easily. |
| holoviews | 1.14.0 | Stop plotting your data - annotate your data and let it visualize itself. |
| hpack | 4.0.0 | Pure-Python HPACK header compression |
| html5lib | 1.1 | HTML parser based on the WHATWG HTML specification |
| httpcore | 0.12.2 | A minimal low-level HTTP client. |
| httpie | 2.3.0 | HTTPie - a CLI, cURL-like tool for humans. |
| httpx | 0.16.1 | The next generation HTTP client. |
| hupper | 1.10.2 | Integrated process monitor for developing and reloading daemons. |
| husl | 4.0.3 | Human-friendly HSL |
| hvplot | 0.7.0 | A high-level plotting API for the PyData ecosystem built on HoloViews. |
| hypercorn | 0.11.1 | A ASGI Server based on Hyper libraries and inspired by Gunicorn. |
| hyperframe | 6.0.0 | HTTP/2 framing layer for Python |
| hypothesis | 5.43.3 | A library for property-based testing |
| ibis_framework | 1.4.0 | Productivity-centric Python Big Data Framework |
| idlex | 1.18 | IDLE Extensions for Python |
| idna | 2.10 | Internationalized Domain Names in Applications (IDNA) |
| imageio | 2.9.0 | Library for reading and writing a wide range of image, video, scientific, and volumetric data formats. |
| imageio_ffmpeg | 0.4.2 | FFMPEG wrapper for Python |
| imagesize | 1.2.0 | Getting image size from png/jpeg/jpeg2000/gif file |
| imbalanced_learn | 0.7.0 | Toolbox for imbalanced dataset in machine learning. |
| importlib_metadata | 3.3.0 | Read metadata from Python packages |
| iniconfig | 1.1.1 | iniconfig: brain-dead simple config-ini parsing |
| intake | 0.6.0 | Data load and catalog system |
| intervaltree | 3.0.2 | Editable interval tree data structure for Python 2 and 3 |
| ipykernel | 5.4.2 | IPython Kernel for Jupyter |
| ipyleaflet | 0.13.3 | A Jupyter widget for dynamic Leaflet maps |
| ipympl | 0.5.8 | Matplotlib Jupyter Extension |
| ipython | 7.19.0 | IPython: Productive Interactive Computing |
| ipython_genutils | 0.2.0 | Vestigial utilities from IPython |
| ipython_sql | 0.4.1b1 | RDBMS access via IPython |
| ipywidgets | 7.5.1 | IPython HTML widgets for Jupyter |
| isort | 5.6.4 | A Python utility / library to sort Python imports. |
| itsdangerous | 1.1.0 | Various helpers to pass data to untrusted environments and back. |
| janus | 0.6.1 | Mixed sync-async queue to interoperate between asyncio tasks and classic threads |
| jedi | 0.17.2 | An autocompletion tool for Python that can be used for text editors. |
| jinja2 | 2.11.2 | A small but fast and easy to use stand-alone template engine written in pure python. |
| joblib | 1.0.0 | Lightweight pipelining: using Python functions as pipeline jobs. |
| json5 | 0.9.5 | A Python implementation of the JSON5 data format. |
| jsonschema | 3.2.0 | An implementation of JSON Schema validation for Python |
| julia | 0.5.6 | Julia/Python bridge with IPython support. |
| jupyter | 1.0.0 | Jupyter metapackage. Install all the Jupyter components in one go. |
| jupyter_bokeh | 2.0.4 | A Jupyter extension for rendering Bokeh content. |
| jupyter_client | 6.1.7 | Jupyter protocol implementation and client libraries |
| jupyter_console | 6.2.0 | Jupyter terminal console |
| jupyter_core | 4.7.0 | Jupyter core package. A base package on which Jupyter projects rely. |
| jupyter_server | 1.1.2 | The Jupyter Server |
| jupyter_server_proxy | 1.5.2 | Jupyter server extension to supervise and proxy web services |
| jupyter_sphinx | 0.3.2 | Jupyter Sphinx Extensions |
| jupyterlab | 2.2.9 | The JupyterLab notebook server extension. |
| jupyterlab_launcher | 0.13.1 | Jupyter Launcher |
| jupyterlab_pygments | 0.1.2 | Pygments theme |
| jupyterlab_server | 1.2.0 | JupyterLab Server |
| keyring | 21.7.0 | Store and access your passwords safely. |
| kiwisolver | 1.3.1 | A fast implementation of the Cassowary constraint solver |
| lazy_object_proxy | 1.4.3 | A fast and thorough lazy object proxy. |
| llvmlite | 0.35.0 | lightweight wrapper around basic LLVM functionality |
| lmfit | 1.0.1 | Least-Squares Minimization with Bounds and Constraints |
| locket | 0.2.0 | File-based locks for Python for Linux and Windows |
| loky | 2.9.0 | A robust implementation of concurrent.futures.ProcessPoolExecutor |
| lxml | 4.6.2 | Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API. |
| lz4 | 3.1.1 | LZ4 Bindings for Python |
| markdown | 3.3.2 | Python implementation of Markdown. |
| markupsafe | 1.1.1 | Safely add untrusted strings to HTML/XML markup. |
| marshmallow | 3.9.1 | A lightweight library for converting complex datatypes to and from native Python datatypes. |
| matplotlib | 3.3.3 | Python plotting package |
| mccabe | 0.6.1 | McCabe checker, plugin for flake8 |
| mercantile | 1.1.6 | Web mercator XYZ tile utilities |
| mergedeepp | 1.3.0 | A deep merge function. |
| metakernel | 0.27.5 | Metakernel for Jupyter |
| mistune | 0.8.4 | The fastest markdown parser in pure Python |
| mizani | 0.7.2 | Scales for Python |
| mkl_service | 2.3.0 | Python bindings to some MKL service functions |
| mlxtend | 0.18.0 | Machine Learning Library Extensions |
| moviepy | 1.0.3 | Video editing with Python |
| mpl_scatter_density | 0.7 | Matplotlib helpers to make density scatter plots |
| mpld3 | 0.5.2 | D3 Viewer for Matplotlib |
| mpldatacursor | 0.7.1 | Interactive data cursors for Matplotlib |
| mpmath | 1.1.0 | Python library for arbitrary-precision floating-point arithmetic |
| msgpack | 1.0.2 | MessagePack (de)serializer. |
| msvc_runtime | 14.28.29325 | Install the Microsoft Visual C++ runtime DLLs to the sys.prefix and Scripts directories |
| multidict | 5.1.0 | multidict implementation |
| multipledispatch | 0.6.0 | Multiple dispatch |
| munch | 2.5.0 | A dot-accessible dictionary (a la JavaScript objects) |
| mypy | 0.790 | Optional static typing for Python |
| mypy_extensions | 0.4.3 | Experimental type system extensions for programs checked with the mypy typechecker. |
| mysql_connector_python | 8.0.21 | MySQL driver written in Python |
| nbclient | 0.5.1 | A client library for executing notebooks. Formally nbconvert's ExecutePreprocessor. |
| nbconvert | 6.0.7 | Converting Jupyter Notebooks |
| nbconvert_reportlab | 0.2 | Convert notebooks to PDF using Reportlab |
| nbformat | 5.0.8 | The Jupyter Notebook format |
| nbval | 0.9.6 | A py.test plugin to validate Jupyter notebooks |
| nest_asyncio | 1.4.3 | Patch asyncio to allow nested event loops |
| netcdf4 | 1.5.5.1 | Provides an object-oriented python interface to the netCDF version 4 library. |
| networkx | 2.5 | Python package for creating and manipulating graphs and networks |
| nlopt | 2.7.0 | Library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization |
| nltk | 3.5 | Natural Language Toolkit |
| notebook | 6.1.5 | A web-based notebook environment for interactive computing |
| numba | 0.52.0 | compiling Python code using LLVM |
| numcodecs | 0.7.2 | A Python package providing buffer compression and transformation codecs for use in data storage and communication applications. |
| numdifftools | 0.9.39 | Solves automatic numerical differentiation problems in one or more variables. |
| numexpr | 2.7.2 | Fast numerical expression evaluator for NumPy |
| numpy | 1.19.4+mkl | NumPy is the fundamental package for array computing with Python. |
| numpydoc | 1.1.0 | Sphinx extension to support docstrings in Numpy format |
| oct2py | 5.2.0 | Python to GNU Octave bridge --> run m-files from python. |
| octave_kernel | 0.32.0 | A Jupyter kernel for Octave. |
| onnxruntime | 1.6.0 | ONNX Runtime Python bindings |
| osqp | 0.6.1 | OSQP: The Operator Splitting QP Solver |
| outcome | 1.1.0 | Capture the outcome of Python function calls. |
| packaging | 20.8 | Core utilities for Python packages |
| palettable | 3.3.0 | Color palettes for Python |
| pandas | 1.1.5 | Powerful data structures for data analysis, time series, and statistics |
| pandas_datareader | 0.9.0 | Data readers extracted from the pandas codebase,should be compatible with recent pandas versions |
| pandocfilters | 1.4.3 | Utilities for writing pandoc filters in python |
| panel | 0.10.2 | A high level app and dashboarding solution for Python. |
| papermill | 2.2.2 | Parametrize and run Jupyter and nteract Notebooks |
| param | 1.10.0 | Declarative Python programming using Parameters. |
| parambokeh | 0.2.3 | ParamBokeh provides an easy way to generate a UI for param based classes in the notebook or on bokeh server. |
| paramiko | 2.7.2 | SSH2 protocol library |
| paramnb | 2.0.4 | Generate ipywidgets from Parameterized objects in the notebook |
| parso | 0.7.0 | A Python Parser |
| partd | 1.1.0 | Appendable key-value storage |
| pathspec | 0.8.0 | Utility library for gitignore style pattern matching of file paths. |
| patsy | 0.5.1 | A Python package for describing statistical models and for building design matrices. |
| pdfrw | 0.4 | PDF file reader/writer library |
| pdvega | 0.2.1.dev0 | Pandas plotting interface to Vega and Vega-Lite |
| pefile | 2019.4.18 | Python PE parsing module |
| pep8 | 1.7.1 | Python style guide checker |
| pexpect | 4.8.0 | Pexpect allows easy control of interactive console applications. |
| pg8000 | 1.16.5 | PostgreSQL interface library |
| pickleshare | 0.7.5 | Tiny 'shelve'-like database with concurrency support |
| pillow | 8.0.1 | Python Imaging Library (Fork) |
| pint | 0.16.1 | Physical quantities module |
| pip | 20.3.3 | The PyPA recommended tool for installing Python packages. |
| pipdeptree | 1.0.0 | Command line utility to show dependency tree of packages |
| pkginfo | 1.6.1 | Query metadatdata from sdists / bdists / installed packages. |
| plotly | 4.14.1 | An open-source, interactive graphing library for Python |
| plotnine | 0.7.1 | A grammar of graphics for python |
| pluggy | 0.13.1 | plugin and hook calling mechanisms for python |
| ply | 3.11 | Python Lex & Yacc |
| portpicker | 1.3.1 | A library to choose unique available network ports. |
| ppci | 0.5.8 | A compiler for ARM, X86, MSP430, xtensa and more implemented in pure Python |
| prettytable | 2.0.0 | A simple Python library for easily displaying tabular data in a visually appealing ASCII table format. |
| priority | 1.3.0 | A pure-Python implementation of the HTTP/2 priority tree |
| proglog | 0.1.9 | Log and progress bar manager for console, notebooks, web... |
| prometheus_client | 0.9.0 | Python client for the Prometheus monitoring system. |
| prompt_toolkit | 3.0.8 | Library for building powerful interactive command lines in Python |
| protobuf | 4.0.0rc1 | Protocol Buffers |
| psutil | 5.8.0 | Cross-platform lib for process and system monitoring in Python. |
| ptpython | 3.0.7 | Python REPL build on top of prompt_toolkit |
| ptyprocess | 0.6.0 | Run a subprocess in a pseudo terminal |
| pulp | 2.3 | PuLP is an LP modeler written in python. PuLP can generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear problems. |
| py | 1.10.0 | library with cross-python path, ini-parsing, io, code, log facilities |
| pyaml | 20.4.0 | PyYAML-based module to produce pretty and readable YAML-serialized data |
| pyarrow | 2.0.0 | Python library for Apache Arrow |
| pyaudio | 0.2.11 | Bindings for PortAudio v19, the cross-platform audio input/output stream library. |
| pybars3 | 0.9.7 | Handlebars.js templating for Python 3 and 2 |
| pybind11 | 2.6.1 | Seamless operability between C++11 and Python |
| pycodestyle | 2.6.0 | Python style guide checker |
| pycosat | 0.6.3 | bindings to picosat (a SAT solver) |
| pycparser | 2.20 | C parser in Python |
| pyct | 0.4.6 | python package common tasks for users (e.g. copy examples, fetch data, ...) |
| pydantic | 1.7.3 | Data validation and settings management using python 3.6 type hinting |
| pydeck | 0.5.0 | Widget for deck.gl maps |
| pydocstyle | 5.1.1 | Python docstring style checker |
| pyepsg | 0.4.0 | Easy access to the EPSG database via http epsg.io/ |
| pyflakes | 2.2.0 | passive checker of Python programs |
| pyflux | 0.4.17 | PyFlux: A time-series analysis library for Python |
| pygame | 2.0.0 | Python Game Development |
| pygbm | 0.1.0 | Experimental, numba-based Gradient Boosting Machines |
| pygments | 2.7.3 | Pygments is a syntax highlighting package written in Python. |
| pyhdf | 0.10.2 | pyhdf: Python interface to the NCSA HDF4 library. |
| pyinstaller | 4.1 | PyInstaller bundles a Python application and all its dependencies into a single package. |
| pyinstaller_hooks_contrib | 2020.10 | Community maintained hooks for PyInstaller |
| pylint | 2.6.0 | python code static checker |
| pyls_black | 0.4.6 | Black plugin for the Python Language Server |
| pyls_spyder | 0.3.0 | Spyder extensions for the python-language-server |
| pymc | 2.3.8 | Markov Chain Monte Carlo sampling toolkit. |
| pymeta3 | 0.5.1 | Pattern-matching language based on OMeta for Python 3 and 2 |
| pymongo | 3.11.2 | Python driver for MongoDB |
| pynacl | 1.4.0 | Python binding to the Networking and Cryptography (NaCl) library |
| pyodbc | 4.0.30 | DB API Module for ODBC |
| pyopengl | 3.1.5 | Standard OpenGL bindings for Python |
| pypandoc | 1.5 | Thin wrapper for pandoc. |
| pyparsing | 2.4.7 | Python parsing module |
| pyproj | 3.0.0.post1 | Python interface to PROJ (cartographic projections and coordinate transformations library) |
| pyqt5 | 5.15.1 | Python bindings for the Qt cross platform application toolkit |
| pyqt5_sip | 12.8.1 | The sip module support for PyQt5 |
| pyqt5_tools | 5.15.1.1.7.5 | Tools to supplement the official PyQt5 wheels |
| pyqtgraph | 0.11.1 | Scientific Graphics and GUI Library for Python |
| pyqtwebengine | 5.15.1 | Python bindings for the Qt WebEngine framework |
| pyrsistent | 0.17.3 | Persistent/Functional/Immutable data structures |
| pyserial | 3.5 | Python Serial Port Extension |
| pyshp | 2.1.2 | Pure Python read/write support for ESRI Shapefile format |
| pysocks | 1.7.1 | A Python SOCKS client module. |
| pystache | 0.5.4 | Mustache for Python |
| pytest | 6.2.1 | pytest: simple powerful testing with Python |
| python_baseconv | 1.2.2 | Convert numbers from base 10 integers to base X strings and back again. |
| python_dateutil | 2.8.1 | Extensions to the standard Python datetime module |
| python_dotenv | 0.15.0 | Add .env support to your django/flask apps in development and deployments |
| python_hdf4 | 0.10.0+dummy | Python-HDF4: Python interface to the NCSA HDF4 library. |
| python_jsonrpc_server | 0.4.0 | JSON RPC 2.0 server library |
| python_language_server | 0.36.2 | Python Language Server for the Language Server Protocol |
| python_levenshtein | 0.12.0 | Python extension for computing string edit distances and similarities. |
| python_snappy | 0.5.4 | Python library for the snappy compression library from Google |
| pythonnet | 2.5.1 | .Net and Mono integration for Python |
| pythonqwt | 0.8.3 | Qt plotting widgets for Python |
| pytz | 2020.4 | World timezone definitions, modern and historical |
| pyviz_comms | 0.7.6 | Bidirectional communication for the PyViz ecosystem. |
| pywavelets | 1.1.1 | PyWavelets, wavelet transform module |
| pywin32 | 300 | Python for Window Extensions |
| pywin32_ctypes | 0.2.0 | A (partial) reimplementation of pywin32 that is pure python (uses ctypes/cffi) |
| pywinpty | 0.5.7 | Python bindings for the winpty library |
| pywinusb | 0.4.2 | A package that simplifies USB/HID communications on windows |
| pyyaml | 5.3.1 | YAML parser and emitter for Python |
| pyzmq | 20.0.0 | Python bindings for 0MQ |
| pyzo | 4.11.2 | the Python IDE for scientific computing |
| qdarkstyle | 2.8.1 | The most complete dark stylesheet for Python and Qt applications |
| qtawesome | 1.0.2 | FontAwesome icons in PyQt and PySide applications |
| qtconsole | 5.0.1 | Jupyter Qt console |
| qtpy | 1.9.0 | Provides an abstraction layer on top of the various Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets. |
| quantecon | 0.4.8 | QuantEcon is a package to support all forms of quantitative economic modelling. |
| quart | 0.14.1 | A Python ASGI web microframework with the same API as Flask |
| rasterio | 1.1.8 | Fast and direct raster I/O for use with Numpy and SciPy |
| readme_renderer | 28.0 | readme_renderer is a library for rendering "readme" descriptions for Warehouse |
| redis | 3.5.3 | Python client for Redis key-value store |
| regex | 2020.11.13 | Alternative regular expression module, to replace re. |
| reportlab | 3.5.56 | The Reportlab Toolkit |
| requests | 2.25.1 | Python HTTP for Humans. |
| requests_toolbelt | 0.9.1 | A utility belt for advanced users of python-requests |
| retrying | 1.3.3 | Retrying |
| rfc3986 | 1.4.0 | Validating URI References per RFC 3986 |
| rise | 5.7.1 | Reveal.js - Jupyter/IPython Slideshow Extension |
| rope | 0.18.0 | a python refactoring library... |
| rpy2 | 3.4.0.dev0 | Python interface to the R language (embedded R) |
| rtree | 0.9.5 | R-Tree spatial index for Python GIS |
| ruamel.yaml | 0.16.12 | a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order |
| ruamel.yaml.clib | 0.2.2 | C version of reader, parser and emitter for ruamel.yaml derived from libyaml |
| rx | 3.1.1 | Reactive Extensions (Rx) for Python |
| scikit_fuzzy | 0.4.1 | Fuzzy logic toolkit for SciPy |
| scikit_image | 0.18.1 | Image processing routines for SciPy |
| scikit_learn | 0.24.0 | A set of python modules for machine learning and data mining |
| scikit_optimize | 0.8.1 | Sequential model-based optimization toolbox. |
| scilab2py | 0.6.2 | Python to Scilab bridge |
| scipy | 1.5.4 | SciPy: Scientific Library for Python |
| scramp | 1.2.0 | An implementation of the SCRAM protocol. |
| scs | 2.1.2 | scs: splitting conic solver |
| seaborn | 0.11.1 | seaborn: statistical data visualization |
| send2trash | 1.5.0 | Send file to trash natively under Mac OS X, Windows and Linux. |
| setuptools | 51.1.0 | Easily download, build, install, upgrade, and uninstall Python packages |
| shap | 0.36.0 | A unified approach to explain the output of any machine learning model. |
| shapely | 1.7.1 | Geometric objects, predicates, and operations |
| simpervisor | 0.3 | Simple async process supervisor |
| simplegeneric | 0.8.1 | Simple generic functions (similar to Python's own len(), pickle.dump(), etc.) |
| simplejson | 3.17.2 | Simple, fast, extensible JSON encoder/decoder for Python |
| simpy | 4.0.1 | Event discrete, process based simulation for Python. |
| six | 1.15.0 | Python 2 and 3 compatibility utilities |
| sklearn_contrib_lightning | 0.6.0 | Large-scale sparse linear classification, regression and ranking in Python |
| slicer | 0.0.7 | A small package for big slicing. |
| snakeviz | 2.1.0 | A web-based viewer for Python profiler output |
| sniffio | 1.2.0 | Sniff out which async library your code is running under |
| snowballstemmer | 2.0.0 | This package provides 26 stemmers for 25 languages generated from Snowball algorithms. |
| snuggs | 1.4.7 | Snuggs are s-expressions for Numpy |
| sortedcontainers | 2.3.0 | Sorted Containers -- Sorted List, Sorted Dict, Sorted Set |
| sounddevice | 0.4.1 | Play and Record Sound with Python |
| soupsieve | 2.1 | A modern CSS selector implementation for Beautiful Soup. |
| sphinx | 3.3.1 | Tool for generating documentation which uses reStructuredText as its markup language |
| sphinx_rtd_theme | 0.5.0 | Read the Docs theme for Sphinx |
| sphinxcontrib_applehelp | 1.0.2 | sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books |
| sphinxcontrib_devhelp | 1.0.2 | sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document. |
| sphinxcontrib_htmlhelp | 1.0.3 | sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files |
| sphinxcontrib_jsmath | 1.0.1 | A sphinx extension which renders display math in HTML via JavaScript |
| sphinxcontrib_qthelp | 1.0.3 | sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document. |
| sphinxcontrib_serializinghtml | 1.1.4 | sphinxcontrib-serializinghtml is a sphinx extension which outputs "serialized" HTML files (json and pickle). |
| spyder | 4.2.1 | The Scientific Python Development Environment |
| spyder_kernels | 1.10.1 | Jupyter kernels for Spyder's console |
| sqlalchemy | 1.3.22 | Database Abstraction Library |
| sqlite_bro | 0.9.1 | a graphic SQLite Client in 1 Python file |
| sqlparse | 0.4.1 | Non-validating SQL parser |
| starlette | 0.13.6 | The little ASGI library that shines. |
| statsmodels | 0.12.1 | Statistical computations and models for Python |
| streamz | 0.5.6 | Streams |
| supersmoother | 0.4 | Python implementation of Friedman's Supersmoother |
| sympy | 1.7.1 | Computer algebra system (CAS) in Python |
| tables | 3.6.1 | Hierarchical datasets for Python |
| tblib | 1.7.0 | Traceback serialization library. |
| tenacity | 6.3.1 | Retry code until it succeeds |
| termcolor | 1.1.0 | ANSII Color formatting for output in terminal. |
| terminado | 0.9.1 | Terminals served to xterm.js using Tornado websockets |
| testpath | 0.4.4 | Test utilities for code working with files and commands |
| textdistance | 4.2.0 | Compute distance between the two texts. |
| textwrap3 | 0.9.2 | textwrap from Python 3.6 backport (plus a few tweaks) |
| threadpoolctl | 2.1.0 | threadpoolctl |
| three_merge | 0.1.1 | Simple library for merging two strings with respect to a base one |
| thrift | 0.13.0 | Python bindings for the Apache Thrift RPC system |
| tifffile | 2020.12.8 | Read and write TIFF(r) files |
| toml | 0.10.2 | Python Library for Tom's Obvious, Minimal Language |
| toolz | 0.11.1 | List processing tools and functional utilities |
| torch | 1.7.1+cpu | Tensors and Dynamic neural networks in Python with strong GPU acceleration |
| torchvision | 0.8.2+cpu | image and video datasets and models for torch deep learning |
| tornado | 6.1 | Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. |
| tqdm | 4.54.1 | Fast, Extensible Progress Meter |
| traitlets | 5.0.5 | Traitlets Python config system |
| traittypes | 0.2.1 | Scipy trait types |
| tranquilizer | 0.5.0+1.gff8dd5f | Put your functions to REST |
| trio | 0.17.0 | A friendly Python library for async concurrency and I/O |
| trio_asyncio | 0.11.0 | A re-implementation of the asyncio mainloop on top of Trio |
| twine | 3.2.0 | Collection of utilities for publishing packages on PyPI |
| 1.18.0 | An API and command-line toolset for Twitter (twitter.com) | |
| typed_ast | 1.4.1 | a fork of Python 2 and 3 ast modules with type comment support |
| typing_extensions | 3.7.4.3 | Backported and Experimental Type Hints for Python 3.5+ |
| tzlocal | 2.1 | tzinfo object for the local timezone |
| ujson | 4.0.1 | Ultra fast JSON encoder and decoder for Python |
| umap_learn | 0.4.6 | Uniform Manifold Approximation and Projection |
| uncertainties | 3.1.5 | Transparent calculations with uncertainties on the quantities involved (aka error propagation); fast calculation of derivatives |
| urllib3 | 1.26.2 | HTTP library with thread-safe connection pooling, file post, and more. |
| uvicorn | 0.13.2 | The lightning-fast ASGI server. |
| vega | 3.4.0 | A Jupyter widget for Vega 5 and Vega-Lite 4 |
| vega_datasets | 0.9.0 | A Python package for offline access to Vega datasets |
| virtualenv | 20.2.2 | Virtual Python Environment builder |
| vitables | 3.0.2 | A viewer for PyTables package |
| voila | 0.2.4 | Serving read-only live Jupyter notebooks |
| wasmer | 1.0.0b1 | Python extension to run WebAssembly binaries |
| watchdog | 1.0.2 | Filesystem events monitoring |
| wcwidth | 0.2.5 | Measures number of Terminal column cells of wide-character codes |
| webencodings | 0.5.1 | Character encoding aliases for legacy web content |
| werkzeug | 1.0.1 | The comprehensive WSGI web application library. |
| wheel | 0.36.2 | A built-package format for Python |
| widgetsnbextension | 3.5.1 | IPython HTML widgets for Jupyter |
| winpython | 3.0.202011219 | WinPython distribution tools, including WPPM |
| winrt | 1.0.20330.1 | Access Windows Runtime APIs from Python |
| wordcloud | 1.8.1 | A little word cloud generator |
| wrapt | 1.12.1 | Module for decorators, wrappers and monkey patching. |
| wsproto | 1.0.0 | WebSockets state-machine based protocol implementation |
| xarray | 0.16.2 | N-D labeled arrays and datasets in Python |
| xlrd | 2.0.1 | Library for developers to extract data from Microsoft Excel (tm) spreadsheet files |
| xlsxwriter | 1.3.7 | A Python module for creating Excel XLSX files. |
| xlwings | 0.21.4 | Make Excel fly: Interact with Excel from Python and vice versa. |
| yapf | 0.30.0 | A formatter for Python code. |
| yarl | 1.6.3 | Yet another URL library |
| zarr | 2.6.1 | An implementation of chunked, compressed, N-dimensional arrays for Python. |
| zict | 2.0.0 | Mutable mapping tools |
| zipp | 3.4.0 | Backport of pathlib-compatible object wrapper for zip files |
从清单看生态构成
把这张表按领域切分,可以清晰看出 3.8.7.0 的定位:
- 科学计算核心:
numpy 1.19.4+mkl(捆绑 Intel MKL 加速)、scipy 1.5.4、pandas 1.1.5、matplotlib 3.3.3,外加numexpr、bottleneck、numba+llvmlite等加速与 JIT 工具; - 机器学习与深度学习:
scikit_learn 0.24.0、torch 1.7.1+cpu、torchvision 0.8.2+cpu、onnxruntime 1.6.0、botorch、gpytorch、sklearn_contrib_lightning、shap、mlxtend、imbalanced_learn、umap_learn; - 大数据与存储格式:
dask+distributed、pyarrow 2.0.0、fastparquet、feather_format、h5py、tables、zarr、xarray、netcdf4、numcodecs; - 可视化:
seaborn、plotly、bokeh、altair、holoviews、hvplot、panel、geoviews、datashader、mpld3; - Jupyter 生态:
jupyterlab 2.2.9、notebook 6.1.5、ipywidgets、qtconsole、nbconvert、nbval、papermill、voila、rise、jupyter_server; - Web 与异步:
fastapi 0.63.0、flask、quart、uvicorn、hypercorn、aiohttp、httpx、starlette、pydantic; - 地理空间:
gdal 3.1.4、fiona、shapely、geopandas 0.8.1、rasterio、cartopy、pyproj、folium、ipyleaflet、pydeck; - GUI 与桌面 IDE:
pyqt5 5.15.1、pyqtgraph、qtawesome、spyder 4.2.1、pyzo、guiqwt、guidata、vitables; - 工程与质量工具链:
cython、pyinstaller 4.1、cx_freeze 6.4.2、pytest 6.2.1、hypothesis、coverage、mypy、black、flake8、pylint、pipdeptree、virtualenv、twine; - 数据库:
sqlalchemy、sqlite_bro、pymongo、mysql_connector_python、redis、pg8000、pyodbc、adodbapi、databases; - 优化与运筹:
cvxopt、cvxpy、nlopt、osqp、scs、ecos、pulp,以及统计建模的statsmodels、lmfit、pymc、emcee。
版本号后缀的语义
表中有几个值得注意的版本号变体,它们不是笔误,而是构建策略的直接体现:
numpy 1.19.4+mkl:+mkl表示该构建捆绑了 Intel MKL 数学核心库(列表中的mkl_service是配套的 MKL 服务绑定);torch 1.7.1+cpu/torchvision 0.8.2+cpu:明确标记为 CPU 版 PyTorch,便于与 GPU 版区分;python_hdf4 0.10.0+dummy、tranquilizer 0.5.0+1.gff8dd5f、pdvega 0.2.1.dev0、rpy2 3.4.0.dev0:+本地版本号与.dev0预发布标记,说明部分包来自直接源码构建或开发快照;protobuf 4.0.0rc1、db.py 0.5.4b1、wasmer 1.0.0b1:rc/b后缀表示候选版或测试版。
这些版本号统一遵循 PEP 440 语义,也正是下文 diff 工具能够自动排序与比较的前提。
四、配套 History 文档:3.8.7.0 相对 3.8.6.0 的变化
WinPython-64bit-3.8.7.0_History.md 记录了从 3.8.6.0 到 3.8.7.0 的全部包变动,分为 New / Upgraded / Removed 三组。
新增包(11 个)
anyio 2.0.2:面向多种异步事件循环的高层兼容层;coverage 5.3.1:Python 代码覆盖率测量;nbval 0.9.6:pytest 插件,用于校验 Jupyter notebook 输出;onnxruntime 1.6.0:ONNX Runtime 的 Python 绑定;pyinstaller_hooks_contrib 2020.10:PyInstaller 社区维护的 hooks 集合;pyls_black 0.4.6:为 Python Language Server 提供的 Black 格式化插件;pyls_spyder 0.3.0:Spyder 对 python-language-server 的扩展;pysocks 1.7.1:Python SOCKS 客户端模块;sklearn_contrib_lightning 0.6.0:大规模稀疏线性分类/回归/排序;textdistance 4.2.0:文本距离计算库;three_merge 0.1.1:基于公共基串合并两个字符串的库。
升级包(约 110 个,节选核心)
| Package | 旧版本 → 新版本 |
|---|---|
| Python | 3.8.6 → 3.8.7 |
| numpy | 1.19.2+mkl → 1.19.4+mkl |
| pandas | 1.1.3 → 1.1.5 |
| scipy | 1.5.3 → 1.5.4 |
| matplotlib | 3.3.2 → 3.3.3 |
| scikit_learn | 0.23.2 → 0.24.0 |
| scikit_image | 0.17.2 → 0.18.1 |
| torch | 1.6.0+cpu → 1.7.1+cpu |
| torchvision | 0.7.0+cpu → 0.8.2+cpu |
| numba | 0.51.2 → 0.52.0 |
| dask / distributed | 2.30.0 → 2020.12.0 |
| fastapi | 0.61.1 → 0.63.0 |
| jupyterlab | 2.2.9 保持不变(同版本) |
| notebook | 6.1.4 → 6.1.5 |
| spyder | 4.1.5 → 4.2.1 |
| pyinstaller | 3.6 → 4.1 |
| pytest | 6.1.1 → 6.2.1 |
| pip | 20.2.4 → 20.3.3 |
| setuptools | 50.3.2 → 51.1.0 |
| pywin32 | 228 → 300 |
| pyqt5 | 5.15.1 保持不变 |
| xarray | 0.16.1 → 0.16.2 |
| netcdf4 | 1.5.4 → 1.5.5.1 |
| gdal | 3.1.4 保持不变 |
| geopandas | 0.8.1 保持不变 |
| seaborn | 0.11.0 → 0.11.1 |
| statsmodels | 0.12.0 → 0.12.1 |
| sympy | 1.6.2 → 1.7.1 |
| requests | 2.24.0 → 2.25.1 |
| urllib3 | 1.25.11 → 1.26.2 |
| ipython | 7.18.1 → 7.19.0 |
| qtconsole | 4.7.7 → 5.0.1 |
| virtualenv | 20.1.0 → 20.2.2 |
| winpython(发行版工具) | 3.0.20201028 → 3.0.202011219 |
| Nodejs(工具) | v14.14.0 → v14.15.0 |
其余升级包(如 aiohttp 3.7.1→3.7.3、astropy 4.0.3→4.1、bokeh 2.2.3、plotly 4.12.0→4.14.1、pillow 8.0.1、cryptography 3.2→3.3.1、lxml 4.6.1→4.6.2、sphinx 3.2.1→3.3.1、tifffile、watchdog 0.10.3→1.0.2、wasmer 0.4.2b11→1.0.0b1 等)在 History 文档中均有完整的一对一记录,本文不再逐条罗列。
移除包(3 个)
comtypes 1.1.7:纯 Python COM 包;monotonic 1.5:为 Python 2 / <3.3 提供time.monotonic()实现(Python 3.8 标准库已原生支持,故被移除);pathtools 0.1.2:文件系统通用工具(watchdog 已自带依赖)。
从变更粒度可以看到,WinPython 的每次迭代都在同步跟进 PyPI 上游版本:Python 解释器、科学计算栈、前端框架与打包工具链几乎全线升级,同时清理掉已被标准库取代的遗留包。
五、源码级原理:changelog 是如何自动生成的
这两份文档都不是人工编写的,而是 WinPython 构建工具链(build_winpython.py + wppm 包)在构建发行版时的产出物。
5.1 构建流程中的"Step 7:generate changelog"
在 winpython/build_winpython.py 中,构建流程的最后阶段会依次执行两段逻辑:
- 生成包索引文档:调用
wppm.Distribution().generate_package_index_markdown(),把当前发行版中已安装的包渲染成 Markdown,写入WinPython{flavor}-{arch}bit-{版本}.md,并复制进仓库的changelogs/目录; - 生成历史变更文档:调用
wppm.diff.compare_package_indexes(版本, searchdir=changelogs_dir, flavor=..., architecture=...),自动找到上一个版本并输出差异,写入_History.md。
关键细节是 changelog_version = f"{winpyver2}{args.release_level}":release level(如 b1、rc1)必须拼进文件名,否则 beta 版的包清单会覆盖正式版的文件。
5.2 diff 引擎:按行解析、按字典比较
wppm/diff.py 是 History 文档的生成核心,其工作分为三层:
Package.from_text(wppm/diff.py):用两条正则匹配表格行,提取name / url / version / description,其中 SourceForge 时代格式name | version | description与 Google Code 时代格式均可识别;PackageIndex._parse_index(wppm/diff.py):按### Tools、### Python packages、### WheelHouse packages三个标题切分文档,跳过表头与空行,把每一行解析成Package对象存入字典;compare_packages(wppm/diff.py):对两份清单做键级比较——新增(新清单有、旧清单无)、升级(两边都有但版本号不同)、移除(旧清单有、新清单无)。比较前会把包名统一为"连字符转下划线 + 小写"(normalize),避免scikit_learn与scikit-learn这类命名差异造成误判。
5.3 上一版本是怎么找到的:PEP 440 文件名解析
find_previous_version(wppm/diff.py)决定 History 与哪个版本对比。它不读取文件内容,而是仅依据 changelogs/ 目录下的文件名:
changelog_versions用正则WinPython{flavor}-{arch}bit-(.+)\.(txt|md)$扫描目录,把版本字符串交给packaging.version.parse做 PEP 440 解析,从而天然支持b1、rc1、post1等 release level 的排序;_History.md伴随文件因解析不成合法版本而被自动忽略;- flavor(
dot、slim、dotf等)与 32/64 位架构严格隔离,互不干扰。
这套行为在 tests/test_diff_versions.py 中有完整测试锁定,例如:3.14.7.1b1 应排在 3.14.7.0 与 3.14.7.1 之间(旧版"仅数字加点"的正则曾把 beta 版本静默丢掉);dot 不会匹配 dotf;32 位与 64 位各自成线。
5.4 一点历史演变:History 文件的去留
值得注意的是,当前仓库的构建逻辑对 _History.md 的态度已发生演变:tests/test_changelog_files.py 明确指出"不再为每个发行版写入 _History.md 伴随文件"——因为 flavor 在不同周期来去不定、读者升级频率也远低于构建周期,紧邻版本间的 diff 对发布本身价值有限;需要的对比由读者用 wppm -diff 自行选取两个索引完成。3.8.7.0 时代的 _History.md 作为历史产物,仍完整保留在 changelogs/ 中,供查阅与对比。
六、实战:用 wppm -diff 自行对比任意两个包索引
如果想把任意两个 WinPython 发行版的包清单拿来对比(不限于相邻版本、甚至跨 flavor),可以直接使用 wppm 的 diff 子命令,它读取两个 .md 文件、与构建流程共用同一套比较引擎:
# 方式一:wppm 命令(推荐,自动处理 UTF-8 输出)
wppm -diff WinPython-64bit-3.8.7.0.md WinPython-64bit-3.8.6.0.md
# 方式二:直接以模块方式运行
python -m wppm.diff WinPython-64bit-3.8.7.0.md WinPython-64bit-3.8.6.0.md
输出会按 ### Tools、### Python packages、### WheelHouse packages 三个小节分别给出 New / Upgraded / Removed 三组明细(这正是 3.8.7.0_History.md 的产生过程)。支持三种比较模式:
| 模式 | 命令 | 说明 |
|---|---|---|
| 全量比较 | python -m wppm.diff a.md b.md |
比较两个索引的全部小节 |
| 指定小节 | ... --section python python |
只比较某两个小节(如 tools、python、wheelhouse) |
| 成对小节 | ... --pairs python python tools tools |
按给定小节对逐个比较 |
如果需要把对比结果落盘为文件,可沿用构建流程所用的接口(参考 wppm/diff.py 的 write_changelog):指定 --write-changelog <版本2> <版本1> [searchdir] [flavor] [architecture] [basedir],工具会从 changelogs/ 中读取对应索引、生成 History 文档,并可一并把同 minor 版本的全部 changelog 复制到指定目录。
两个实用注意事项(来自 wppm/diff.py 的实现):
- 升级行用
→箭头书写,而 Windows 控制台默认编码(cp1252)无法编码该字符,直接运行会在"对比两个发行版"时抛出编码异常;wppm 已通过sys.stdout.reconfigure(encoding="utf-8", errors="replace")规避,若自行调用模块请留意同样设置; - 文件名是版本的唯一来源,请保持
WinPython{flavor}-{arch}bit-{版本}.md的命名约定,否则版本解析与上一版本查找会失效。
七、小结
WinPython-64bit 3.8.7.0 的 changelog 文档,表面上是几百行软件清单,背后却是完整的一体化构建机制:Distribution.generate_package_index_markdown 负责"盘点",wppm.diff 负责"对比",build_winpython.py 的 Step 7 负责把它们固化为发布文档。理解这套机制后,你可以:
- 快速判断某个发行版是否包含你需要的包及其版本(直接检索
changelogs/下对应文件); - 通过 History 文档评估升级该版本可能带来的破坏性变更(新增/升级/移除一目了然);
- 用
wppm -diff自主对比任意两个发行版,在升级、选型或复现环境时做到心中有数。
仓库中 wppm/diff.py、wppm/wppm.py、wppm/utils.py 与 tests/ 下的测试用例,是继续深入这套 changelog 自动生成机制的完整阅读入口。