Skip to content

gh-76534: Added docs about Embedding with an frozen module limitation. #4910

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

Closed
wants to merge 11 commits into from

Conversation

AraHaan
Copy link
Contributor

@AraHaan AraHaan commented Dec 17, 2017

This should help fix some of the documentation by adding an section for some common mistakes in embedding type situations.

https://bugs.python.org/issue32353

@AraHaan
Copy link
Contributor Author

AraHaan commented Dec 17, 2017

@brettcannon, @rhettinger, @warsaw any of you would like to review these docs?

@brettcannon brettcannon added the docs Documentation in the Doc dir label Dec 19, 2017
@AraHaan
Copy link
Contributor Author

AraHaan commented Dec 20, 2017

Alright added the news entry as well.

@AraHaan
Copy link
Contributor Author

AraHaan commented Jun 2, 2018

@brettcannon Mind finding someone to review this please.

@brettcannon
Copy link
Member

@AraHaan the problem is I have no embedding experience so I'm not in a good position to know if the documented solution is accurate enough. I would ask on python-dev for a reviewer.

@AraHaan
Copy link
Contributor Author

AraHaan commented Dec 15, 2020

@birkenfeld any status yet?

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Aug 13, 2022
@AraHaan
Copy link
Contributor Author

AraHaan commented Aug 13, 2022

Any new inputs to this?

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Aug 14, 2022
Copy link
Contributor

@slateny slateny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some grammatical/formatting changes - can't review the contents that well as I have no experience with it.

============================================

While it is possible to use frozen modules in embedded python if the main module
is also frozen. It seems people are bitten when they don't have their main module
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by 'bitten'? I think it's better to use direct language and be clear on what the problem might be.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in when they try to run it, it won't work properly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific exception/error that appears, or does it do something like hang?

Copy link
Contributor Author

@AraHaan AraHaan Oct 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it crashes or errors.

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Feb 18, 2023
@AraHaan
Copy link
Contributor Author

AraHaan commented Feb 19, 2023

Anything else I have to add to this?

@AraHaan
Copy link
Contributor Author

AraHaan commented Feb 19, 2023

I wonder if the logic I wrote before could apply to cases where you might want to freeze the entire standard library into an embedded interpreter. I could see some use cases for that as well.

Edit: Now that I think about it, why can't the entire standard library be frozen by default as well (the ci running the freezing steps on all of the standard library before it compiles [lib]pythonX.Y.[dll/so/dylib]?

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Feb 20, 2023
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Apr 11, 2023
@arhadthedev arhadthedev changed the title bpo-32353: Added docs about Embedding with an frozen module limitation. gh-76534: Added docs about Embedding with an frozen module limitation. Apr 11, 2023
@arhadthedev
Copy link
Member

@erlend-aasland @gvanrossum @kumaraditya303 (as the ones related to Tools/freeze) could you review and possibly merge this PR, please?

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads more like a blog post than a piece of official documentation (even if some other sections in the same file also are written in a pretty informal style). I don't think it is ready to be included.

Alas, I don't have the time to research the root cause of the problem for which it is proposing a solution, so I can't really say whether I even approve of the proposed code snippets. Therefore, I don't want to create the impression that if the language could be cleaned up it would be acceptable. Sorry, but this just needs a lot more work.

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Apr 12, 2023
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label May 13, 2023
@gvanrossum gvanrossum closed this May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants