Skip to content

Use environment variable TYPEGUARD_DISABLE to disable typeguard.#475

Open
tage64 wants to merge 2 commits into
agronholm:masterfrom
tage64:master
Open

Use environment variable TYPEGUARD_DISABLE to disable typeguard.#475
tage64 wants to merge 2 commits into
agronholm:masterfrom
tage64:master

Conversation

@tage64

@tage64 tage64 commented Jul 31, 2024

Copy link
Copy Markdown

Changes

Setting the environment variable TYPEGUARD_DISABLE disables Typeguard and has the same effect as running Python with the -O flag.

I wanted to compile my Python program with Nuitka which removes the source code so that the inspect module doesn't work. However, I did not want to disable all assertians with the -O flag.

Checklist

  • You've added tests (in tests/) added which would fail without your patch
  • You've updated the documentation (in docs/, in case of behavior changes or new
    features)
  • You've added a new changelog entry (in docs/versionhistory.rst).

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 94.458% (-0.05%) from 94.511%
when pulling 859a611 on tage64:master
into b6a7e43 on agronholm:master.

@JohannesK71083

Copy link
Copy Markdown
Contributor

@agronholm Why isn't this merged yet? Is there a problem/conflict/etc. with this PR?

@agronholm

Copy link
Copy Markdown
Owner

Because 1) I have plenty of other projects to maintain too, 2) I want to understand the feature and decide if I want it and if the it's the right approach.

@JohannesK71083

Copy link
Copy Markdown
Contributor

Ok, I just wanted to know if there is any work to do to make this PR acceptable. Apparently not at this moment, thanks for the reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants