Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added long to primitive data types supported in Python codegen #3146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
wing328 merged 1 commit into swagger-api:master from maneeshsahu:master
Jul 7, 2016

Conversation

@maneeshsahu
Copy link

@maneeshsahu maneeshsahu commented Jun 15, 2016

Added long to primitives along with int, float, str, date and tuple. Needed for Python 2.x

Copy link
Contributor

wing328 commented Jun 16, 2016

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/swagger-api/swagger-codegen/graphs/contributors.

Let me know if you need help fixing it.

Ref: http://stackoverflow.com/questions/3042437/change-commit-author-at-one-specific-commit

Copy link
Author

Not an issue as long as the checkin makes it through...

Copy link
Contributor

taxpon commented Jul 6, 2016

Why was this closed? I came across long type problem in python client and this branch will help me. So, it would be great if you could merge this branch to master. Thanks.

Copy link
Contributor

wing328 commented Jul 6, 2016
edited
Loading

Not sure why it's closed by @maneeshsahu

If you've reviewed the change and it looks good, I don't mind reopening the PR and merge later.

(there's an NPM issue impacting CI tests at the moment: npm/npm#13284)

Copy link
Contributor

taxpon commented Jul 7, 2016

This PR looks good to me. Actually I applied this modification as custom template, I did not find any problem so far.

@wing328 wing328 reopened this Jul 7, 2016
Copy link
Contributor

wing328 commented Jul 7, 2016

@taxpon Looks like the change didn't work with Python3:

======================================================================
ERROR: test_get_inventory (tests.test_store_api.StoreApiTests)
----------------------------------------------------------------------
Traceback (most recent call last):
 File "/Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/python/tests/test_store_api.py", line 28, in test_get_inventory
 data = self.store_api.get_inventory()
 File "/Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/python/petstore_api/apis/store_api.py", line 183, in get_inventory
 (data) = self.get_inventory_with_http_info(**kwargs)
 File "/Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/python/petstore_api/apis/store_api.py", line 255, in get_inventory_with_http_info
 _return_http_data_only=params.get('_return_http_data_only'))
 File "/Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/python/petstore_api/api_client.py", line 326, in call_api
 response_type, auth_settings, callback, _return_http_data_only)
 File "/Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/python/petstore_api/api_client.py", line 114, in __call_api
 header_params = self.sanitize_for_serialization(header_params)
 File "/Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/python/petstore_api/api_client.py", line 196, in sanitize_for_serialization
 types = (str, int, long, float, bool, tuple)
NameError: name 'long' is not defined

Copy link
Contributor

wing328 commented Jul 7, 2016

@wing328 wing328 merged commit 6c350a7 into swagger-api:master Jul 7, 2016
Copy link
Contributor

wing328 commented Jul 7, 2016

Fixed long issue in Python3 via 89befeb.

Test cases are good now:

Ran 79 tests in 60.377s
OK (SKIP=1)
____________________________________________________________ summary _____________________________________________________________
 py27: commands succeeded
 py34: commands succeeded
 congratulations :)

@taxpon please kindly review the fix to see if it looks good from your perspective.

Copy link
Contributor

taxpon commented Jul 9, 2016

@wing328 looks fine :)

wing328 reacted with laugh emoji

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

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

v2.2.0

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /