alfred-workflow icon indicating copy to clipboard operation
alfred-workflow copied to clipboard

Python 3 support [WIP]

Open mesozoic opened this issue 2 years ago • 0 comments

I've taken a pass at porting the existing code to Python 3, since it seems like the latest version of macOS has broken a lot of workflows that rely on this (excellent) library. At this point it would be helpful to get feedback on the direction (or help spotting things I've missed).

I started by going test-by-test looking for failures and resolving them incrementally. Kudos on the excellent testing suite with 100% coverage, because it made regressions easy to spot. All the tox tests pass on Python 3.7, 3.8, and 3.9.

There are probably still some places where we do encode/decode hopscotch unnecessarily, but I think it all at least works. I've tested this locally on a workflow that has "vendored" the workflow/ module into its own code, but haven't tested anything that installs this package as a dependency.

I did have to drop the dependency on pytest-httpbin, because I couldn't figure out how to get that to run on Python 3. (traceback) That means the test suite hits the live instance of httpbin.org, which is not great.

I made a first pass at updating the documentation too, but a lot of the examples still need to be reworked.

TODO

  • [ ] Reintroduce a local version of httpbin, or something equivalent
  • [ ] Do a more thorough pass through documentation, including sample code
  • [ ] Confirm that GitHub CI still works (and clean up old CI configs, i.e. Travis)

mesozoic avatar Apr 20 '22 19:04 mesozoic