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

PEP 328 import #155

Merged
merged 1 commit into from
Mar 8, 2024
Merged

PEP 328 import #155

merged 1 commit into from
Mar 8, 2024

Conversation

SoapGentoo
Copy link
Contributor

Hi @aminiussi
we have been carrying this patch in Gentoo for ages, and would like to upstream it. The current import statements are still from the Python 2/pre-PEP328 days. In Gentoo, the Boost.MPI python layout looks like:

$ tree /usr/lib/python3.11/site-packages/boost/
/usr/lib/python3.11/site-packages/boost/
├── __init__.py
├── __pycache__
│   ├── __init__.cpython-311.opt-1.pyc
│   ├── __init__.cpython-311.opt-2.pyc
│   └── __init__.cpython-311.pyc
└── mpi.so

2 directories, 5 files

and in order for __init__.py to import the CPython module, you need to use PEP328-style absolute imports on modern python installations.

@SoapGentoo
Copy link
Contributor Author

@aminiussi ping

@aminiussi aminiussi merged commit dea9b5b into boostorg:develop Mar 8, 2024
@aminiussi
Copy link
Member

I accepted the merge to develop. As I do not really use Python myself anymore, I'll merge develop to master after 1.85 so that it can be checked by more knowledgeable.
The change seems safe and python 3.x is the default anyway.

@SoapGentoo SoapGentoo deleted the pep-328-import branch March 8, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants