release-2.5.2.rst
Overview
This file is the release notes document for **pytest version 2.5.2**, a popular Python testing framework. It provides a concise summary of the bug fixes, improvements, and contributor acknowledgments associated with this patch release.
pytest is widely used for writing and running tests in Python projects and is recognized for its mature, stable testing infrastructure with extensive platform and interpreter support.
This document serves as a reference for developers and users to understand what issues were addressed in this release and how to upgrade to it.
Detailed Description
Release Purpose and Highlights
The release 2.5.2 primarily fixes several bugs discovered in previous versions.
It maintains existing functionality and compatibility.
Introduces a new contribution guide to assist new contributors.
Contains fixes for interoperability issues (e.g., with cx_freeze), documentation clarifications, and improved error handling.
Key Fixes and Changes
Issue / Feature | Description | Contributor(s) |
|---|---|---|
**Issue 409** | Improved compatibility with `cx_freeze` by avoiding imports from `collections.abc` in Python 2.7. | Wolfgang L. |
**Docs Update** | Replaced almost all references from “py.test” to “pytest” for consistency in documentation. | Jurko Gospodnetic |
**Issue 425** | Added clarification that `--markers` and `--fixtures` options in `py.test -h` respect the test path. | |
**Issue 413** | Fixed printing of exceptions with unicode attributes on Python 2 and pytest-xdist runs. | |
**Capture Integration** | Integrated and cleaned py.io capture from pylib 1.4.20.dev2 to improve output capturing. | |
**Issue 416** | Clarified documentation about [conftest.py](/projects/286/67243) loading semantics. | |
**Issue 429** | Improved assertion handling when comparing byte strings with non-ASCII characters. | Floris Bruynooghe |
**Private Capture Attributes** | Made `capfd`/`capsys` capture attributes private, as they were unused and not intended for exposure. |
How to Upgrade
Users can upgrade to pytest 2.5.2 seamlessly using pip:
pip install -U pytest
Contributors
The release acknowledges contributions from a wide range of community members:
Anatoly Bubenkov
Ronny Pfannschmidt
Floris Bruynooghe
Bruno Oliveira
Andreas Pelme
Jurko Gospodnetić
Piotr Banaszkiewicz
Simon Liedtke
lakka
Lukasz Balcerzak
Philippe Muller
Daniel Hahler
Implementation Details and Algorithms
Since this is a release notes file, it does not contain executable code, classes, or functions. Instead, it documents changes to the pytest codebase, including bug fixes and documentation improvements.
However, some implementation notes implied by the fixes include:
Interoperability Fix (Issue 409): Avoiding imports from
collections.abcin Python 2.7 environments to prevent conflicts withcx_freezepackaging tools. This likely involved conditional imports or version checks within the pytest codebase.Unicode Exception Printing (Issue 413): Modifications to exception formatting logic to correctly display Unicode attributes on Python 2, which historically has had limited Unicode support.
Capture Integration: The integration of
py.iocapture utilities from an external pylib version suggests improvements in pytest’s output capturing mechanism, enhancing the way standard output and error streams are handled during tests.
Interaction with Other System Components
pytest Core: This release note documents changes that affect core pytest functionalities such as test discovery, output capturing, and command-line interface behavior.
pytest Plugins: Fixes related to unicode exception handling and capture mechanisms improve compatibility with plugins like
pytest-xdist(parallel test execution).Packaging Tools: The fix for cx_freeze compatibility indicates interaction with Python packaging and freezing tools.
Documentation: The shift from “py.test” to “pytest” standardizes references across documentation and user interfaces, improving clarity.
Usage Examples
This file itself is not executable code, but the upgrade instructions and command-line options mentioned can be exemplified as follows:
Upgrading pytest:
pip install -U pytest
Viewing help with updated markers and fixtures info:
py.test -h
This will now clearly state that `--markers` and `--fixtures` options work relative to the specified test path or current directory.
Visual Diagram
The following Mermaid class diagram illustrates the conceptual structure of this file as a release notes document, focusing on the main sections and their relationships.
classDiagram
class ReleaseNotes {
+Overview()
+KeyFixesAndChanges()
+UpgradeInstructions()
+ContributorAcknowledgments()
+ImplementationDetails()
+SystemInteractions()
+UsageExamples()
}
ReleaseNotes : +release_version: string
ReleaseNotes : +release_date: string
ReleaseNotes : +contributors: list
ReleaseNotes : +issues_fixed: list
ReleaseNotes represents the document as a whole.
Its methods correspond to the main sections in the file.
Attributes capture metadata such as version and contributors.
Summary
This [release-2.5.2.rst](/projects/286/66986) file is essential for users and developers tracking the evolution of pytest. It succinctly communicates the scope of fixes and improvements in version 2.5.2, helping users decide when and how to upgrade. While it does not contain functional code itself, it is a critical piece of project documentation that supports effective maintenance and community collaboration.