Skip to content
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

Updating for Python v3.10 #42

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
10 changes: 9 additions & 1 deletion FlowCytometryTools/core/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def queueable(fun, *args, **kwargs):
'"%s" must be a parameter of queued function "%s"' % (_now, fun.__name__)
)
f_name = fun.__name__
kw_name = inspect.getargspec(fun).keywords
kw_name = inspect.getfullargspec(fun).varkw
kws = params.pop(kw_name, {})
params.update(kws)
if params[_now]:
Expand Down Expand Up @@ -368,6 +368,14 @@ def apply(self, func, applyto="measurement", noneval=nan, setdata=False):


Well = Measurement
import collections
try:
from collections import abc
collections.MutableMapping = abc.MutableMapping
collections.Iterable = abc.Iterable
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@borcuttjahns, are these transfers from abc.X to collections.X needed somewhere? I couldn't find a place where they are used.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I am having issues running this code and it seams to be localized to this same issue you are talking about here. I was wondering if you found a solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidGorlin this branch should fix the issue. It's what we currently use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or do you mean the code here is erroring?

collections.Mapping = abc.Mapping
except:
pass


class MeasurementCollection(abc.MutableMapping, BaseObject):
Expand Down
4 changes: 2 additions & 2 deletions FlowCytometryTools/core/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ def plot(
plot_output = graph.plotFCM(self.data, channel_names, kind=kind, **kwargs)

if gates is not None:

if gate_colors is None:
gate_colors = cycle(("b", "g", "r", "m", "c", "y"))

if not isinstance(gate_lw, collections.Iterable):
gate_lw = [gate_lw]
gate_lw = [gate_lw]

gate_lw = cycle(gate_lw)

Expand Down