Advanced hot reloading for Python

Overview

Logo

The missing element of Python - Advanced Hot Reloading

Example

Details

https://img.shields.io/jetbrains/plugin/v/18509-reloadium https://img.shields.io/jetbrains/plugin/d/18509-reloadium https://img.shields.io/jetbrains/plugin/r/stars/18509-reloadium
Reloadium adds hot reloading also called "edit and continue" functionality to any Python application

Installing

If you are a PyCharm user please check out Reloadium plugin
Plugins for other IDEs are coming soon.
Reloadium can be also used as a standalone library by installing it manually with pip:
pip install reloadium

Using

Running python files:

reloadium run example.py

Running modules:

reloadium run -m my_module
To apply your changes simply save a file

General Python Features

Reloadium will rerun current function when changed.
Developers get instant feedback whether the code is working or not.
Frame Reloading
Reloadium will handle errors during reloading function and let you fix mistakes.
Frame Reloading
Reloadium is capable of reloading files across the whole project.
Tweaking with settings could not be easier.
Frame Reloading

Django

Reloadium will hot reload views and refresh page on save.
Page Refreshing
Reloadium will rollback database changes to prevent creating unwanted objects after reloading current function.
Rolling back db

Flask

Reloadium will hot reload flask apps and refresh page on save.
Changing content can be seen in real time making web development much smoother.
Flask

SqlAlchemy

Reloadium will rollback database changes to prevent creating unwanted objects after reloading current function.
SqlAlchemy

Pandas

