Skip to content

Sdk 2648 python sdk update protobuf library and dependants #421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mehmet-yoti
Copy link
Contributor

Update protobuf to 4.21.12 and modernize Python version support

📋 Summary

This PR updates the protobuf library from 3.20.1 to 4.21.12 and modernizes the Python version support to align with current best practices and security requirements.

🔄 Changes Made

Core Dependencies

  • Protobuf: Updated from 3.20.14.21.12
  • Python Requirements: Added python_requires=">=3.7"

Python Version Support

  • Removed support for: Python 2.7, 3.4, 3.5, 3.6
  • Added support for: Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12

Files Modified

  • setup.py: Updated protobuf version, Python classifiers, and added python_requires
  • requirements.txt: Regenerated with new protobuf version using pip-compile

🚨 Breaking Changes

⚠️ This is a breaking change release

  1. Minimum Python Version: Now requires Python 3.7+

    • Previously supported Python 2.7 and Python 3.4+
    • Applications using older Python versions will need to upgrade
  2. Protobuf Major Version: Upgraded from 3.x to 4.x

    • Generally backward compatible, but may have subtle differences
    • Generated protobuf files may need regeneration for optimal compatibility

🔍 Technical Details

Protobuf 4.21.12 Benefits

  • Improved performance and memory usage
  • Better Python 3.7+ integration
  • Enhanced security and bug fixes
  • Continued support and maintenance

Python Version Modernization

  • Drops legacy Python 2.7 support
  • Aligns with current Python support lifecycle
  • Enables use of modern Python features
  • Improves security posture

⚠️ Important Notes

Generated Protobuf Files

The existing protobuf generated files (*_pb2.py) in yoti_python_sdk/protobuf/ contain older patterns like:

_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))

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.

1 participant