-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
Travis 3.6 Slow Build Test Failures - BS4 Issue #29622
Comments
duplicate of #28125 |
Bumped into this as well, downgrading to beautifulsoup4 4.7.1 fixed it for me. |
would really really like to fix / xfail this test. ! cc @alimcmaster1 |
take |
This was brought to my attention through Beautiful Soup bug 1857765. I've fixed the problem on the Beautiful Soup side in revision 533. However, in normal usage Tag.attrs should never be None. Looking at the test that's failing I think there's a problem in pandas code, though the fix isn't obvious to me. This code iterates over a list of tables and calls Once you decompose() a In general, once you call Since you're only adding I could change the behavior of |
Thanks very much @leonardr for taking a look into this. I agree with you we should look into this on the pandas side. Ill take a look and reply back on here I can confirm your change in revision 553 fix our test on master. https://bazaar.launchpad.net/~leonardr/beautifuI lsoup/bs4/revision/553 @jreback I have xfailed our tests for now and then will remove when beautifulsoup changes are released: see PR #30544 @leonardr would be much appreciated if you ping us on here when you aim to next release |
I can do a release once we figure out how to deal with the underlying situation -- a Tag might have been decomposed and there's no way to tell. |
Agree thanks for the detailed explanation above. Defer to you really on how you want to handle this and we can update the pandas code accordingly.
Could bs4 provide functionality to safely iterate over a list? Might be easier than callers handling a flag? Otherwise the flag approach to identify if |
Iterating over a list isn't dangerous per se; the problem happens when you try to take an action on a decomposed PageElement. That can happen any time you decompose a tag you've assigned to a variable. While working out a solution I noticed that I may still need to change Beautiful Soup, since there's no way to tell whether a |
@alimcmaster1 do you know what all remains to be done on pandas' side here? Pushing off the 1.0 milestone, as I don't think there's anything critical, but I haven't been following closely. |
Agree nothing critical @TomAugspurger i can follow up shortly with the fix @leonardr suggested and hence remove the xfail added in #30544 |
FYI I just released Beautiful Soup 4.9.0 with the fix discussed in this issue. |
Awesome thanks vm!! @leonardr |
test_thousands_macau_index_col
intest_html
fails using beautifulsoup4 version 4.8.1 and passes using version 4.7.1.Example failures:
https://travis-ci.org/pandas-dev/pandas/jobs/611742966
As pointed out by @jreback in this PR - #29603
Example failing build pre my changes in #29513
https://travis-ci.org/pandas-dev/pandas/jobs/611347428
Attempting to debug issue and will report to bs4. Should we pin in the meantime to version <= 4.7.1?
The text was updated successfully, but these errors were encountered: