Giter VIP home page Giter VIP logo

Comments (10)

rushter avatar rushter commented on May 31, 2024 2

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.

rushter avatar rushter commented on May 31, 2024 1

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.

try:

from selectolax.

mxschmitt avatar mxschmitt commented on May 31, 2024

I faced into it with Python 3.9 on Ubuntu.

from selectolax.

rushter avatar rushter commented on May 31, 2024

I think you just need to update Cython. There are precompiled binaries for the most common platforms.

from selectolax.

mxschmitt avatar mxschmitt commented on May 31, 2024

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.

mxschmitt avatar mxschmitt commented on May 31, 2024

I saw 7e49aff, seems like that could fix it since their changelog contains some related fixed.

from selectolax.

rushter avatar rushter commented on May 31, 2024

I've made a new release with more builds.
You can also try running python setup.py install --cython

from selectolax.

mxschmitt avatar mxschmitt commented on May 31, 2024

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.

ostrolucky avatar ostrolucky commented on May 31, 2024

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.

mxschmitt avatar mxschmitt commented on May 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.