-
Notifications
You must be signed in to change notification settings - Fork 115
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
Fixing __del__
method
#1798
Merged
Merged
Fixing __del__
method
#1798
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
germa89
requested review from
a team and
clatapie
and removed request for
a team
January 23, 2023 18:50
for more information, see https://pre-commit.ci
github-actions
bot
added
Dependencies
Maintenance
General maintenance of the repo (libraries, cicd, etc)
labels
Jan 23, 2023
Please add one of the following labels to add this contribution to the Release Notes 👇 |
Codecov Report
@@ Coverage Diff @@
## main #1798 +/- ##
=========================================
+ Coverage 0 81.82% +81.82%
=========================================
Files 0 44 +44
Lines 0 7709 +7709
=========================================
+ Hits 0 6308 +6308
- Misses 0 1401 +1401 |
germa89
commented
Jan 24, 2023
germa89
commented
Jan 24, 2023
clatapie
approved these changes
Jan 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
BUG
Issue, problem or error in PyMAPDL
Dependencies
Maintenance
General maintenance of the repo (libraries, cicd, etc)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes some issues with the
__del__
method implemented in #1700.Background
Basically I have observed two issues:
__del__
method being called even when themapdl
object hasn't been generated.__del__
method being called when exiting python. This is the normal behaviour, but we should notimport
any module while exiting Python process (which call__del__
).Solution
mapdl.exit
ifmapdl._exited
isFalse
.Future
A following PR should implemente an
exited
method.Close #1796