Skip to content

Comments

chore(python): Print Python interpreter version#3118

Merged
waynexia merged 2 commits intoGreptimeTeam:mainfrom
tisonkun:print-py-version
Jan 9, 2024
Merged

chore(python): Print Python interpreter version#3118
waynexia merged 2 commits intoGreptimeTeam:mainfrom
tisonkun:print-py-version

Conversation

@tisonkun
Copy link
Collaborator

@tisonkun tisonkun commented Jan 8, 2024

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This relates to #3117 for improving user experience.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Refer to a related PR or issue link (optional)

Signed-off-by: tison <wander4096@gmail.com>
@github-actions github-actions bot added docs-required This change requires docs update. size/xs labels Jan 8, 2024
@github-actions github-actions bot added docs-not-required This change does not impact docs. and removed docs-required This change requires docs update. labels Jan 8, 2024
@tisonkun
Copy link
Collaborator Author

tisonkun commented Jan 8, 2024

@discord9 also I noticed that we have both pyo3 and rustpython for interop. What's the difference and why do we maintain two solutions?

@codecov
Copy link

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (122b472) 85.71% compared to head (d5797bc) 85.17%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3118      +/-   ##
==========================================
- Coverage   85.71%   85.17%   -0.54%     
==========================================
  Files         812      812              
  Lines      132958   133035      +77     
==========================================
- Hits       113964   113318     -646     
- Misses      18994    19717     +723     

@waynexia waynexia requested review from discord9 and waynexia January 9, 2024 03:38
Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

Can you also add this for rustpython interpreter? At src/script/src/python/rspython/copr_impl.rs

@tisonkun
Copy link
Collaborator Author

tisonkun commented Jan 9, 2024

@waynexia I'm thinking of this. Will take a look. May you take a look at #3118 (comment)?

@waynexia
Copy link
Member

waynexia commented Jan 9, 2024

What's the difference and why do we maintain two solutions?

The original purpose is to support different backends. For an inappropriate example, you can think of this as PG and MySQL protocols.

These two implementations also have some slight differences. Like GIL or runtime requirement. I don't think they are in conflict but a supplement to each other.

@discord9
Copy link
Contributor

discord9 commented Jan 9, 2024

@discord9 also I noticed that we have both pyo3 and rustpython for interop. What's the difference and why do we maintain two solutions?

Backend RustPython CPython
GIL No Yes(ish, pyo3 still have gil api for now)
need extra dyn lib(i.e. libpython3.xx) to run No Yes
Can use external Python Package(i.e. numpy) No Yes

So the idea is that RustPython can support simple scripting without extra setup, and cpython impl can use external python library

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Collaborator Author

tisonkun commented Jan 9, 2024

Thank you @waynexia & @discord9! Updated for RustPython.

@github-actions github-actions bot added Size: S and removed size/xs labels Jan 9, 2024
@tisonkun tisonkun requested a review from waynexia January 9, 2024 04:49
@tisonkun tisonkun changed the title chore(pyo3_backend): Print bundle Python interpreter version chore(python): Print Python interpreter version Jan 9, 2024
Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @tisonkun

Copy link
Contributor

@discord9 discord9 left a comment

Choose a reason for hiding this comment

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

LGTM

@waynexia waynexia enabled auto-merge January 9, 2024 06:55
@tisonkun
Copy link
Collaborator Author

tisonkun commented Jan 9, 2024

It seems we need one more explicit approval. @discord9 could you tick one?

@waynexia waynexia added this pull request to the merge queue Jan 9, 2024
Merged via the queue into GreptimeTeam:main with commit 0db1861 Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required This change does not impact docs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants