Skip to content

Support absolute paths in import completion skip list #968

Closed

Description

@jgspratt

I get the high CPU from file scanning mentioned in #845 and #806 .

This surprised me because it must have started after an update and the first symptom was my CPU fan spinning on my MBP.

Is there any way to disable this scanning in my home dir? As another user mentioned, it's common to open bpython in the home dir, and people often have many repos checked out below their home dir.

A config option in the config file? A dot-file? Something in the .python-profile.py?

Is there any way to to this today? If not, I would like to request the feature.

# bpython
bpython version 0.23 on top of Python 3.10.6 /usr/local/opt/[email protected]/bin/python3.10
Running profile from ~/.python-profile.py
.python-profile.py loaded.

Activity

  1. sebastinas commented on Aug 30, 2022

    @sebastinas
    Contributor

    You can change import_completion_skiplist. Per default it's .git:.svn.hg:.config:.local:.share:node_modules:PlayOnLinux's virtual drives:dosdevices:__pycache__. If we are missing something there, I'm happy to add more.

  2. jgspratt commented on Aug 30, 2022

    @jgspratt
    Author

    I'll try it. Could you document that on https://docs.bpython-interpreter.org/en/latest/configuration.html ?

    Do I use the [general] section?

  3. sebastinas commented on Aug 30, 2022

    @sebastinas
    Contributor

    It is and it's already documented at https://github.com/bpython/bpython/blob/main/doc/sphinx/source/configuration-options.rst#import_completion_skiplist. The live copy needs an update for the current version.

  4. jgspratt commented on Aug 30, 2022

    @jgspratt
    Author

    I just excluded every dir in my home dir and it seems to have worked.

    Does it support absolute paths? If so, could I exclude /Users/jgs and have the same result?

  5. sebastinas commented on Aug 31, 2022

    @sebastinas
    Contributor

    It doesn't at the moment,. So let's keep this bug open until it also supports absolute paths.

  6. changed the title [-]How to disable file scanning on startup?[/-] [+]Support absolute paths in import completion skip list[/+] on Aug 31, 2022
  7. added this to the New features milestone on Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions