Skip to content
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

Destructive modification of sys.argv on import tables #405

Closed
rmcgibbo opened this issue Dec 1, 2014 · 1 comment
Closed

Destructive modification of sys.argv on import tables #405

rmcgibbo opened this issue Dec 1, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@rmcgibbo
Copy link

rmcgibbo commented Dec 1, 2014

In trying to debug a very odd failure of my script where one of arguments was being removed from sys.argv, I found that the root cause is that pytables removes the flag --heavy from sys.argv purely due to import tables in a user script.

import tables triggers from tables.tests import print_versions, test, on line 133 of tables/__init__.py, which further triggers from tables.tests.test_all import print_versions, test, suite, and then from tables.tests import common.

The result is that this line gets executed, which removes --heavy from sys.argv, purely by importing tables:
https://github.com/PyTables/PyTables/blob/develop/tables/tests/common.py#L56-L58

@avalentino avalentino added this to the 3.2 milestone Dec 1, 2014
@avalentino avalentino self-assigned this Dec 1, 2014
@avalentino
Copy link
Member

Hi @rmcgibbo,
thanks for reporting.
I will fix it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants