Skip to content

Conversation

@faratech
Copy link

Problem

pdbparse failed to install on Python 3.13 due to a version constraint issue:

error: subprocess-exited-with-error
ModuleNotFoundError: No module named 'imp'

The imp module was removed in Python 3.12+, and the constraint construct<2.10 prevented installation of newer construct versions that handle this properly.

Solution

  • Removed upper bound constraint on construct dependency (construct<2.10construct>=2.9)
  • Added explicit Python version classifiers including 3.13
  • Added python_requires for better dependency resolution

Testing

  • ✅ Successfully installs on Python 3.13
  • ✅ All functionality working (parsing, symbol extraction, etc.)
  • ✅ Compatible with construct 2.10.70
  • ✅ No breaking changes for older Python versions

Files Changed

  • setup.py: Updated dependency constraints and Python version classifiers
  • .gitignore: Added build artifacts to ignore list

Verification

import pdbparse
pdb = pdbparse.parse('example.pdb', fast_load=True)
print(f"Success: {len(pdb.streams)} streams parsed")

This fix enables pdbparse to work with modern Python versions while maintaining backward compatibility.

faratech added 2 commits July 13, 2025 22:33
- Remove upper bound constraint on construct dependency
- The constraint 'construct<2.10' was preventing installation on Python 3.13
  due to newer construct versions having imp module compatibility issues
- Add explicit Python version classifiers including 3.13
- Add python_requires constraint for better dependency resolution
- Tested successfully on Python 3.13 with construct 2.10.70

Fixes installation error:
'ModuleNotFoundError: No module named imp'

The imp module was removed in Python 3.12+, and newer construct versions
handle this properly, so removing the upper bound allows compatible versions
to be installed automatically.
- Add *.egg-info/ directories
- Add *.so shared libraries
- Add build/ and dist/ directories
@vitalych
Copy link

vitalych commented Oct 2, 2025

Works for s2e as well, would be great to merge.

@vineelkovvuri
Copy link

@moyix Gentle ping can this be merged!

@v-p-b
Copy link

v-p-b commented Jan 2, 2026

ICYMI I created this fork for one of my projects to depend on: https://github.com/v-p-b/pdbparse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants