Skip to content

Commit

Permalink
Move from thriftpy to thriftpy2 since thriftpy is deprecated (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-blanchard authored Oct 7, 2020
1 parent 8d5757c commit 6859c17
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ ruamel.yaml
setuptools
simplejson
texttable
thriftpy>=0.3.2
thriftpy2
4 changes: 2 additions & 2 deletions streamparse/dsl/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"""
import simplejson as json
from pystorm.component import Component
from thriftpy.transport import TMemoryBuffer
from thriftpy.protocol import TBinaryProtocol
from thriftpy2.transport import TMemoryBuffer
from thriftpy2.protocol import TBinaryProtocol

from ..thrift import Bolt, SpoutSpec, StormTopology
from .bolt import JavaBoltSpec, ShellBoltSpec
Expand Down
4 changes: 2 additions & 2 deletions streamparse/thrift.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import io

import thriftpy
import thriftpy2

# Apache storm.thrift file as string to simplify loading it.
_THRIFT_STR = """
Expand Down Expand Up @@ -782,7 +782,7 @@
}
"""

storm_thrift = thriftpy.load_fp(io.StringIO(_THRIFT_STR), module_name="storm_thrift")
storm_thrift = thriftpy2.load_fp(io.StringIO(_THRIFT_STR), module_name="storm_thrift")
# Fix a lovely issue where GlobalStreamIds didn't have consistent hash values
storm_thrift.GlobalStreamId.__hash__ = lambda self: (
hash(self.componentId) ^ hash(self.streamId)
Expand Down
6 changes: 3 additions & 3 deletions streamparse/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
from fabric.colors import red, yellow
from pkg_resources import parse_version
from texttable import Texttable
from thriftpy.protocol import TBinaryProtocolFactory
from thriftpy.rpc import make_client
from thriftpy.transport import TFramedTransportFactory
from thriftpy2.protocol import TBinaryProtocolFactory
from thriftpy2.rpc import make_client
from thriftpy2.transport import TFramedTransportFactory

from .dsl.topology import Topology, TopologyType
from .thrift import Nimbus
Expand Down

0 comments on commit 6859c17

Please sign in to comment.