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

Don't call get_sympy_dir() at import time #17180

Merged
merged 1 commit into from Jul 13, 2019
Merged

Conversation

asmeurer
Copy link
Member

This was causing issues with pyoxidizer because of the use of __file__, but this shouldn't be done at import time anyway.

References to other Issues or PRs

Brief description of what is fixed or changed

Other comments

Release Notes

  • utilities
    • remove sympy_dir variable from sympy.utilities.runtests. Use get_sympy_dir() instead (note that this is not really public API).

@sympy-bot
Copy link

sympy-bot commented Jul 12, 2019

Hi, I am the SymPy bot (v147). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • utilities
    • remove sympy_dir variable from sympy.utilities.runtests. Use get_sympy_dir() instead (note that this is not really public API). (#17180 by @asmeurer)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.5.

Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it.

Click here to see the pull request description that was parsed.

<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

This was causing issues with pyoxidizer because of the use of `__file__`, but this shouldn't be done at import time anyway. 

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234". See
https://github.com/blog/1506-closing-issues-via-pull-requests . Please also
write a comment on that issue linking back to this pull request once it is
open. -->


#### Brief description of what is fixed or changed


#### Other comments


#### Release Notes

<!-- Write the release notes for this release below. See
https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information
on how to write release notes. The bot will check your release notes
automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* utilities
  * remove `sympy_dir` variable from `sympy.utilities.runtests`. Use `get_sympy_dir()` instead (note that this is not really public API).
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@codecov
Copy link

codecov bot commented Jul 12, 2019

Codecov Report

Merging #17180 into master will decrease coverage by 0.012%.
The diff coverage is 50%.

@@              Coverage Diff              @@
##            master    #17180       +/-   ##
=============================================
- Coverage   74.521%   74.509%   -0.013%     
=============================================
  Files          623       623               
  Lines       161546    161545        -1     
  Branches     37910     37910               
=============================================
- Hits        120387    120366       -21     
- Misses       35819     35840       +21     
+ Partials      5340      5339        -1

@oscarbenjamin
Copy link
Contributor

I saw a recent post on another mailing list about pyoxidiser. Are you trying to get it to work so SymPy can be a standalone application? Or is this for including SymPy as part of another application?

@asmeurer
Copy link
Member Author

Someone at SciPy mentioned it, and we were looking at it and tested it on SymPy. This was something that caused an issue, and seemed like something that shouldn't be happening anyway, since it slows down the import time. I don't actually have a use-case myself for trying to create an executable from SymPy, although I know others have tried other tools like pyinstaller and it fails (#16865).

@smichr smichr merged commit 8e60957 into sympy:master Jul 13, 2019
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.

None yet

4 participants