Skip to content

python3Packages.beautifulsoup4: remove lxml dependency on Darwin - #138059

Closed
YorikSar wants to merge 1 commit into
NixOS:masterfrom
YorikSar:bs4-lxml-fix
Closed

YorikSar wants to merge 1 commit into
NixOS:masterfrom
YorikSar:bs4-lxml-fix

Conversation

@YorikSar

Copy link
Copy Markdown
Contributor
Motivation for this change

It seems lxml is misbehaving on Darwin which leads to bs4 tests failing

Fixes #137678

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

It seems lxml is misbehaving on Darwin which leads to bs4 tests failing

Fixes NixOS#137678
@ofborg ofborg Bot added the 6.topic: darwin Running or building packages on Darwin label Sep 15, 2021
@YorikSar

Copy link
Copy Markdown
Contributor Author

@fabaff @SuperSandro2000 Since you were involved in #137273, could you please take a look at this?

@github-actions github-actions Bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Sep 15, 2021
@risicle

risicle commented Sep 16, 2021 •

Copy link
Copy Markdown
Contributor

See also #137870, another proposed solution to this.

I'm not sure which is more divergent. cc @emilazy

@emilazy

emilazy commented Sep 16, 2021

Copy link
Copy Markdown
Member

lxml is the recommended parser on Beautiful Soup's website and the only supported XML parser, so this would be a significant functionality downgrade, but it might be better to reduce functionality if adding dependencies to libxml2 is considered undesirable. I think it would be preferable to just disable the libiconv-requiring Beautiful Soup tests rather than drop the dependency entirely if we don't want to support the full functionality, though.

@SuperSandro2000

Copy link
Copy Markdown
Member

We are not doing such hackery. The other proposed PR is the right solution.

@risicle

risicle commented Sep 16, 2021

Copy link
Copy Markdown
Contributor

"Thank you for your submission, but in this case I think we're going to go with another solution"

@YorikSar
YorikSar deleted the bs4-lxml-fix branch September 17, 2021 06:04
@YorikSar

Copy link
Copy Markdown
Contributor Author

@emilazy While that is true, this package didn't use lxml until latest version bump, and in that bump lxml dependency specifically broke build on Darwin.

@SuperSandro2000 @risicle I thought it might still be better to land this small change to make this package work until stdenv patch lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 6.topic: python Python is a high-level, general-purpose programming language.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python3Packages.beautifulsoup4 fails to build on Darwin

4 participants