Skip to content

Instructions for using without import fail on Python 3.10 #102

@ssteinerx

Description

@ssteinerx

https://python-devtools.helpmanual.io/usage/#usage-without-import

Suggests the following snippet:

    __builtins__['debug'] = debug

In python 3.10 (at least, only version tried), referencing builtins directly gives "TypeError: 'module' object is not subscriptable"

builtins.dict, however, is subscriptable.

That figuring out where sitecustomize.py (or usercustomize.py) actually can be put so it gets properly executed on startup on a multi-python and/or brew (linuxbrew) system is an absolute nightmare is a different issue and not one I'd expect python-devtools to address particularly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions