-
Notifications
You must be signed in to change notification settings - Fork 111
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
Move code from boost.* to boost_adaptbx.*, #458 #470
Conversation
obtained via find . -type f -name "*.py" -print0 | xargs -0 sed -i 's/boost\.python/boost_adaptbx.python/g' find . -type f -name "*.py" -print0 | xargs -0 sed -i 's/boost\.optional/boost_adaptbx.optional/g' find . -type f -name "*.py" -print0 | xargs -0 sed -i 's/boost\.std_pair/boost_adaptbx.std_pair/g' find . -type f -name "*.py" -print0 | xargs -0 sed -i 's/boost\.rational/boost_adaptbx.rational/g' find . -type f -name "*.py" -print0 | xargs -0 sed -i 's/boost\.tuple/boost_adaptbx.tuple/g' find . -type f -name "*.py" -print0 | xargs -0 sed -i 's/from boost import/from boost_adaptbx import/g' git checkout boost and fixing one test in boost_adaptbx/tests/tst_rational.py
Ran tests for scitbx, libtbx, iotbx, cctbx, rstbx before and after changeset. |
will merge this next week if no objections |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think dumping everything into the main boost_adaptbx
directory will make it messy in the future to add additional Boost components. And any file reorganization will require another round of API changes which is not helpful. Please retain the old boost_adaptbx/boost
file structure that was discussed in #458 so that the mapping of Boost components matches boost_adaptbx.boost.<component>
. And once this is agreed upon, we should have an additional week before this is merged so that all developers can make the relevant changes to their repositories without having DeprecationWarnings
show up everywhere.
Hmm. Are you really, really sure about this? I would just like to point out that what you call "messiness" in the This "cleanliness" will come at a high price though; Instead of import boost_adaptbx.python
boost_adaptbx.python.something we have to write import boost_adaptbx.boost.python
boost_adaptbx.boost.python.something everywhere. In contrast, the Personally, I find redundancy in the import namespace name quite annoying and redundant and I'm very much onboard with PEP 20 on this:
As for the |
That is not quite true. If people want to shorten it, they can do what
I made updates to your branch in |
I offered to address this in this PR and was waiting for an answer to my question for the past three months. I don't see why you needed to open a new PR. |
Sorry, I did not think you wanted to make the changes since it sounded like you were arguing that adding 6 kB of "boost" to a 214 MB repository (110 MB without the .git directory) was too much. It was also not clear how it translates to extra effort since the changes are done programmatically as a search and replace. I made a new branch since I wanted to keep your contributions but not modify your existing branch, so I made a new pull request. |
provide redirects that throw a
FutureWarning
on import to aid inmigration.
boost.python.injector
was not migrated as it is deprecated anyway(#386). The
DeprecationWarning
was upgraded to aFutureWarning
instead.This is step 1 towards resolving the boost python namespace conflict (#458).
I will prepare a changeset for existing code in
cctbx_project
as well.