XLSForm / pyxform

A Python package to create XForms for ODK Collect.
BSD 2-Clause "Simplified" License
77 stars 134 forks source link

661: update supported python versions #706

Closed lindsay-stevens closed 4 weeks ago

lindsay-stevens commented 1 month ago

Closes #661 Closes #701

Why is this the best possible solution? Were any other approaches considered?

Considered including 3.8 (EOL 2024-10) and 3.9 (EOL 2025-10) but that would have meant testing on 5 different major Python versions or excluding newer versions, being limited to the oldest version's syntax, and increasing the potential for code or library incompatibilities. Also, lately we have updated Python version support every 2 years (2020, 2022, 2024) so these would have gone out of support by 2026.

Considered supporting 3.12 only (in line with pyODK) but according to these PyPi stats it's adoption is about 5% as of 2024-05-04. Adoption of 3.10 to 3.12 inclusive is more like 40%. Using 3.10 as the default / lowest version allows for nice things like the newer typing syntax and structural pattern matching.

What are the regression risks?

The py3.10 typing syntax would throw an error for older Python versions. The f-strings replacements were fiddly and so could be off but I checked them over a few times and the tests pass.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

Yes, the README is updated.

Before submitting this PR, please make sure you have:

lognaturel commented 4 weeks ago

according to these PyPi stats it's adoption is about 5% as of 2024-05-04

😱 Should we consider expanding the range for pyodk? Maybe we only consider it if someone asks for it. I wonder whether that number is so low because most Python installations are just default ones that come with OS distributions.