Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 139
    • Merge requests 139
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !1032

Merged
Created Jan 17, 2020 by Arnaud Fontaine@arnauDeveloper

Migrate of erp5_base-related source files to ZODB Components

  • Overview 78
  • Commits 5
  • Pipelines 1
  • Changes 84+

@nexedi This is about migrating 65 files (Documents, Interfaces, Mixins, Unit Tests and Tools) from filesystem to ZODB Components. The reason I have created this MR is to discuss the following important points:

  • Import statements will have to be changed in projects. For example: Products.ERP5.Document.Person will have to be changed to erp5.component.document.Person and modules doing such import at top-level will have to be migrated to ZODB Components too.

    This is necessary because import of Products modules and their registrations are done at a very early stage when starting Zope (even before erp5.component module is created). I currently don't see a way to do otherwise but any idea is welcome (I can provide a shell script to update imports so I don't think it's such a big problem though).

  • Filesystem Interfaces are registered in Products.ERP5Type.interfaces. To have the same mechanism with ZODB Components, this would require loading all Interfaces at startup/reset which is obviously not a good idea. This means that the following common pattern:

    from Products.ERP5Type import interfaces class Foo: zope.interface.implements(interfaces.IFoo,) will have to be changed to (and for the same reason as above, this module will have to be migrated to ZODB Component):

    from erp5.component.interface.IFoo import IFoo class Foo: zope.interface.implements(IFoo,)

Edited Mar 12, 2020 by Arnaud Fontaine
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: arnau-RD-Components-Products-Migration-erp5_base
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7