Skip to content

Fix import failing when using "python -OO"#6299

Merged
martindurant merged 1 commit intodask:masterfrom
jsignell:make-oo-work
Jun 8, 2020
Merged

Fix import failing when using "python -OO"#6299
martindurant merged 1 commit intodask:masterfrom
jsignell:make-oo-work

Conversation

@jsignell
Copy link
Copy Markdown
Member

@jsignell jsignell commented Jun 8, 2020

cc @dask/maintenance

To test: try python -OO -c 'import dask.array' on this branch vs master.

@jsignell jsignell changed the title Don't try to set name on full Fix import failing when using "python -OO Jun 8, 2020
@jsignell jsignell changed the title Fix import failing when using "python -OO Fix import failing when using "python -OO" Jun 8, 2020
@martindurant
Copy link
Copy Markdown
Member

?? optimised functions don't have names ?? :)

So you think it's worth doing a test run for OO, or at least an import check?

@jcrist
Copy link
Copy Markdown
Member

jcrist commented Jun 8, 2020

We used to do this, but stopped since not many people wanted it and it took up a test matrix slot. The code logic is still in our travis setup, it's just not enabled.

@jsignell
Copy link
Copy Markdown
Member Author

jsignell commented Jun 8, 2020

I think it's more like optimized partial functions don't have names. I think this PR is an improvement as I don't think the name is as intended on master anyways:

>>> import dask.array
>>> print(dask.array.full.__name__)
blocked_full

don't really care one way or the other about CI.

@martindurant martindurant merged commit 9283484 into dask:master Jun 8, 2020
@martindurant
Copy link
Copy Markdown
Member

OK :)

@jsignell jsignell deleted the make-oo-work branch June 8, 2020 18:57
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.

importing fails when calling python -OO

3 participants