Giter VIP home page Giter VIP logo

Comments (9)

RonnyPfannschmidt avatar RonnyPfannschmidt commented on August 10, 2024

well - the only way to do that would be to break the python import mechanism, as relative imports are supposed to work only within the local package tree, not across package trees

from pluggy.

goodboy avatar goodboy commented on August 10, 2024

@RonnyPfannschmidt right.

So my thinking is for dev testing we only need to test the local pluggy code where some other stable version can be used as a dep by pytest.

Let me see if I can come up with something and we can talk :)

from pluggy.

nicoddemus avatar nicoddemus commented on August 10, 2024

It is fine to use relative imports, but that doesn't mean that the modules will be isolated in anyway: a module inside pluggy package that executes from . import callers will import the exact same module as if executing from pluggy import callers, which is also the same module imported from another package (say pytest) executing import pluggy.callers.

from pluggy.

RonnyPfannschmidt avatar RonnyPfannschmidt commented on August 10, 2024

we can test a un-installed pluggy in isolation by mapping it to a new name, we cant test a installed pluggy in isolation at all - python is just broken there

from pluggy.

nicoddemus avatar nicoddemus commented on August 10, 2024

I think @RonnyPfannschmidt and I are saying the same thing, we can close this as "won't fix" because there's no practical solution for it. 😁

from pluggy.

goodboy avatar goodboy commented on August 10, 2024

@nicoddemus just hold up. I'm pretty sure I know how to make this work. If I fail I'll close it ;)

from pluggy.

nicoddemus avatar nicoddemus commented on August 10, 2024

@tgoodlet sure please go ahead! 😁

from pluggy.

goodboy avatar goodboy commented on August 10, 2024

@nicoddemus ok I take it back. You're right I'd have to hack around it with sys.modules which I think is doable but I'm not going to bother until it's needed.

from pluggy.

nicoddemus avatar nicoddemus commented on August 10, 2024

Thanks for trying! 👍

from pluggy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.