Skip to content

BUG: Ensure incomplete stata files are deleted #24319

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 1 commit into from
Dec 18, 2018

Conversation

bashtage
Copy link
Contributor

Attempt to delete failed writes and warn if not able to delete

  • closes N/A
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@pep8speaks
Copy link

pep8speaks commented Dec 17, 2018

Hello @bashtage! Thanks for updating the PR.

Comment last updated on December 18, 2018 at 14:21 Hours UTC

@bashtage bashtage force-pushed the stats-file-delete-on-error branch from 00ab182 to 71b1a7f Compare December 17, 2018 14:41
@bashtage
Copy link
Contributor Author

xref #23573

@bashtage bashtage force-pushed the stats-file-delete-on-error branch from 71b1a7f to 926a92c Compare December 17, 2018 15:31
@codecov
Copy link

codecov bot commented Dec 17, 2018

Codecov Report

Merging #24319 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24319   +/-   ##
=======================================
  Coverage   92.28%   92.28%           
=======================================
  Files         162      162           
  Lines       51831    51831           
=======================================
  Hits        47833    47833           
  Misses       3998     3998
Flag Coverage Δ
#multiple 90.69% <ø> (ø) ⬆️
#single 43% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87e9496...926a92c. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 17, 2018

Codecov Report

Merging #24319 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24319   +/-   ##
=======================================
  Coverage   92.28%   92.28%           
=======================================
  Files         162      162           
  Lines       51835    51835           
=======================================
  Hits        47835    47835           
  Misses       4000     4000
Flag Coverage Δ
#multiple 90.68% <ø> (ø) ⬆️
#single 43% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b5058e...6b3f841. Read the comment docs.

@bashtage bashtage force-pushed the stats-file-delete-on-error branch 4 times, most recently from 0c34444 to 60f49a1 Compare December 18, 2018 14:21
@@ -503,6 +504,10 @@ class InvalidColumnName(Warning):
"""


class IOWarning(Warning):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't make a new warning, use UserWarning

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I wanted ResourceWarning but not available in 2.7. Ready for 2.7 to be retired.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, use pandas.compat.ResourceWarning it is defined

@jreback jreback added the IO Stata read_stata, to_stata label Dec 18, 2018
@bashtage bashtage force-pushed the stats-file-delete-on-error branch 2 times, most recently from 5fc4e07 to 6ab4aec Compare December 18, 2018 14:54
Attempt to delete failed writes and warn if not able to delete
@bashtage bashtage force-pushed the stats-file-delete-on-error branch from 6ab4aec to 6b3f841 Compare December 18, 2018 18:04
@bashtage
Copy link
Contributor Author

@jreback This is ready now.

@jreback jreback added this to the 0.24.0 milestone Dec 18, 2018
@jreback jreback merged commit f57c357 into pandas-dev:master Dec 18, 2018
@jreback
Copy link
Contributor

jreback commented Dec 18, 2018

thanks @bashtage

TomAugspurger pushed a commit to TomAugspurger/pandas that referenced this pull request Dec 20, 2018
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
@bashtage bashtage deleted the stats-file-delete-on-error branch March 21, 2019 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Stata read_stata, to_stata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants