Skip to content

document disabling byte-code writing via conftest #1680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RonnyPfannschmidt opened this issue Jun 27, 2016 · 6 comments
Closed

document disabling byte-code writing via conftest #1680

RonnyPfannschmidt opened this issue Jun 27, 2016 · 6 comments
Labels
good first issue easy issue that is friendly to new contributor status: help wanted developers would like help from experts on this topic type: docs documentation improvement, missing or needing clarification

Comments

@RonnyPfannschmidt
Copy link
Member

when developing projects that are subject to change,
its easy to forget to remove stale pyc files,

thus i propose adding a ini option that sets sys.dont_write_bytecode before importing the first conftest

[pytest]
dont_write_bytecode = true
@RonnyPfannschmidt RonnyPfannschmidt added type: enhancement new feature or API change, should be merged into features branch status: help wanted developers would like help from experts on this topic type: proposal proposal for a new feature, often to gather opinions or design the API around the new feature good first issue easy issue that is friendly to new contributor labels Jun 27, 2016
@nicoddemus
Copy link
Member

Hey Ronny, in which situations one would get stale .pyc files? Python doesn't take care of that automatically?

@RonnyPfannschmidt
Copy link
Member Author

delete a module, have a pyc around, imports wont fail

@nicoddemus
Copy link
Member

Ohhh I see, thanks.

Couldn't the user just call that at the top of the root contest file?

@RonnyPfannschmidt
Copy link
Member Author

experimenting with that now, we might want to document it

@SanketDG
Copy link

SanketDG commented Jul 2, 2016

@RonnyPfannschmidt I would be interested in doing this.

Do we want to implement this as a ini setting? Or just document it?

@RonnyPfannschmidt
Copy link
Member Author

it should be documented for use with conftest

@RonnyPfannschmidt RonnyPfannschmidt changed the title add ini option to disable the writing of bytecode document disabling byte-code writing via conftest Jul 2, 2016
@nicoddemus nicoddemus added Hacktoberfest type: docs documentation improvement, missing or needing clarification and removed type: enhancement new feature or API change, should be merged into features branch type: proposal proposal for a new feature, often to gather opinions or design the API around the new feature labels Sep 28, 2017
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Feb 26, 2019
Also changed how the section is presented: instead of "Note" blocks, use proper
sections as those contain enough information to exist on their own.

Fix pytest-dev#1680
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Feb 26, 2019
Also changed how the section is presented: instead of "Note" blocks, use proper
sections as those contain enough information to exist on their own.

Fix pytest-dev#1680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue easy issue that is friendly to new contributor status: help wanted developers would like help from experts on this topic type: docs documentation improvement, missing or needing clarification
Projects
None yet
Development

No branches or pull requests

3 participants