Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Use six.iteritems instead of iteritems (#179)
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lacerda <pslacerda@gmail.com>
  • Loading branch information
pslacerda authored and yurishkuro committed May 26, 2018
1 parent 1df05e2 commit 9429e29
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 35 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ THRIFT_GEN_DIR=jaeger_client/thrift_gen
THRIFT_VER=0.9.3
THRIFT_IMG=thrift:$(THRIFT_VER)
THRIFT_PY_ARGS=new_style,tornado
THRIFT=docker run -v "${PWD}:/data" $(THRIFT_IMG) thrift
THRIFT=docker run -v "${PWD}:/data" -u $(shell id -u) $(THRIFT_IMG) thrift

idl-submodule:
git submodule init
Expand All @@ -96,4 +96,4 @@ thrift: idl-submodule thrift-image
done

update-license:
python scripts/updateLicense.py $(sources)
python scripts/updateLicense.py $(sources)
5 changes: 3 additions & 2 deletions jaeger_client/thrift_gen/agent/Agent.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions jaeger_client/thrift_gen/agent/constants.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions jaeger_client/thrift_gen/agent/ttypes.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions jaeger_client/thrift_gen/jaeger/Collector.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions jaeger_client/thrift_gen/jaeger/constants.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions jaeger_client/thrift_gen/jaeger/ttypes.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions jaeger_client/thrift_gen/sampling/SamplingManager.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions jaeger_client/thrift_gen/sampling/constants.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions jaeger_client/thrift_gen/sampling/ttypes.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions jaeger_client/thrift_gen/zipkincore/ZipkinCollector.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions jaeger_client/thrift_gen/zipkincore/constants.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions jaeger_client/thrift_gen/zipkincore/ttypes.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions thrift-gen-fix.awk
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
BEGIN {six=0; xrange=0}
BEGIN {six=0}

/^$/ {
# if in the future we need six, it can be added with the following line
# if (six == 0) print "import six"
if (six == 0) {
print "import six";
print "from six.moves import xrange";
}
six = 1
if (xrange ==0) print "from six.moves import xrange"
xrange = 1
}

{
gsub(/from ttype/, "from .ttype",$0);
print
}
gsub(/from ttype/, "from .ttype", $0);
gsub(/self.__dict__.iteritems\(\)/, "six.iteritems(self.__dict__)", $0);
print
}

0 comments on commit 9429e29

Please sign in to comment.