scipy / weave

Weave - tools for including C/C++ code within Python code.
https://pypi.org/project/scipy-weave/
Other
55 stars 27 forks source link

Weave adapted to work with Python 3.4 #1

Closed ijstokes closed 1 year ago

ijstokes commented 9 years ago

This PR is the start of work to adapt Weave to work with Python 2.7 and Python 3.4 (as a minimum). The work done in this PR to date is very preliminary and only aims to evaluate the minimum set of modifications required to make runtest.py execute. It currently runs (in Python 3.4 only) but every test fails.

stefanv commented 9 years ago

Weave comes back to life!

rgommers commented 9 years ago

@ijstokes nice! Are you proposing to merge this PR as is, or is it still work in progress?

rgommers commented 9 years ago

I see we're missing a .travis.yml file in this repo, so the tests don't get run. If you'd be willing to add that in either this PR or a separate PR, that would be great. Could be adapted from the Scipy repo, 2 configs I'd think (py26, py27 only; let's add py34 only after that passes the tests).

piannucci commented 9 years ago

I wish I'd seen this pull request earlier today, but here's a rough draft: 7875ac6350feae4640e6ac0674e08e766775d39f

piannucci commented 9 years ago

I think the biggest question here is how the str/bytes distinction should be exposed to C++. The easiest way (but not really ideal) is to blow away unicode entirely, ignore bytes until someone asks for them, and use std::string(PyUnicode_AsUTF8(py_obj)) as the conversion for str.

piannucci commented 9 years ago

Rebased on top of Ian's commit. 7ae5a3fe32baeeea3506e139d30328ba04aa5f10

piannucci commented 9 years ago

I'm also thinking that we remove the file and instance conversion code. Can someone confirm whether those are redundant now? For file, I think the issue is that mapping to FILE* is just not a good idea (see the warning in https://docs.python.org/3.4/c-api/file.html). And instance is, I think, completely gone now -- it used to be for old-style classes, right?

piannucci commented 9 years ago

Further work towards getting tests working correctly. 1bbc678be3746b1700c11ce85366dc044d907664

piannucci commented 9 years ago

Cleaned up many warnings in blitz and scxx. ac0b86547da849fb4490a531849f0d503f13faa3

rgommers commented 9 years ago

@piannucci it would probably be good if you opened a new PR with all your changes.

Also, you may want to not develop in your own master branch but instead in a feature branch and have your master track the master branch of this repo.

rgommers commented 9 years ago

Close/reopen in order to trigger the now enabled TravisCI tests.

rgommers commented 9 years ago

This fails the 2.6/2.7 tests because UserList doesn't exist there:

AttributeError: 'module' object has no attribute 'UserList'
rgommers commented 1 year ago

Superseded by gh-14, which is now released. Thanks for this PR @ijstokes