Skip to content

Conversation

@savagelysubtle
Copy link

Summary

This PR adds modern Python 3 packaging support using UV and begins the Python 3 migration journey for SENAITE LIMS.

What This PR Does

✅ Completed

  • pyproject.toml - Modern Python packaging with UV support
  • Pillow Windows fix - UV override to use binary wheels (fixes zlib build issues)
  • README updates - UV quick start installation instructions
  • Zope/WSGI configuration - etc/zope.conf and etc/wsgi.ini for UV-based setup
  • run_instance.py - Script to launch SENAITE with UV
  • Python 3 syntax fixes - Exception handling syntax (except X as e:)

⚡ What's Working

# These commands now work on Windows:
uv sync                    # ✅ Installs 252 packages
uv pip list | grep plone   # ✅ Plone 5.2.15 installed
uv pip list | grep pillow  # ✅ Pillow 12.1.0 (binary wheel)

⛔ Blocker: Archetypes → Dexterity Migration

The instance cannot start because senaite.core depends on Products.Archetypes, which is Python 2 only:

ModuleNotFoundError: No module named 'Products.Archetypes'

This requires the content type migration outlined in P8_UPGRADE_GUIDE.md.

Files Changed

File Purpose
pyproject.toml UV/Python 3.10+ packaging
README.md UV installation docs
etc/zope.conf Zope configuration
etc/wsgi.ini WSGI server config
run_instance.py Instance launcher

Help Wanted

  • Archetypes → Dexterity content type migration
  • Testing on Linux/macOS
  • Review of UV configuration approach

Related

  • See src/senaite.core/P8_UPGRADE_GUIDE.md for full Python 3 migration roadmap

…ure buildout for Python 3

- Add six library for Python 2/3 compatibility
- Update print statements to use print() function syntax
- Configure buildout.cfg for Python 3 compatibility
- Update P8_UPGRADE_GUIDE.md references
- Add PYTHONPATH to instance environment
- Add python-buildout section for Python 3
- Add pyproject.toml with Python 3.10+ support
- Configure UV dependency groups (replacing deprecated dev-dependencies)
- Add six library for Python 2/3 compatibility
- Simplify setup.py to defer to pyproject.toml
- Successfully sync 248+ packages with UV (except Pillow build issue)

Note: Pillow build issue persists due to missing zlib headers in build environment.
This demonstrates the pyproject.toml + UV approach works for modern Python 3 packaging.
- Add [tool.uv] section with override-dependencies
- Override Pillow>=10.0.0 to use binary wheels instead of source build
- Products.PortalTransforms pins old Pillow version requiring zlib headers
- This fix allows UV sync to complete successfully on Windows
- Update README.md with UV quick start instructions
- Add etc/zope.conf for Zope configuration
- Add etc/wsgi.ini for WSGI server configuration
- Add run_instance.py for launching SENAITE with UV

Note: SENAITE still requires Archetypes->Dexterity migration for full Python 3 support
- Add Python 3 classifiers
- Remove deprecated namespace_packages (handled by pyproject.toml)
- Clean up imports order
- Document all completed work and current status
- Detail the Archetypes blocker and migration path
- Provide technical summary for contributors
- Complete audit trail of Python 3 modernization effort
- Detailed technical assessment of Archetypes → Dexterity migration
- Scope analysis: 219 files affected, 100+ content types
- Implementation roadmap with phases and timelines
- Risk assessment and mitigation strategies
- Alternative approaches evaluation
- Resource requirements and success criteria
- Improve markdown formatting for better readability
- Add proper line breaks and table formatting
- Final review of documentation completeness
@savagelysubtle savagelysubtle marked this pull request as ready for review January 13, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant