Giter Club home page Giter Club logo

Comments (6)

rkbennett avatar rkbennett commented on May 21, 2024 1

Sorry for being late to the party, but after looking through the code and what the results are of importing that repo (at least for me), it appears there was a bug introduced to the submodule logic when the refactor happened. Specifically the else statement was removed from this conditional https://github.com/operatorequals/httpimport/blob/master/httpimport.py#L439
This causes it to assume the __package__ attribute to be the full module name, which breaks relative imports on submodules which are 2nd level submodules (i.e. package.module). The else statement needs to be added back which sets the package attribute like this mod.__package__ = name.split('.')[0] though with the new code it would be pkg_name.

from httpimport.

cforce avatar cforce commented on May 21, 2024 1

@rkbennett Would you provide a pull request with the fix, that would be great.

from httpimport.

rkbennett avatar rkbennett commented on May 21, 2024 1

Done

from httpimport.

operatorequals avatar operatorequals commented on May 21, 2024

Hey @cforce 🙃
I really don't see what this happens in first glance.
Can you provide the version of the module you are using?

from httpimport.

cforce avatar cforce commented on May 21, 2024

i am using the latest of everything

from httpimport.

operatorequals avatar operatorequals commented on May 21, 2024

I'm here to review and merge a PR (and cut a release), but it would take a bit more for me to develop the fix, as I currently am not into computers all that much!

Cheers @rkbennett for finding tje culprit, I didn't have the time and energy to debug.

from httpimport.

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.