Skip to content

Add support for loading Products.* packages outside the Products install folder #81

Open
@gforcada

Description

@gforcada

See plone/Products.CMFDynamicViewFTI@2531d00 for the actual code (from plone/Products.CMFDynamicViewFTI#24)

Rationale:

If you are running tests from within a Products.* distribution you will probably have all other Products installed somewhere in lib/python3.11/site-packages/... but the distribution under test will be used from its source files.

Turns out that plone.testing specifically looks for Products.* distributions to be always from the very same location, ignoring distributions that are used outside the Products folder within site-packages.

Do we still need this specific check, or is a relic of the past? 🤔

Activity

davisagli

davisagli commented on Apr 15, 2023

@davisagli
SponsorMember

@gforcada Where is the check? It might have something to do with namespace packages (or handling Products from before it was commonly understood how to use namespace packages) but I am not sure. I was going to take a closer look but I didn't find it yet.

gforcada

gforcada commented on Apr 15, 2023

@gforcada
SponsorMemberAuthor

It's on Zope code, now i'm on the phone, I will check later

gforcada

gforcada commented on Apr 15, 2023

@gforcada
SponsorMemberAuthor

Found it: https://github.com/plone/plone.testing/blob/master/src/plone/testing/zope.py#L47

This get_product checks the filesystem location of Products folder

Rudd-O

Rudd-O commented on Apr 19, 2023

@Rudd-O

I support this effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Add support for loading Products.* packages outside the Products install folder · Issue #81 · plone/plone.testing