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

Removed a manual file handler pitfall #22410

Merged
merged 1 commit into from Nov 4, 2021
Merged

Conversation

NaelsonDouglas
Copy link
Contributor

@NaelsonDouglas NaelsonDouglas commented Nov 2, 2021

The problem
There was a case where the code was using a manual file handler pitfall, where a file stream was being opened and closed manually. But since Python supports automatic stream closing using the block 'with', its better to use it instead of the manual close in order to remove a bug vector.

Solution
Refactored the code to remove the manual file handler

Release Notes

  • other
    • manual file-hander pitfall was removed

@sympy-bot
Copy link

sympy-bot commented Nov 2, 2021

Hi, I am the SymPy bot (v162). 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:

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

Click here to see the pull request description that was parsed.
**The problem**
There was a case where the code was using a manual file handler pitfall, where a file stream was being opened and closed manually. But since Python supports automatic stream closing using the block 'with', its better to use it instead of the manual close in order to remove a bug vector.

**Solution**
Refactored the code to remove the manual file handler

#### Release Notes
<!-- BEGIN RELEASE NOTES -->
* other
    * manual file-hander pitfall was removed
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@github-actions
Copy link

github-actions bot commented Nov 3, 2021

Benchmark results from GitHub Actions

Lower numbers are good, higher numbers are bad. A ratio less than 1
means a speed up and greater than 1 means a slowdown. Green lines
beginning with + are slowdowns (the PR is slower then master or
master is slower than the previous release). Red lines beginning
with - are speedups.

Significantly changed benchmark results (PR vs master)

Significantly changed benchmark results (master vs previous release)

       before           after         ratio
     [907895ac]       [d04fa466]
+     6.84±0.01ms       10.3±0.5ms     1.51  matrices.TimeMatrixPower.time_Case1
-      4.13±0.01s          260±3ms     0.06  polygon.PolygonArbitraryPoint.time_bench01

Full benchmark results can be found as artifacts in GitHub Actions
(click on checks at the top of the PR).

@smichr
Copy link
Member

smichr commented Nov 4, 2021

The release notes section of the OP was mangled; it has been fixed.

@smichr smichr merged commit b0243de into sympy:master Nov 4, 2021
@smichr
Copy link
Member

smichr commented Nov 4, 2021

Thanks. It's in.

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

3 participants