Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
R re6stnet
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • re6stnet
  • Merge requests
  • !46

Merged
Created Jun 21, 2023 by Joanne Hugé@jhugeMaintainer

Port re6stnet to python3

  • 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
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: re6st-py3
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7