byte处理问题,include文件路径问题 #214

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
@listen-jin

1、byte处理问题
thrift官网中说明,byte: An 8-bit signed integer。但是在parser.py文件的_cast_byte方法中却assert接收到的v为str类型。
2、include文件路径问题
这应该是一个建议,或者说值得改进的地方。
发现场景:thrift文件A中include了B文件,同时在B文件中include了C文件,B和C在同一个目录下,但同时和A不在同一目录下,这时如果只给了A的路径,则在解析B文件时对于include的C文件,就会报错,找不到C文件。
建议:parser.py文件中p_include方法,应该把当前解析的thrift文件所在路径加到include_dirs_中,而不是所有的thrift路径都需要调用parse方法时把所有thrift文件所在路径都添加进去,因为调用时用户并不一定知道其他文件include的文件都在哪些目录下。

@hit9 hit9 self-assigned this Jul 21, 2016

@hit9

This comment has been minimized.

Show comment
Hide comment
@hit9

hit9 Jul 21, 2016

Contributor

Confirmed. LGTM @lxyu

Contributor

hit9 commented Jul 21, 2016

Confirmed. LGTM @lxyu

@lxyu lxyu closed this in 48a2d1d Aug 26, 2016

@lxyu

This comment has been minimized.

Show comment
Hide comment
@lxyu

lxyu Aug 26, 2016

Contributor

Merged in 48a2d1d, thanks!

Contributor

lxyu commented Aug 26, 2016

Merged in 48a2d1d, thanks!

@pyup-bot pyup-bot referenced this pull request in scieloorg/scielo-manager Aug 26, 2016

Closed

Pin thriftpy to latest version 0.3.9 #1314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment