release-2.0.3.rst

Overview

This file is a release note document for **pytest version 2.0.3**, a maintenance and bug fix release of the popular Python testing framework *pytest*. It summarizes the improvements and bug fixes made since the previous version (2.0.2). The content is primarily targeted at users and developers of pytest to inform them about changes, upgrade instructions, and resolved issues.

pytest is a mature testing tool supporting multiple Python interpreters including CPython 2.4 through 3.2, Jython, and PyPy. The document highlights key fixes related to tracebacks, XML reporting, class collection, plugin dependencies, and performance optimizations.

Purpose and Functionality

The purpose of this file is to:

This kind of file is typically included in the distribution to keep users informed about changes and to facilitate smooth upgrades.

Detailed Content Breakdown

Release Announcement

Installation Instructions

Related Plugin Release

Change Log (Differences between 2.0.2 and 2.0.3)

  1. Fix for issue38: Improved tracebacks on hook calls, especially early configure/sessionstart hooks.

  2. JUnit XML Fix: Ensured skip reason/meta information is included in junitxml reports.

  3. Fix for issue34: Prevented collection failures with test classes prefixed with "test" deriving from object.

  4. Plugin Dependency Optimization: Avoid requiring zlib or other libraries for the genscript plugin unless --genscript is used.

  5. Performance Improvement: Speeded up skip operations by avoiding full traceback generation.

  6. Fix for issue37: Prevented invalid characters in junitxml output.

Important Implementation Details

Interactions with Other System Components

Usage Example

To upgrade pytest to version 2.0.3, run:

pip install -U pytest

After upgrading, users should expect improved tracebacks, better XML output, and potentially faster test skipping behavior.

Visual Diagram

Since this file is a **release note document** and does not contain code classes or functions, a flowchart showing the main sections and their relationships is appropriate.

flowchart TD
    A[pytest 2.0.3 Release Notes]
    A --> B[Introduction & Compatibility]
    A --> C[Installation Instructions]
    A --> D[Related Plugin Release]
    A --> E[Change Log]
    E --> E1[Fix tracebacks on hooks]
    E --> E2[Include skip reason in junitxml]
    E --> E3[Fix test class collection issue]
    E --> E4[Optimize genscript plugin dependencies]
    E --> E5[Speed up skips]
    E --> E6[Fix invalid junitxml characters]
    A --> F[References to Documentation]

Summary

This file is a concise, user-facing document announcing the pytest 2.0.3 release. It provides essential upgrade instructions, highlights important bug fixes and performance improvements, and guides users toward additional documentation resources. It plays a key role in communicating changes to the pytest user community, facilitating smooth transitions between versions, and ensuring awareness of improvements in testing workflows.