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

Problem with using pipe operator for units in py3.9+ #687

Closed
rieder opened this issue Oct 17, 2020 · 3 comments
Closed

Problem with using pipe operator for units in py3.9+ #687

rieder opened this issue Oct 17, 2020 · 3 comments
Labels
stale Issues that have been around for a while without updates

Comments

@rieder
Copy link
Member

rieder commented Oct 17, 2020

Python 3.9 and 3.10 have adopted PEPs 584 (1) and 604 (2) respectively. These use the pipe operator, and this might very well collide with our use of the pipe operator for creating quantities.

We will need to find a solution for this relatively soon.

1: https://www.python.org/dev/peps/pep-0584/
2: https://www.python.org/dev/peps/pep-0604/

@rieder
Copy link
Member Author

rieder commented Oct 17, 2020

One obvious solution would be to adopt Astropy's system of units. We have discussed this before and it seems like this would be another reason to do so.
This is of course not ideal for other *muse projects, as we don't want them to depend on astropy.

A hybrid solution could also be an option, where we move to the * operator for creating quantities but still use our own unit system. I'm unsure about the consequences this would have for distinguishing quantities and units though (how is this done in Astropy?).

@spzwart
Copy link
Contributor

spzwart commented Oct 17, 2020 via email

@stale
Copy link

stale bot commented Mar 4, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issues that have been around for a while without updates label Mar 4, 2022
@stale stale bot closed this as completed Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues that have been around for a while without updates
Projects
None yet
Development

No branches or pull requests

2 participants