Comments (10)
You need to fill an issue to ghtopdep
, because it requires 0.1.x
version of selectolax
and it's pretty old. Python 3.9 has some breaking changes in API so that's why you can't compile an old version of selecolax on a new Python version. When you compile it locally from the repo, it regenerates all the C code as well.
root@italy:~# docker run -it python:3.9 /bin/bash
root@10291f514fb0:/# pip install selectolax
Collecting selectolax
Downloading selectolax-0.2.12-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.9 MB)
|████████████████████████████████| 1.9 MB 8.5 MB/s
Installing collected packages: selectolax
Successfully installed selectolax-0.2.12
from selectolax.
The easy workaround for your problem is to pip install Cython>=0.29.23
before installing ghtopdep
on a new environment. This will force code regeneration even when you try to install an old version of selectolax.
Line 18 in 386392c
from selectolax.
I faced into it with Python 3.9 on Ubuntu.
from selectolax.
I think you just need to update Cython. There are precompiled binaries for the most common platforms.
from selectolax.
Thanks for your response, I have the latest version of cpython installed (via pip). Here is a reproducible:
Originally reproducible via ghtopdep:
docker run -it python:3.9 /bin/bash
git clone https://github.com/github-tooling/ghtopdep
cd ghtopdep
python setup.py install
pip install -e .
Expected: works
Actual: I get the stack-trace with selectolax/parser.c:9859:60: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’; did you mean ‘tp_dict’?
When building the wheel also on such a Docker container and copying into the other container, installing it, then it works.
docker run -it python:3.9 /bin/bash
git clone --recursive https://github.com/rushter/selectolax
cd selectolax
pip install -r requirements_dev.txt
python setup.py install
python setup.py bdist_wheel
# Copy the following file into the other container, then it works:
# /selectolax/dist/selectolax-0.2.11-cp39-cp39-linux_x86_64.whl
So I would guess, that something when compiling/releasing and publishing to Pypi is not configured correctly. Will investigate further.
from selectolax.
I saw 7e49aff, seems like that could fix it since their changelog contains some related fixed.
from selectolax.
I've made a new release with more builds.
You can also try running python setup.py install --cython
from selectolax.
Is unfortunately still reproducible. These are the reproduce steps:
docker run -it python:3.9 /bin/bash
git clone https://github.com/github-tooling/ghtopdep
cd ghtopdep
python setup.py install
pip install -e .
The error will come in the last pip install -e .
command. I ensured a new Docker container + pinned the version to your recent version to ensure its not a caching problem.
When building selectolax
directly via the repository it works, so there seems still something odd going on with the wheels.
from selectolax.
Yeah in my case this was also during installation of ghtopdep
. I guess we can close the issue if this is about old version of selectolax, because in that case there is nothing to do here, ghtopdep
really needs to just update its dependencies.
from selectolax.
Let me update an upstream issue and thanks @rushter for your effort in upgrading the release infra.
Upstream issue: github-tooling/ghtopdep#15
from selectolax.
Related Issues (20)
- `<!DOCTYPE ...>` is not preserved during parsing HOT 5
- Development of Lexbor HOT 4
- Add support to release Linux aarch64 wheels
- getting the entire tags ia HTMl HOT 1
- Benchmark against google-gumbo based html5-parser HOT 1
- Cannot access member "unwrap_tags" for type "HTMLParser"
- Bug when using replace_with after doing some node.decompose() operations HOT 3
- Using LexborHTMLParser seems to remove some HTML tags HOT 3
- node.text() does not account for </br> HOT 2
- Not work if it has self-closing iframe tag HOT 1
- Text nodes not displayed with `deep=True` HOT 2
- Missing py.typed file for mypy / PEP 561 compliance HOT 4
- Equivalent of find_all_next() HOT 1
- Feature request: print html tag of the node (not including its children) for lexbor engine HOT 2
- Best practice using selectolax together with if and dict HOT 2
- Node.text() does not respect changes from Node.unwrap_tags HOT 17
- Add `content` method
- v3.8.9 typo? HOT 4
- Lexbor engine: Absence of case insensitive search by attribute value HOT 1
- Expose Lexbor fragment parser
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from selectolax.