Reloadium hot reloads pandas objects.
Manipulating complex dataframes for data science could not be easier.
Pandas
Comments
  • [M1 Chip, macos] It seems like your platform or Python version are not supported yet.

    [M1 Chip, macos] It seems like your platform or Python version are not supported yet.

    I Get this: (venv) xxx/venv/bin/python -m reloadium pydev_proxy /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py --multiprocess --save-signatures --qt-support=auto --client 127.0.0.1 --port 55863 --file xx/init.py --infer_schema

    It seems like your platform or Python version are not supported yet. Please submit a github issue to let us know at https://github.com/reloadware/reloadium

    im trying to debug a module

    opened by siilats 18
  • PYENV not recognized as current Python Version

    PYENV not recognized as current Python Version

    Describe the bug I have the PyCharm interpreter pointing to /pyenv/versions/3.10.6/bin/python3.10, but when I try to run Reloadium it tells me that my version of Python is not yet supported:

    /Users/mikrubin/.pyenv/versions/3.10.6/bin/python3.10 -m reloadium pydev_proxy /Applications/Tools/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd.py --multiprocess --save-signatures --qt-support=auto --client 127.0.0.1 --port 52169 --file /Users/mikrubin/My Drive/Python/MapTasker.py It seems like your platform or Python version are not supported yet. Windows, Linux, macOS and Python >= 3.7 (3.9 for M1) are currently supported. Please submit a github issue if you believe Reloadium should be working on your system at

    To Reproduce Steps to reproduce the behavior:

    1. Use Pyenv to manage Python 3.10
    2. Bring up Pycharm and point its interpreter to the above.
    3. Run reloadium plugin
    4. See error

    Expected behavior Normal reloadium debugging.

    Screenshots See above, under '... is not yet supported:'

    Desktop (please complete the following information):

    • OS: OS X
    • OS version: 12.6
    • Reloadium package version: None
    • PyCharm plugin version: 0.8.5
    • Editor: PyCharm
    • Run mode: Debug via Reloadium

    Additional context Add any other context about the problem here.

    opened by mctinker 14
  • C:\Python310\python.exe: No module named reloadium.flask_test

    C:\Python310\python.exe: No module named reloadium.flask_test

    Describe the bug Trying to run flask hello world app with reloadium gives error.

    To Reproduce Steps to reproduce the behavior:

    1. pip install reloadium --user
    2. python -m reloadium run .\flask_test.py

    Expected behavior Ideally it should start tracking files and reload app based on changes.

    Screenshots If applicable, add screenshots to help explain your problem. Capture

    Desktop (please complete the following information):

    • OS: [Windows]
    • Reloadium package version: [0.8.7]
    • Editor: [Vscode]
    • Run mode: [Run/Debug]
    opened by UtpalDas6 12
  • Reloadium experienced a fatal error and has to quit.

    Reloadium experienced a fatal error and has to quit.

    Hi Reloadium, I have encountered following issue:

    Describe the bug

    I would like to use reloadium in order to debug my remote code. Unfortunately, when I click on debug I get the following error:

    image

    To Reproduce

    Steps to reproduce the behavior:

    1. Go to Pycharm and specify remote SFTP deployment, set the local and remote paths correctly
    2. Go to Interpreter settings and set the remote ssh interpreter using deployment previously defined
    3. Install reloadium by pip3.8 install reloadium command.
    4. Click on debug in order to test that your debugging works in general, after breakpoint is hit, stop it.
    5. Click on reloadium debugging

    Expected behavior

    Debugging works as expected, hot-swap is possible.

    opened by TS9001 10
  • Pycharm plugin 0.9.4 not supported for Python 3.10.6

    Pycharm plugin 0.9.4 not supported for Python 3.10.6

    Describe the bug I'm getting the It seems like your platform or Python version are not supported yet. message when running the PyCharm plugin.

    To Reproduce Steps to reproduce the behavior:

    1. Click on the run or debug buttons.
    2. See error

    Expected behavior Run.

    Screenshots NA

    Desktop (please complete the following information):

    • OS: MacOS
    • OS version: 11.5.2 (20G95)
    • Reloadium package version: 0.9.4
    • PyCharm plugin version: 0.8.8
    • Editor: PyCharm 2022.2.3 (Professional Edition) Build #PY-222.4345.23
    • Run mode: Either Run or Debug

    Additional context Running from the command line seems fine.

    opened by dirko 9
  • Plugin 0.8.6 (with Relodium 0.9.3) breaks with PyCharm 2022.2.3

    Plugin 0.8.6 (with Relodium 0.9.3) breaks with PyCharm 2022.2.3

    Describe the bug Relodium breaks. I had relodium installed and upgraded both PyCharm and Relodium versions. After the upgrade, the plugin fails when running. Because code is obfuscated I cannot see where it breaks, but I attached the log console.

    Screenshots image

    Desktop (please complete the following information):

    • OS: Windows 11
    • Reloadium package version: 0.8.6
    • Editor: PyCharm 2022.2.3 (Professional Edition) Build #PY-222.4345.23, built on October 10, 2022
    • Run mode: Run

    Additional context Add any other context about the problem here.

    opened by laurapons 9
  • Segmentation fault while using Django with python-devtools

    Segmentation fault while using Django with python-devtools

    Describe the bug

    Using Django==3.2.13 this is a massive project in general. Loaded 416 watched modules so far from paths.

    When I used python-devtools got a segfault with:

    Thread 44 "python" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7fffa1329700 (LWP 13697)]
    _PyMem_DebugMalloc (ctx=0x555555b59380 <_PyMem_Debug+96>, nbytes=40) at Objects/obmalloc.c:2329
    warning: Source file is more recent than executable.
    2329        _PyMem_DebugCheckGIL(__func__);
    

    bt output:

    (gdb) bt
    #0  _PyMem_DebugMalloc (ctx=0x555555b59380 <_PyMem_Debug+96>, nbytes=40) at Objects/obmalloc.c:2329
    #1  0x00005555556029a6 in PyObject_Malloc (size=<optimized out>) at Objects/obmalloc.c:685
    #2  0x00005555556ed825 in _PyObject_GC_Alloc (use_calloc=use_calloc@entry=0, basicsize=<optimized out>) at Modules/gcmodule.c:2225
    #3  0x00005555556ee7be in _PyObject_GC_Malloc (basicsize=<optimized out>) at Modules/gcmodule.c:2252
    #4  0x00005555556ee7eb in _PyObject_GC_New (tp=0x7ffff6e893c0) at Modules/gcmodule.c:2264
    ...
    #56155 0x00005555555bec20 in PyVectorcall_Call (callable=callable@entry=0x7fffa2563ef0, tuple=tuple@entry=0x7ffff73e3050, kwargs=kwargs@entry=0x7fffa24d6a10) at Objects/call.c:230
    #56156 0x00005555555bef65 in _PyObject_Call (tstate=0x7fffbc002c30, callable=callable@entry=0x7fffa2563ef0, args=args@entry=0x7ffff73e3050, kwargs=kwargs@entry=0x7fffa24d6a10) at Objects/call.c:265
    #56157 0x00005555555befe3 in PyObject_Call (callable=callable@entry=0x7fffa2563ef0, args=args@entry=0x7ffff73e3050, kwargs=kwargs@entry=0x7fffa24d6a10) at Objects/call.c:292
    --Type <RET> for more, q to quit, c to continue without paging--
    #56158 0x000055555567ccea in do_call_core (tstate=tstate@entry=0x7fffbc002c30, func=func@entry=0x7fffa2563ef0, callargs=callargs@entry=0x7ffff73e3050, kwdict=kwdict@entry=0x7fffa24d6a10) at Python/ceval.c:5092
    #56159 0x0000555555687562 in _PyEval_EvalFrameDefault (tstate=0x7fffbc002c30, f=0x7fffcc1e3990, throwflag=<optimized out>) at Python/ceval.c:3552
    #56160 0x00005555555be8db in _PyEval_EvalFrame (throwflag=0, f=0x7fffcc1e3990, tstate=0x7fffbc002c30) at ./Include/internal/pycore_ceval.h:40
    #56161 function_code_fastcall (tstate=0x7fffbc002c30, co=<optimized out>, args=0x7fffe013eec0, args@entry=0x7fffe013eeb8, nargs=1, globals=<optimized out>) at Objects/call.c:329
    #56162 0x00005555555bf232 in _PyFunction_Vectorcall (func=<optimized out>, stack=0x7fffe013eeb8, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:366
    #56163 0x000055555567caff in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=9223372036854775809, args=0x7fffe013eeb8, callable=0x7ffff5d2beb0, tstate=0x7fffbc002c30) at ./Include/cpython/abstract.h:118
    #56164 PyObject_Vectorcall (kwnames=0x0, nargsf=9223372036854775809, args=0x7fffe013eeb8, callable=0x7ffff5d2beb0) at ./Include/cpython/abstract.h:127
    #56165 call_function (tstate=tstate@entry=0x7fffbc002c30, pp_stack=pp_stack@entry=0x7fffa1328a60, oparg=oparg@entry=1, kwnames=kwnames@entry=0x0) at Python/ceval.c:5044
    #56166 0x0000555555687052 in _PyEval_EvalFrameDefault (tstate=0x7fffbc002c30, f=0x7fffe013ed40, throwflag=<optimized out>) at Python/ceval.c:3476
    #56167 0x00005555555be8db in _PyEval_EvalFrame (throwflag=0, f=0x7fffe013ed40, tstate=0x7fffbc002c30) at ./Include/internal/pycore_ceval.h:40
    #56168 function_code_fastcall (tstate=0x7fffbc002c30, co=<optimized out>, args=0x7fffcc01b260, args@entry=0x7fffcc01b258, nargs=1, globals=<optimized out>) at Objects/call.c:329
    #56169 0x00005555555bf232 in _PyFunction_Vectorcall (func=<optimized out>, stack=0x7fffcc01b258, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:366
    #56170 0x000055555567caff in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=9223372036854775809, args=0x7fffcc01b258, callable=0x7ffff5d2e230, tstate=0x7fffbc002c30) at ./Include/cpython/abstract.h:118
    #56171 PyObject_Vectorcall (kwnames=0x0, nargsf=9223372036854775809, args=0x7fffcc01b258, callable=0x7ffff5d2e230) at ./Include/cpython/abstract.h:127
    #56172 call_function (tstate=tstate@entry=0x7fffbc002c30, pp_stack=pp_stack@entry=0x7fffa1328c80, oparg=oparg@entry=1, kwnames=kwnames@entry=0x0) at Python/ceval.c:5044
    #56173 0x0000555555687052 in _PyEval_EvalFrameDefault (tstate=0x7fffbc002c30, f=0x7fffcc01b0e0, throwflag=<optimized out>) at Python/ceval.c:3476
    #56174 0x00005555555be8db in _PyEval_EvalFrame (throwflag=0, f=0x7fffcc01b0e0, tstate=0x7fffbc002c30) at ./Include/internal/pycore_ceval.h:40
    #56175 function_code_fastcall (tstate=0x7fffbc002c30, co=<optimized out>, args=0x7fffa1328dc0, args@entry=0x7fffa1328db8, nargs=1, globals=<optimized out>) at Objects/call.c:329
    #56176 0x00005555555bf232 in _PyFunction_Vectorcall (func=<optimized out>, stack=0x7fffa1328db8, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:366
    #56177 0x0000555555783cdd in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=1, args=0x7fffa1328db8, callable=0x7ffff5d2bf50, tstate=0x7fffbc002c30) at ./Include/cpython/abstract.h:118
    #56178 method_vectorcall (method=<optimized out>, args=0x7ffff73e3068, nargsf=<optimized out>, kwnames=0x0) at Objects/classobject.c:61
    #56179 0x00005555555bec20 in PyVectorcall_Call (callable=callable@entry=0x7fffa145bef0, tuple=tuple@entry=0x7ffff73e3050, kwargs=kwargs@entry=0x0) at Objects/call.c:230
    #56180 0x00005555555bef65 in _PyObject_Call (tstate=0x7fffbc002c30, callable=0x7fffa145bef0, args=0x7ffff73e3050, kwargs=0x0) at Objects/call.c:265
    #56181 0x00005555555befe3 in PyObject_Call (callable=<optimized out>, args=<optimized out>, kwargs=<optimized out>) at Objects/call.c:292
    #56182 0x000055555574238b in t_bootstrap (boot_raw=boot_raw@entry=0x7fffa249c9a0) at ./Modules/_threadmodule.c:1040
    #56183 0x00005555556da7ec in pythread_wrapper (arg=<optimized out>) at Python/thread_pthread.h:236
    #56184 0x00007ffff7f91609 in start_thread (arg=<optimized out>) at pthread_create.c:477
    #56185 0x00007ffff7d5c133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
    

    bt full:

    (gdb) bt full
    #0  _PyMem_DebugMalloc (ctx=0x555555b59380 <_PyMem_Debug+96>, nbytes=40) at Objects/obmalloc.c:2329
            __func__ = "_PyMem_DebugMalloc"
    #1  0x00005555556029a6 in PyObject_Malloc (size=<optimized out>) at Objects/obmalloc.c:685
    No locals.
    #2  0x00005555556ed825 in _PyObject_GC_Alloc (use_calloc=use_calloc@entry=0, basicsize=<optimized out>) at Modules/gcmodule.c:2225
            tstate = <optimized out>
            gcstate = 0x555555baa118
            size = <optimized out>
            g = <optimized out>
            __PRETTY_FUNCTION__ = "_PyObject_GC_Alloc"
            op = <optimized out>
    #3  0x00005555556ee7be in _PyObject_GC_Malloc (basicsize=<optimized out>) at Modules/gcmodule.c:2252
    No locals.
    #4  0x00005555556ee7eb in _PyObject_GC_New (tp=0x7ffff6e893c0) at Modules/gcmodule.c:2264
            op = <optimized out>
    
    

    No syms for reloader:

    objdump --syms /home/shako/REPOS/.../env/lib/python3.9/site-packages/reloadium/reloader.cpython-39-x86_64-linux-gnu.so
    
    /home/shako/REPOS/.../env/lib/python3.9/site-packages/reloadium/reloader.cpython-39-x86_64-linux-gnu.so:     file format elf64-x86-64
    
    SYMBOL TABLE:
    no symbols
    
    nm /home/shako/REPOS/.../env/lib/python3.9/site-packages/reloadium/reloader.cpython-39-x86_64-linux-gnu.so
    nm: /home/shako/REPOS/.../env/lib/python3.9/site-packages/reloadium/reloader.cpython-39-x86_64-linux-gnu.so: no symbols
    

    To Reproduce Steps to reproduce the behavior:

    1. enable python-devtools by following this: https://python-devtools.helpmanual.io/usage/#manual-install My sitecustomize.py path: /usr/local/lib/python3.9/sitecustomize.py

    2. Fire up django with given version

    3. add sum dummy simple view

    4. add debug() statements as in: https://python-devtools.helpmanual.io/usage/#debug

    5. make it to reload

    6. then remove debug() statements

    7. make it to reload

    8. expect segfault

    Expected behavior No segfault obviously

    Screenshots If applicable, add screenshots to help explain your problem.

    Desktop (please complete the following information):

    • OS: Ubuntu
    • OS version: 20.04.4 LTS
    • Reloadium package version: 0.9.0
    • PyCharm plugin version: No plugin running from terminal
    • Editor: PyCharm
    • Run mode: run

    Additional context Add any other context about the problem here.

    opened by ShahriyarR 9
  • PYTHONPATH didn't take into account by the plugin

    PYTHONPATH didn't take into account by the plugin

    I have in my PYTHONPATH a folder containing several lib that I use in different python project. When I run my script without Reloadium every thing is fine. But with Reloadium I have :

    Traceback (most recent call last): File "C:\Users\stamza\PyCharmProjectLocal\Support\Ioda-MedEco\Ioda_test.py", line 1, in import ioda ModuleNotFoundError: No module named 'ioda'

    opened by tamzaselma 6
  • Not working with Python 32 bit (x86)

    Not working with Python 32 bit (x86)

    Describe the bug A clear and concise description of what the bug is. I installed the Reloadium plugin version 0.8.8, then tried to debug my code, and I got an error: It seems like your platform or Python version are not supported yet. Windows, Linux, macOS and Python >= 3.7 (3.9 for M1) are currently supported.

    To Reproduce Steps to reproduce the behavior:

    1. Installed lates plugin (0.8.8) from this URL: https://plugins.jetbrains.com/plugin/18509-reloadium--hot-reloading--profiling-for-python/versions (File > Settings > Plugins - clicked the cogwheel icon and chose Install plugin from disk, installed from downloaded zip file)
    2. Run or debug code with the orange icons
    3. See error

    Expected behavior Debug without error

    Screenshots NA

    Desktop (please complete the following information):

    • OS: Windows 10 Pro 64 bit (running on a VM on Hyper-V)
    • OS version: 10.0.19044.2251
    • Reloadium package version: 0.9.4
    • PyCharm plugin version: 0.8.8
    • Editor: PyCharm 2022.02.03
    • Run mode: Either Run or Debug

    Additional context I didn't understand, do we need to install both the Reloadium package and the Reloadium plugin for PyCharm too? I thought I would just install the plugin and it would work. But I have installed the package too via pip, using this command below, and it's still not working: pip install reloadium

    opened by nstefi 5
  • Cannot get `RELOADIUMPATH` to be picked up by PyCharm

    Cannot get `RELOADIUMPATH` to be picked up by PyCharm

    Describe the bug I am trying to set up RELOADIUMPATH env variable in Pycharm, but consistently am getting the "No files are watched."

    Tried:

    • adding it in Run/Debug Configuration
    • adding it in Preferences -> Build, Execution, Deployment -> Console -> Python Console and editing Run/Debug Configuration to Run with Python Console
      • confirmed with os.environ in Python Console window that the variable is set up as expected

    I would suggest that you improve the error message's verbosity to actually inform whether RELOADIUMPATH was set and if so, to which value. Right now it's hard to tell where to look for the cause.

    Expected behavior RELOADIUMPATH set in Run/Debug Configuration should be picked up. Error message should be more verbose.

    Desktop (please complete the following information):

    • OS: macOS
    • OS version: 12.6
    • Reloadium package version: 0.9.3
    • PyCharm plugin version: 0.8.6
    • Editor: PyCharm
    • Run mode: Run/Debug

    Actual console log output:

    Loaded 0 watched modules so far from paths:
     - /Users/cromo/Documents/Sourcecode/woob/venv/bin/**/*.py
    
    No files are watched.
    Editing files will have no effect!
    Only files inside current working directory or directories specified in RELOADIUMPATH environmental variable are watched.
    
    opened by wrobelda 5
  • [Question] What IDEs are supported by this plugin?

    [Question] What IDEs are supported by this plugin?

    I mainly use VS Code for Python development, and I want to know: is there support for Visual Studio Code?

    This software looks like a blessing and I'd like to be able to use it.

    opened by CodyMarkix 5
  • Pycharm plugin + Poetry env - No module named reloadium

    Pycharm plugin + Poetry env - No module named reloadium

    Describe the bug

    It looks like pycharm plugin installs the library to the system interpreter, even if there is a project-related virtual env.

    Here is the pycharm output:

    /Users/benyaming/Library/Caches/pypoetry/virtualenvs/...-py3.10/bin/python -m reloadium run /Users/benyaming/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/223.7571.203/PyCharm.app/Contents/plugins/python/helpers/pycharm/pycharm_load_entry_point.py /Users/benyaming/PycharmProjects/.../local_prep.ini 
    
    > /Users/benyaming/Library/Caches/pypoetry/virtualenvs/...-py3.10/bin/python: No module named reloadium
    

    To Reproduce

    N/A

    Expected behavior

    Start the application

    Screenshots

    N/A

    Desktop (please complete the following information):**

    • OS: MacOS
    • OS version: 12.5.1
    • M1 chip: no
    • Reloadium package version: n/a (didn't find where it was installed to)
    • PyCharm plugin version: 0.9.1
    • Editor: PyCharm 2022.3
    • Python Version: 3.10.6
    • Python Architecture: 64
    • Run mode: Run

    Additional context

    Python 3.10 (managed by Pyenv) + poetry env

    Not sure, if it is possible to run a file via local poetry env AND global reloadium?

    Anyway, thanks a lot for the great project!

    opened by benyaming 5
  • Errors when using pycharm+flask+flask_sqlalchemy

    Errors when using pycharm+flask+flask_sqlalchemy

    Describe the bug

    When I try to run a flask application with the flask-sqlalchemy module an error occurs. Without reloadium everything works fine.

    • flask: 2.2.2
    • flask-sqlalchemy: 3.0.2

    To Reproduce

    Steps to reproduce the behavior:

    1. Run in pycharm example from https://github.com/pallets-eco/flask-sqlalchemy#a-simple-example

    Desktop (please complete the following information):**

    • OS: Windows
    • OS version: [Version 10.0.19044.2251]
    • Reloadium package version: 0.9.6
    • PyCharm plugin version: 0.9.1
    • Editor: PyCharm
    • Python Version: 3.10
    • Python Architecture: 64bit
    • Run mode: Run

    Additional context

    Traceback (most recent call last):
      File "F:\foldername\test.py", line 6, in <module>
        db = SQLAlchemy(app)
      File "C:\Users\Kristaller\AppData\Local\Programs\Python\Python310\lib\site-packages\flask_sqlalchemy\extension.py", line 219, in __init__
        self.init_app(app)
      File "C:\Users\Kristaller\AppData\Local\Programs\Python\Python310\lib\site-packages\flask_sqlalchemy\extension.py", line 320, in init_app
        engines[key] = self._make_engine(key, options, app)
      File "C:\Users\Kristaller\AppData\Local\Programs\Python\Python310\lib\site-packages\flask_sqlalchemy\extension.py", line 606, in _make_engine
        return sa.engine_from_config(options, prefix="")
      File "C:\Users\Kristaller\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\engine\create.py", line 743, in engine_from_config
        return create_engine(url, **options)
      File "<string>", line 2, in create_engine
      File "C:\Users\Kristaller\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util\deprecations.py", line 309, in warned
        return fn(*args, **kwargs)
      File "C:\Users\Kristaller\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\engine\create.py", line 636, in create_engine
        raise TypeError(
    TypeError: Invalid argument(s) 'echo' sent to create_engine(), using configuration SQLiteDialect_pysqlite/NullPool/Engine.  Please check that the keyword arguments are appropriate for this combination of components.
    
    opened by kristaller486 0
  • remote interpreter hangs on kill command (red square), and shows no profile information

    remote interpreter hangs on kill command (red square), and shows no profile information

    Describe the bug When running the plugin locally, (Windows) everything is fine. When running using remote interpreter (on a remote Ubuntu), no profile information is displayed.

    To Reproduce Create a remote interpreter configuration Debug using the plugin See no profiling info

    Also killing the (remote) debugger hangs if started from the plugin, which doesn't happen with regular debug.

    Expected behavior

    1. Ability to kill the remote interpreter
    2. Ability to see profiling information.

    Screenshots image

    Desktop (please complete the following information):

    • OS: [Windows]
    • OS version: [10]
    • M1 chip: [yes/no] don't know
    • Reloadium package version: 0.9.5
    • PyCharm plugin version: [e.g 0.8.0 or None] 0.9
    • Editor: [e.g PyCharm] Pycharm
    • Python Version: [eg. 3.9] 3.8.10
    • Python Architecture: [eg. 32bit, 64bit]64
    • Run mode: [e.g Run/Debug] Debug
    opened by noamzilo 6
  • [Feature Request] Need reloadium to work without manually adding breakpoints

    [Feature Request] Need reloadium to work without manually adding breakpoints

    Describe the bug

    Suppose there's some bug in my code. I don't know where and I don't know why. I only know this by running code for 4 hours and I need reloadium to pinpoint its location for me to edit and reload the code without restarting. Exceptions wrapped in try...except are ignored. Only those raised without being caught will trigger this behavior. The breakpoint should not go beyond the scope if configured. If the scope is limited to current folder, files outside this folder shall not be traced and breakpoint level is limited to the root cause of the exception in this folder.

    To Reproduce

    Steps to reproduce the behavior:

    1. Run a program with reloadium without adding breakpoints
    2. Reloadium raises an exception
    3. Program exits

    Expected behavior

    Reloadium will not exit, automatically generate breakpoint at the location where exception is raised, letting me to fix it.

    Desktop (please complete the following information):

    • OS: macOS
    • OS version: 12.5
    • Reloadium package version: 0.9.4
    • PyCharm plugin version: None
    • Editor: PyCharm CE
    • Run mode: Debug

    Additional context

    Example scenario:

    
    def trouble():
        raise Exception('error!') # reloadium should automatically add a breakpoint here after running without exiting.
    
    if __name__ == "__main__":
        # long and tedious startup omitted.
        trouble()
    
    opened by James4Ever0 3
  • Too many open files OSError during initialisation

    Too many open files OSError during initialisation

    Describe the bug For the Django project I work on, I would like to use reloadium with the python repl. Usually to run the repl, I would type on the commandline python manage.py shell But when using reloadium: reloadium run manage.py shell I get the following traceback

    Traceback (most recent call last):
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/ll1l1lll1l1lll1lIl1l1.py", line 138, in l11l1llll1llll11Il1l1
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1111l1l111ll1llIl1l1.py", line 326, in llllll1111llll11Il1l1
      File "<string>", line 4, in __init__
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1111l1l111ll1llIl1l1.py", line 242, in __post_init__
      File "<string>", line 5, in __init__
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1l1l1llll11lll1Il1l1.py", line 170, in __post_init__
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1l1l1llll11lll1Il1l1.py", line 248, in l1lll1llllll11l1Il1l1
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/lllllll111l1l1llIl1l1.py", line 389, in l11l1llll1lll111Il1l1
      File "<string>", line 12, in __init__
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/lllllll111l1l1llIl1l1.py", line 332, in __post_init__
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/watchdog/observers/api.py", line 291, in schedule
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/watchdog/observers/kqueue.py", line 450, in __init__
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/watchdog/utils/dirsnapshot.py", line 251, in __init__
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/watchdog/utils/dirsnapshot.py", line 283, in walk
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/watchdog/utils/dirsnapshot.py", line 283, in walk
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/watchdog/utils/dirsnapshot.py", line 283, in walk
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/watchdog/utils/dirsnapshot.py", line 259, in walk
    OSError: [Errno 24] Too many open files: '/Users/me/Work/code/project/node_modules/queue-microtask'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Users/me/.virtualenvs/python/bin/reloadium", line 8, in <module>
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/__init__.py", line 20, in start
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1111l1l111ll1llIl1l1.py", line 612, in start
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1111l1l111ll1llIl1l1.py", line 596, in l1llll11ll11ll1lIl1l1
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1111l1l111ll1llIl1l1.py", line 502, in l1l1lll11ll1ll1lIl1l1
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1111l1l111ll1llIl1l1.py", line 325, in llllll1111llll11Il1l1
      File "/Users/me/.pyenv/versions/3.10.1/lib/python3.10/contextlib.py", line 153, in __exit__
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/ll1l1lll1l1lll1lIl1l1.py", line 143, in l11l1llll1llll11Il1l1
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/ll1l1lll1l1lll1lIl1l1.py", line 107, in l11ll1111lll11llIl1l1
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1l1l111l1l111l1Il1l1.py", line 15, in l111ll11lll11l11Il1l1
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1l1l111l1l111l1Il1l1.py", line 43, in ll1ll1l1111l1ll1Il1l1
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1l1l111l1l111l1Il1l1.py", line 15, in l111ll11lll11l11Il1l1
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/corium/l1l1l111l1l111l1Il1l1.py", line 24, in lll11ll1l1l111l1Il1l1
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/sentry_sdk/hub.py", line 105, in _init
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/sentry_sdk/client.py", line 85, in __init__
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/sentry_sdk/client.py", line 119, in _init_impl
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/sentry_sdk/integrations/__init__.py", line 93, in setup_integrations
      File "/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/sentry_sdk/integrations/__init__.py", line 41, in iter_default_integrations
      File "/Users/me/.pyenv/versions/3.10.1/lib/python3.10/importlib/__init__.py", line 126, in import_module
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1002, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 945, in _find_spec
      File "<frozen importlib._bootstrap_external>", line 1430, in find_spec
      File "<frozen importlib._bootstrap_external>", line 1402, in _get_spec
      File "<frozen importlib._bootstrap_external>", line 1539, in find_spec
      File "<frozen importlib._bootstrap_external>", line 1582, in _fill_cache
    OSError: [Errno 24] Too many open files: '/Users/me/.virtualenvs/python/lib/python3.10/site-packages/reloadium/vendored/sentry_sdk/integrations'
    

    Desktop (please complete the following information):

    • OS: MacOS
    • OS version: 12.6 (Monterey)
    • Reloadium package version: 0.9.4
    • PyCharm plugin version: None
    • Editor: commandline
    • Run mode: reloadium run

    Additional context It appears that reloadium (through watchdog) is not only scanning all my node_modules but opening the files too. This is happening regardless if I set either the RELOADIUMPATH or RELOADIUMIGNORE environment variables. I assumed I could configure it via reloadium_config.py since the Config object has ignored_paths and watched_paths but I think this scanning occurs prior to the config being loaded(?).

    I believe this is more a problem with the vendored watchdog library, which also seems to also try limit you to 300 files in the pycharm plugin. This would be a problem for me since the django project I have as several thousand files.

    Maybe you could use an alternate filesystem watcher like: https://pypi.org/project/watchfiles/

    opened by bragradon 0
  • Python 3.11 Support

    Python 3.11 Support

    Describe the bug Not working on Python 3.11

    To Reproduce Steps to reproduce the behavior:

    1. Install Python 3.11
    2. Run Reloadium
    3. It prints

    It seems like your platform or Python version are not supported yet. Windows, Linux, macOS and Python >= 3.7 (3.9 for M1) are currently supported. Please submit a github issue if you believe Reloadium should be working on your system at https://github.com/reloadware/reloadium

    Expected behavior Working

    Screenshots If applicable, add screenshots to help explain your problem.

    Desktop (please complete the following information):

    • OS: Windows
    • OS version: 11
    • Reloadium package version: 0.9.4
    • PyCharm plugin version: 0.8.8
    • Editor: PyCharm
    • Run mode: Run and Debug

    Additional context Add any other context about the problem here.

    opened by InterestingDarkness 2
Owner
Reloadware
Hot Reloading tools for Python
Reloadware
Farhad Davaripour, Ph.D. 1 Jan 5, 2022
Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax.

PyDexter Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax. Setup $ pip install PyDexter

D3xter 31 Mar 6, 2021
Visual Python is a GUI-based Python code generator, developed on the Jupyter Notebook environment as an extension.

Visual Python is a GUI-based Python code generator, developed on the Jupyter Notebook environment as an extension.

Visual Python 564 Jan 3, 2023
A Python Binder that merge 2 files with any extension by creating a new python file and compiling it to exe which runs both payloads.

Update ! ANONFILE MIGHT NOT WORK ! About A Python Binder that merge 2 files with any extension by creating a new python file and compiling it to exe w

Vesper 15 Oct 12, 2022
Declarative statistical visualization library for Python

Altair http://altair-viz.github.io Altair is a declarative statistical visualization library for Python. With Altair, you can spend more time understa

Altair 8k Jan 5, 2023
Interactive Data Visualization in the browser, from Python

Bokeh is an interactive visualization library for modern web browsers. It provides elegant, concise construction of versatile graphics, and affords hi

Bokeh 17.1k Dec 31, 2022
Cartopy - a cartographic python library with matplotlib support

Cartopy is a Python package designed to make drawing maps for data analysis and visualisation easy. Table of contents Overview Get in touch License an

null 1.2k Jan 1, 2023
A grammar of graphics for Python

plotnine Latest Release License DOI Build Status Coverage Documentation plotnine is an implementation of a grammar of graphics in Python, it is based

Hassan Kibirige 3.3k Jan 1, 2023
a plottling library for python, based on D3

Hello August 2013 Hello! Maybe you're looking for a nice Python interface to build interactive, javascript based plots that look as nice as all those

Mike Dewar 1.4k Dec 28, 2022
UNMAINTAINED! Renders beautiful SVG maps in Python.

Kartograph is not maintained anymore As you probably already guessed from the commit history in this repo, Kartograph.py is not maintained, which mean

null 1k Dec 9, 2022
Tools for writing, submitting, debugging, and monitoring Storm topologies in pure Python

Petrel Tools for writing, submitting, debugging, and monitoring Storm topologies in pure Python. NOTE: The base Storm package provides storm.py, which

AirSage 247 Dec 18, 2021
The Python ensemble sampling toolkit for affine-invariant MCMC

emcee The Python ensemble sampling toolkit for affine-invariant MCMC emcee is a stable, well tested Python implementation of the affine-invariant ense

Dan Foreman-Mackey 1.3k Jan 4, 2023
The windML framework provides an easy-to-use access to wind data sources within the Python world, building upon numpy, scipy, sklearn, and matplotlib. Renewable Wind Energy, Forecasting, Prediction

windml Build status : The importance of wind in smart grids with a large number of renewable energy resources is increasing. With the growing infrastr

Computational Intelligence Group 125 Dec 24, 2022
Tools for exploratory data analysis in Python

Dora Exploratory data analysis toolkit for Python. Contents Summary Setup Usage Reading Data & Configuration Cleaning Feature Selection & Extraction V

Nathan Epstein 599 Dec 25, 2022
A Python Library for Self Organizing Map (SOM)

SOMPY A Python Library for Self Organizing Map (SOM) As much as possible, the structure of SOM is similar to somtoolbox in Matlab. It has the followin

Vahid Moosavi 497 Dec 29, 2022
:bowtie: Create a dashboard with python!

Installation | Documentation | Gitter Chat | Google Group Bowtie Introduction Bowtie is a library for writing dashboards in Python. No need to know we

Jacques Kvam 753 Dec 22, 2022
Multi-class confusion matrix library in Python

Table of contents Overview Installation Usage Document Try PyCM in Your Browser Issues & Bug Reports Todo Outputs Dependencies Contribution References

Sepand Haghighi 1.3k Dec 31, 2022
Analytical Web Apps for Python, R, Julia, and Jupyter. No JavaScript Required.

Dash Dash is the most downloaded, trusted Python framework for building ML & data science web apps. Built on top of Plotly.js, React and Flask, Dash t

Plotly 17.9k Dec 31, 2022
Debugging, monitoring and visualization for Python Machine Learning and Data Science

Welcome to TensorWatch TensorWatch is a debugging and visualization tool designed for data science, deep learning and reinforcement learning from Micr

Microsoft 3.3k Dec 27, 2022