From 3c576b98c050b433dc5628e0ff845cafce847858 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 9 Apr 2019 21:49:24 -0700 Subject: add work-around for weird TypeWithDefault config class Expect this to fix a serious bug with configuration "contamination" between priv_api and regular api. :codinghorror: --- python_client/codegen_python_client.sh | 17 +++++++++++++++++ python_client/fatcat_client/configuration.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/python_client/codegen_python_client.sh b/python_client/codegen_python_client.sh index 5a30910d..35126ad3 100755 --- a/python_client/codegen_python_client.sh +++ b/python_client/codegen_python_client.sh @@ -45,6 +45,23 @@ patch -p0 << END_PATCH def user_agent(self): END_PATCH +# I don't know what they were thinking with this TypeWithDefault stuff, but it +# caused really gnarly config cross-contamination issues when running mulitple +# clients in parallel. +patch -p0 << END_PATCH +--- fatcat_client/configuration.py ++++ fatcat_client/configuration.py +@@ -37,7 +37,7 @@ class TypeWithDefault(type): + cls._default = copy.copy(default) + + +-class Configuration(six.with_metaclass(TypeWithDefault, object)): ++class Configuration(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Ref: https://github.com/swagger-api/swagger-codegen +END_PATCH + # these tests are basically no-ops mkdir -p tests/codegen cp -r $OUTPUT/test/* tests/codegen diff --git a/python_client/fatcat_client/configuration.py b/python_client/fatcat_client/configuration.py index 5cc1fe37..5423065d 100644 --- a/python_client/fatcat_client/configuration.py +++ b/python_client/fatcat_client/configuration.py @@ -37,7 +37,7 @@ class TypeWithDefault(type): cls._default = copy.copy(default) -class Configuration(six.with_metaclass(TypeWithDefault, object)): +class Configuration(object): """NOTE: This class is auto generated by the swagger code generator program. Ref: https://github.com/swagger-api/swagger-codegen -- cgit v1.2.3