Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • R re6stnet
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedinexedi
  • re6stnet
  • Merge requests
  • !46

Port re6stnet to python3

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Joanne Hugé requested to merge re6st-py3 into master Jun 21, 2023
  • Overview 245
  • Commits 11
  • Changes 36

This PR contains the changes necessary to make re6stnet work under Python 3.11. These changes are breaking regarding Python 2 compatibility.

Logs have been added to make debugging easier, and the code has been hardened through use of assert(...) in multiple locations to ensure fail-fast behavior in case of unreachable code or violations of code invariants.

Notable changes:

  • the cryptography module should be used for future development. Usages of the pyOpenSSL module are still present in the re6st.x509 module but should be replaced accordingly in the long run.
  • resources (sockets, file descriptors) are now properly cleaned up after use
    • Python 3 added automatic detection of leaked resources, which highlighted a lot of usages of such resources where they weren't freed or deallocated. For a long-running program such as re6stnet this can be problematic.
  • type annotations have been added all throughout the codebase to allow for easier inspection and debugging. The highly dynamic nature of certain components (e.g. registry RPC), and the recurrent usage of string literals (e.g. "udp", "udp6") make it quite difficult to properly annotate everything, so this is a best-effort approach.
    • Type annotations and enums should be used as much as possible for future code.
  • the fixnemu.py file, containing various patches and fixes for nemu (mostly related to changes in parsing textual output from iproute2) has been removed since the patches have been upstreamed to nemu3
Edited Oct 02, 2024 by Tom Niget
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: re6st-py3
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7