-
Notifications
You must be signed in to change notification settings - Fork 825
Fix PDBWriter with StringIO for invalid coordinates #2518
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
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
7af3352
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 51624f3
Merge remote-tracking branch 'upstream/develop' into develop
RMeli fa7777e
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 94ac6cc
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 80370af
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 36fa2ea
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 5111103
Merge remote-tracking branch 'upstream/develop' into develop
RMeli ad0c149
Merge remote-tracking branch 'upstream/develop' into develop
RMeli def7c14
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 2d693e3
Merge remote-tracking branch 'upstream/develop' into develop
RMeli f7d5bc6
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 64bcae5
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 2e2561e
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 2184e2b
Merge remote-tracking branch 'upstream/develop' into develop
RMeli de7afcc
Merge remote-tracking branch 'upstream/develop' into develop
RMeli ff4ed8d
Merge remote-tracking branch 'upstream/develop' into develop
RMeli c515e89
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 7d27138
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 3c35af0
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 22def6a
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 93413dc
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 8c5dc00
Merge remote-tracking branch 'upstream/develop' into develop
RMeli ad1766e
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 65e4d66
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 549c1a2
Merge remote-tracking branch 'upstream/develop' into develop
RMeli f527e62
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 4d5f7de
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 1b4c29f
failing test
RMeli 62b18d9
check if file is StringIO
RMeli 432ed4e
changelog
RMeli 70f2971
small change
RMeli 7850ff3
fix typos
RMeli e4520f8
actually check exception message
RMeli 02c7eb4
fix problem with exception catch
RMeli 6efe65a
use pytest match
RMeli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
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.
This is equivalent to
Shouldn't it be the following?
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.
Definitely! Thanks for spotting this problem!
Uh oh!
There was an error while loading. Please reload this page.
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.
The same logic should apply to the previous exception as well, which is suffering from the same problem.
However, this rises a question: should we ignore all the exceptions that can occur while trying
os.removeso that the correct exceptionValueError(which is the problem triggeringos.remove) is thrown instead?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.
We can at least wonder what would be the equivalent of an
os.removeon aStringIO. Now, we have an odd discrepancy in behaviour between files and StringIO. Maybe it should be a different issue?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.
I think the equivalent of
os.removeforStringIOis just getting out of scope. However, it looks like that callingclose()already frees the memory buffer: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.
I guess, then, that the handling is appropriate.