Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S slapos.recipe.build
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • slapos.recipe.build
  • Merge requests
  • !20

Merged
Created Mar 14, 2024 by Xavier Thompson@xavier_thompsonOwner2 of 2 tasks completed2/2 tasks

Move non-trivial code from namespace __init__.py

  • Overview 4
  • Commits 2
  • Changes 9
  • Move non-trivial code from slapos/recipe/__init__.py to slapos/recipe/utils.py.

This is needed for buildout 3 because buildout now uses pip and pip drops __init__.py in namespace packages.

New-style namespace packages are packages that do not contain an __init__.py. The native Python import mechanism now handles such packages as namespaces.

Legacy namespace packages predate this feature and achieve the same behavior with an __init__.py that uses a legacy namespace mechanism such as:

__import__('pkg_resources').declare_namespace(__name__)

Pip just drops such legacy __init__.py in packages declared as namespace packages. To work around this buildout 3 creates a new __init__.py using the above legacy namespace implementation.

  • slapos.recipe.cmmi and rubygemsrecipe will need to adapt to the changed path.
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: dev/buildout-3-fix-namespaces
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7