Skip to content

Conversation

@AadarshM07
Copy link
Contributor

Summary

This PR removes Python 2.7 compatibility code across the codebase, replacing deprecated io.open() calls with the built-in open() function, removing __future__ imports, dropping Python 2-only shims (such as nonzero and urllib2 fallbacks), and simplifying file I/O helpers.

References

Closes #13883

Reviewer guidance

Location of Changes:

  1. build_tools/i18n/fonts.py
  2. build_tools/i18n/utils.py
  3. docker/entrypoint.py
  4. kolibri/core/analytics/test/test_utils.py
  5. kolibri/core/auth/constants/facility_presets.py
  6. kolibri/core/content/management/commands/generate_schema.py
  7. kolibri/core/content/test/test_channel_import.py
  8. kolibri/core/content/utils/paths.py
  9. kolibri/core/content/utils/stopwords.py
  10. kolibri/core/deviceadmin/utils.py
  11. kolibri/core/logger/management/commands/generateuserdata.py
  12. kolibri/core/sqlite/utils.py
  13. kolibri/core/utils/nothing.py
  14. kolibri/core/webpack/hooks.py
  15. kolibri/plugins/qti_viewer/kolibri_plugin.py
  16. kolibri/utils/i18n.py
  17. kolibri/utils/pskolibri/common.py

@github-actions github-actions bot added DEV: renderers HTML5 apps, videos, exercises, etc. DEV: backend Python, databases, networking, filesystem... SIZE: small labels Dec 1, 2025
@AadarshM07 AadarshM07 changed the title Issue#13883 Remove Python 2.7: Simple syntax and import cleanups Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DEV: backend Python, databases, networking, filesystem... DEV: renderers HTML5 apps, videos, exercises, etc. SIZE: small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Python 2.7 legacy: Simple syntax and import cleanups

2 participants