Skip to content

CLN: remove merge-pr script, clean Exception in tm, doc #28442

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 4 commits into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/user_guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4845,7 +4845,7 @@ The above example creates a partitioned dataset that may look like:
from shutil import rmtree
try:
rmtree('test')
except Exception:
except OSError:
pass

.. _io.sql:
Expand Down
5 changes: 1 addition & 4 deletions pandas/tests/groupby/aggregate/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,7 @@ def test_agg_consistency():
# agg with ([]) and () not consistent
# GH 6715
def P1(a):
try:
return np.percentile(a.dropna(), q=1)
except Exception:
return np.nan
return np.percentile(a.dropna(), q=1)

df = DataFrame(
{
Expand Down
1 change: 1 addition & 0 deletions pandas/tests/test_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def test_dask(df):
assert ddf.compute() is not None


@pytest.mark.filterwarnings("ignore:Panel class is removed")
Copy link
Member

Choose a reason for hiding this comment

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

Was this not causing CI failures before? Thought we failed on warnings like this

Copy link
Member Author

Choose a reason for hiding this comment

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

this is showing up locally

Copy link
Member

Choose a reason for hiding this comment

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

This should not be needed with latest xarray I suppose

def test_xarray(df):

xarray = import_module("xarray") # noqa
Expand Down
9 changes: 5 additions & 4 deletions pandas/util/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def ensure_clean(filename=None, return_filelike=False):
finally:
try:
os.close(fd)
except Exception:
except OSError:
print(
"Couldn't close file descriptor: {fdesc} (file: {fname})".format(
fdesc=fd, fname=filename
Expand All @@ -520,7 +520,7 @@ def ensure_clean(filename=None, return_filelike=False):
try:
if os.path.exists(filename):
os.remove(filename)
except Exception as e:
except OSError as e:
print("Exception on removing file: {error}".format(error=e))


Expand All @@ -539,7 +539,7 @@ def ensure_clean_dir():
finally:
try:
rmtree(directory_name)
except Exception:
except OSError:
pass


Expand Down Expand Up @@ -2675,7 +2675,8 @@ class for all warnings. To check that no warning is returned,
for m in clear:
try:
m.__warningregistry__.clear()
except Exception:
except AttributeError:
# module may not have __warningregistry__
pass

saw_warning = False
Expand Down
Loading