pimoroni / inky

Combined library for V2/V3 Inky pHAT and Inky wHAT.
https://shop.pimoroni.com/?q=inky
MIT License
575 stars 121 forks source link

Use built-in mock library #151

Closed waveform80 closed 1 year ago

waveform80 commented 1 year ago

Python 3 incorporated the third-party "mock" library under the "unittest" namespace back around 3.1 (I think? A while ago anyway :). This just removes the dependency and tweaks doc/conf.py to use the built-in one.

Gadgetoid commented 1 year ago

Oh, hello there! And thank you. It's hard to keep up with the state of the art. And harder still to apply it retrospectively to all of our repos- appreciated!

Python 2.7 tests (which failed and are enabled here: https://github.com/pimoroni/inky/blob/001fa8199a8da281b4004ca548e53aa167d28a49/.github/workflows/test.yml#L14) can just be dropped altogether now.

waveform80 commented 1 year ago

Oh, hello there! And thank you. It's hard to keep up with the state of the art. And harder still to apply it retrospectively to all of our repos- appreciated!

Heh, no problem :)

Python 2.7 tests (which failed and are enabled here:

https://github.com/pimoroni/inky/blob/001fa8199a8da281b4004ca548e53aa167d28a49/.github/workflows/test.yml#L14 ) can just be dropped altogether now.

I'll push a couple more commits in a mo; one disables the 2.7 tests, and the other adds the PIL modules to the list that sphinx mocks when building the docs (I don't think it matters on RTD which always has it installed, but it breaks when I'm building docs for packaging where it's a minimal environment without PIL/Pillow installed)

Gadgetoid commented 1 year ago

Thank you. The CI has exploded again because I think some older Python 3 versions have been dropped. I've got to fix that everywhere though so I'm kicking that can down the road... for now.