GithubHelp home page GithubHelp logo

import _pickle about snaketrace HOT 5 CLOSED

emmedve1 avatar emmedve1 commented on August 20, 2024
import _pickle

from snaketrace.

Comments (5)

emmedve1 avatar emmedve1 commented on August 20, 2024 1

Hello @dcoles,

I can reproduce this on a Python script that simply imports pickle, so that's definitely not acceptable.

Copied the test case from the 'pickle' implementation from a desire to narrow the issue a bit

Will test the changes and make a new release shortly.

Thanks for your time dude :-)

Cheers,

from snaketrace.

dcoles avatar dcoles commented on August 20, 2024

@emmedve1 Thank you for the bug report!

I can reproduce this on a Python script that simply imports pickle, so that's definately not acceptable.

My suspicion is that _compat_pickle has been loaded as an indirect dependency of runpy, so when we clear sys.modules prior to running the target, it ends up in a weird "imported but not in sys.modules state.

Will look into ways to address this.

from snaketrace.

dcoles avatar dcoles commented on August 20, 2024

Right. So it appears to be due to us replacing the sys.modules dict rather than updating it. Python still has the reference to the old one.

A quick fix is to change

sys.modules = MODULES
to the following:

sys.modules.clear()
sys.modules.update(MODULES)

Will test the changes and make a new release shortly.

from snaketrace.

dcoles avatar dcoles commented on August 20, 2024

Thanks for your time dude :-)

No worries! Thanks for taking the time to report the bug!

Fix included in snaketrace-0.3.1.

from snaketrace.

emmedve1 avatar emmedve1 commented on August 20, 2024

Fix included in snaketrace-0.3.1

Looks good. Thanks again :-)

from snaketrace.

Related Issues (2)

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.