Skip to content

Linux Compatibility issue with Python 3.13: SafeConfigParser removed #392

@martijnvangils

Description

@martijnvangils

Summary

Attempting to install pylatex==1.4.1 on Linux using Python 3.13 fails during the wheel build process due to the use of configparser.SafeConfigParser, which has been removed in Python 3.13.

Steps to Reproduce

  1. Use Python 3.13 (e.g., via pyenv or Docker)
  2. Run pip install pylatex==1.4.1 or include it in requirements.txt
  3. Observe the error during the build process

Error Output

AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

This occurs in versioneer.py, which is used during the build process.

Environment

  • Python version: 3.13.0 (pre-release or nightly)
  • pip version: 24.x
  • OS: [Your OS here, e.g., Ubuntu 22.04 / macOS 14 / Windows 11]

Suggested Fix

Replace configparser.SafeConfigParser() with configparser.ConfigParser() in versioneer.py, or update to a newer version of versioneer that supports Python 3.13.

Additional Notes

This issue is likely to affect more users as Python 3.13 becomes more widely adopted. A patch or release update would be appreciated.

Thanks for maintaining this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions