-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.
Description
What happened (please include outputs or screenshots):
Starting with 12.0.0, V1Pod now is no longer pickleable depending on how logging is configured.
What you expected to happen:
V1Pod is pickleable.
How to reproduce it (as minimally and precisely as possible):
>>> from kubernetes.client import models as k8s
>>> import logging
>>> import pickle
>>> logging.basicConfig()
>>> p = k8s.V1Pod()
>>> pickle.dumps(p)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't pickle _thread.RLock objects
Anything else we need to know?:
I believe it is unrelated, but this was initially found in apache/airflow, as it pickles V1Pods.
Environment:
- Python version: 3.6.12
- Python client version: 12.0.0
stroykova
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.