Skip to content
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

around_me_in does't work right on python 3.4 #49

Closed
jenyacazacu opened this issue Jan 4, 2018 · 2 comments
Closed

around_me_in does't work right on python 3.4 #49

jenyacazacu opened this issue Jan 4, 2018 · 2 comments

Comments

@jenyacazacu
Copy link

When using python 3.4 and requesting a leaderboard with a page_size=1 it returns the incorrect member due to the way python 3 handles division on line 1007 in leaderboard/leaderboard.py. The work around was to cast to int, so that fixed it for any page size.

starting_offset = reverse_rank_for_member - (page_size / 2)

should be

starting_offset = reverse_rank_for_member - int(page_size / 2)

@GraylinKim
Copy link
Member

Thanks for reporting this issue. I've added a test and submitted a patch.

@jenyacazacu
Copy link
Author

awesome, thx

czarneckid added a commit that referenced this issue Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants