pcdshub / typhos

Automatic-yet-customizable Graphical User Interface Generation for Ophyd Devices
http://pcdshub.github.io/typhos
Other
16 stars 26 forks source link

REF/FIX: Fix Python 3.11 support and test suite-focused cleanup #573

Closed klauer closed 1 year ago

klauer commented 1 year ago

Description

Motivation and Context

Python 3.11 support would be nice eventually

This PR manifested itself like this:

Overall, I think this is in a better spot than before. It's absolutely not perfect, though.

How Has This Been Tested?

Locally and test suite

Where Has This Been Documented?

Screenshots (if appropriate):

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <class 'ophyd.device.FlatConnect'>: attribute lookup FlatConnect on ophyd.device failed
image
klauer commented 1 year ago

Well it failed spectacularly on GitHub Actions, whereas it passed locally so 🤷 Going to mark profiling code as xfail temporarily (PR is still draft)

klauer commented 1 year ago

OK, this is a bit of a mess and there are a ton of changes. I did this over a long period of time with (sometimes) limited attention being paid to what I was doing.

Each change should be really scrutinized!

ZLLentz commented 1 year ago

I notice that you left some of the cleanup for another day- I think that's completely appropriate. You've cleaned up almost all of it already and the last QMenus seem to be lurking from upstream code.

klauer commented 1 year ago

🤞

klauer commented 1 year ago

2 green checkmarks in a row indicate it's probably good enough as-is. Before this gets any larger, if you guys are good with it - I'd say let's merge @tangkong @ZLLentz

We may revisit and adjust how strict this is in the future based on how many intermittent failures we get (due to gc/teardown slowness). Increasing the wait time may also suffice...

ZLLentz commented 1 year ago

I'll click merge now to make sure it happens