Coder Social home page Coder Social logo

Contribution clarification about curl_cffi HOT 3 CLOSED

yifeikong avatar yifeikong commented on May 19, 2024
Contribution clarification

from curl_cffi.

Comments (3)

yifeikong avatar yifeikong commented on May 19, 2024 1

You can export as many as you like, I don’t see any side effect here. Just make sure they are grouped in the correct category.

from curl_cffi.

yifeikong avatar yifeikong commented on May 19, 2024

Yes, the const.py is generated by generate_consts.py. Actually, this file should be called when building the wheel to generate const.py, and const.py should not stay in the source. However, due to limitations on Windows, const.py is kept for convenience.

from curl_cffi.

nicoandmee avatar nicoandmee commented on May 19, 2024

Yes, the const.py is generated by generate_consts.py. Actually, this file should be called when building the wheel to generate const.py, and const.py should not stay in the source. However, due to limitations on Windows, const.py is kept for convenience.

Ah yes I got that. But I'm wondering, if there is more work to be done in generate_consts.py.. For example- You have a TODO mentioned referring to CURL_ERROR_SIZE. This declaration is inside curl.h:

#define CURL_ERROR_SIZE 256

It seems we can get it along with all other #define declarations, in this way:

cat '/usr/include/curl/curl.h' | grep -i "#define.*" | grep -i "CURL" | awk 'xor(/\s[0-9].*/,/<</)' | sed 's/\/\*\s*.*//'

Then I can add wrappers in generate_const.py, like a class CurlError(IntEnum), class CurlProto(IntEnum), etc accordingly. But I'm not sure if this is a good idea, so I'd like your opinion 😄

from curl_cffi.

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.