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

CLN: Dead version checking code post minimum version bump #27063

Merged
merged 9 commits into from
Jun 27, 2019

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke added this to the 0.25.0 milestone Jun 26, 2019
if LooseVersion(bs4.__version__) <= LooseVersion('4.2.0'):
raise ValueError("A minimum version of BeautifulSoup 4.2.1 "
"is required")
minimum_bs4_version = VERSIONS['bs4']
Copy link
Contributor

Choose a reason for hiding this comment

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

Does bs4 = import_optional_dependency('bs4') work here? I don't recall why I didn't use it.

Copy link
Member Author

@mroeschke mroeschke Jun 26, 2019

Choose a reason for hiding this comment

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

So this actually done above:

def _importers():
    # import things we need
    # but make this done on a first use basis

    global _IMPORTS
    if _IMPORTS:
        return

    global _HAS_BS4, _HAS_LXML, _HAS_HTML5LIB
    bs4 = import_optional_dependency("bs4", raise_on_missing=False,
                                     on_version="ignore")
    _HAS_BS4 = bs4 is not None

But I think you're right; bs4 = import_optional_dependency('bs4') can be called here again with the raising behavior.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah so this wasn't changed because import_optional_dependency will raise a ImportError while this path raises a ValueError (there's a test for this).

I think it's worth changing to an ImportError. Thoughts @TomAugspurger?

@codecov
Copy link

codecov bot commented Jun 26, 2019

Codecov Report

Merging #27063 into master will decrease coverage by 50.18%.
The diff coverage is 25%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #27063       +/-   ##
===========================================
- Coverage   92.04%   41.86%   -50.19%     
===========================================
  Files         180      180               
  Lines       50713    50711        -2     
===========================================
- Hits        46680    21230    -25450     
- Misses       4033    29481    +25448
Flag Coverage Δ
#multiple ?
#single 41.86% <25%> (-0.09%) ⬇️
Impacted Files Coverage Δ
pandas/io/pytables.py 89.37% <ø> (-0.94%) ⬇️
pandas/io/html.py 20.35% <25%> (-73.94%) ⬇️
pandas/io/formats/latex.py 0% <0%> (-100%) ⬇️
pandas/io/gcs.py 0% <0%> (-100%) ⬇️
pandas/io/sas/sas_constants.py 0% <0%> (-100%) ⬇️
pandas/core/groupby/categorical.py 0% <0%> (-100%) ⬇️
pandas/tseries/plotting.py 0% <0%> (-100%) ⬇️
pandas/tseries/converter.py 0% <0%> (-100%) ⬇️
pandas/io/s3.py 0% <0%> (-100%) ⬇️
pandas/io/formats/html.py 0% <0%> (-99.37%) ⬇️
... and 134 more

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 ff50b46...124b2c5. Read the comment docs.

@codecov
Copy link

codecov bot commented Jun 26, 2019

Codecov Report

Merging #27063 into master will decrease coverage by 0.2%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #27063      +/-   ##
==========================================
- Coverage   92.04%   91.84%   -0.21%     
==========================================
  Files         180      180              
  Lines       50714    50728      +14     
==========================================
- Hits        46680    46590      -90     
- Misses       4034     4138     +104
Flag Coverage Δ
#multiple 90.48% <100%> (-0.2%) ⬇️
#single 41.89% <0%> (-0.08%) ⬇️
Impacted Files Coverage Δ
pandas/io/pytables.py 90.33% <ø> (+0.03%) ⬆️
pandas/io/html.py 94.24% <100%> (-0.06%) ⬇️
pandas/compat/pickle_compat.py 63.88% <0%> (-12.5%) ⬇️
pandas/io/gbq.py 88.88% <0%> (-11.12%) ⬇️
pandas/core/sparse/series.py 88.99% <0%> (-5.92%) ⬇️
pandas/core/indexes/period.py 90.43% <0%> (-2.16%) ⬇️
pandas/core/indexes/datetimes.py 94.23% <0%> (-2.15%) ⬇️
pandas/core/sparse/frame.py 93.56% <0%> (-2.07%) ⬇️
pandas/core/panel.py 16.09% <0%> (-1.71%) ⬇️
pandas/core/series.py 92.23% <0%> (-1.44%) ⬇️
... and 18 more

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 d94146c...33259db. Read the comment docs.

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jun 26, 2019 via email

@jreback
Copy link
Contributor

jreback commented Jun 27, 2019

lgtm, checks are failing, ping on green.

else:
timezones = ['UTC', 'Asia/Tokyo', 'US/Eastern',
'dateutil/America/Los_Angeles']
timezones = ['UTC', 'Asia/Tokyo', 'US/Eastern',
Copy link
Contributor

Choose a reason for hiding this comment

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

prob should use our fixture for these (future PR)

@jreback
Copy link
Contributor

jreback commented Jun 27, 2019

home/vsts/work/1/s/doc/source/whatsnew/v0.25.0.rst:828: WARNING: Unknown interpreted text role "method".

doc-warning

@jreback jreback merged commit 08a599b into pandas-dev:master Jun 27, 2019
@mroeschke mroeschke deleted the clean_dateutil_version_tests branch June 27, 2019 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants