Skip to content
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

cythonize --no-docstrings #2889

Merged
merged 2 commits into from
Mar 12, 2019
Merged

cythonize --no-docstrings #2889

merged 2 commits into from
Mar 12, 2019

Conversation

mo-han
Copy link
Contributor

@mo-han mo-han commented Mar 9, 2019

Add -D, --no-docstrings option for the cythonize script.

Add `-D, --no-docstrings` option for the cythonize script.
@scoder
Copy link
Contributor

scoder commented Mar 9, 2019

Hmm, while this seems a simple and obvious feature, I just added support for doing that at the C level. When you compile your CPython without docstrings, Cython extensions won't have them either.

I admit that compiling your own CPython is less likely than compiling your Cython extension, though… :)

May I ask what your incentive is for removing docstrings? Is it a size issue?

@mo-han
Copy link
Contributor Author

mo-han commented Mar 9, 2019

Not a size issue definitely. Just need to prevent some of our customers from getting documents (Maybe they didn't pay enough to our boss I guess ;P). I tried to strip all docstrings with this script, and found that I need to do some tweak to it to achieve this goal. So I did the modification to my local copy of cython, and then create a pull-request. Maybe some other guys need it too, though the reasons would vary.

@scoder
Copy link
Contributor

scoder commented Mar 10, 2019 via email

@mo-han mo-han changed the title cythonize -D, --no-docstrings cythonize --no-docstrings Mar 10, 2019
@scoder scoder merged commit 0f3f8bb into cython:master Mar 12, 2019
@scoder scoder added this to the 3.0 milestone Mar 12, 2019
@mo-han
Copy link
Contributor Author

mo-han commented Jun 24, 2020

So it's not in release stream yet? Do I need to modify the local installed copy to use this feature?

@scoder
Copy link
Contributor

scoder commented Jun 24, 2020

This was released in Cython 3.0a1.

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

Successfully merging this pull request may close these issues.

None yet

2 participants