summaryrefslogtreecommitdiffstats
path: root/python_client/codegen_python_client.sh
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-04-09 21:49:24 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-04-09 21:49:32 -0700
commit3c576b98c050b433dc5628e0ff845cafce847858 (patch)
tree07720ad5b7edde9b4c0776ffb36ceebd1f1f951e /python_client/codegen_python_client.sh
parenta7350cf1dbc6ed30f9d6620ef68db1cbf49fd43e (diff)
downloadfatcat-3c576b98c050b433dc5628e0ff845cafce847858.tar.gz
fatcat-3c576b98c050b433dc5628e0ff845cafce847858.zip
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:
Diffstat (limited to 'python_client/codegen_python_client.sh')
-rwxr-xr-xpython_client/codegen_python_client.sh17
1 files changed, 17 insertions, 0 deletions
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