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

replace time.clock with perf_counter for py3 #638

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
5 participants
@frostming
Copy link
Contributor

commented Sep 14, 2018

Replace the timer to suppress the deprecation warning.

@frostming frostming force-pushed the frostming:deprecate-timer branch from e8f0150 to bf52f3e Sep 14, 2018

Show resolved Hide resolved flask_sqlalchemy/__init__.py Outdated
@MichaelF91

This comment was marked as off-topic.

Copy link

commented Jan 24, 2019

I came here to suggest this, as I'm getting ugly deprecation warnings using pytest. Is there a reason why this pull request hasn't yet been accepted?

@rsyring

This comment has been minimized.

Copy link
Collaborator

commented Mar 9, 2019

#662 uses if sys.version_info >= (3, 3): while this PR uses sys.version_info[:2] >= (3, 3):. I believe both would work given tuple comparison semantics and the former is just a bit cleaner.

Also, we don't currently have CI setup and I don't have easy access to a Windows machine. Will someone manually confirm that this code works as expected on Windows for Python 2.7 and a version of Python3 > 3.3.

@rsyring rsyring added this to the 2.x milestone Mar 9, 2019

@frostming frostming force-pushed the frostming:deprecate-timer branch from fd79fbe to 2396a0a Mar 11, 2019

@frostming

This comment has been minimized.

Copy link
Contributor Author

commented Mar 11, 2019

@rsyring I squashed the commits and tested on Windows PC, with Python 3.7.2 and Python 2.7.15, all pass. Thanks

@rsyring

This comment has been minimized.

Copy link
Collaborator

commented Mar 11, 2019

Great, thank you. I'll update the milestone to 2.4 as I see no reason to delay this.

@rsyring rsyring modified the milestones: 2.x, 2.4 Mar 11, 2019

@rsyring

This comment has been minimized.

Copy link
Collaborator

commented Mar 14, 2019

Would you mind rebasing this on the current 2.x-maintenance branch and change the PR to merge into that branch? I believe that is the last step needed before I can get this merged.

Thanks.

@davidism

This comment has been minimized.

Copy link
Member

commented Mar 14, 2019

The command for that would be git rebase --onto origin/2.x-maintenance origin/master deprecate-timer, then git push -f, then edit the PR here to change the target.

@rsyring I usually do this myself, as it's not a common thing for most PR authors to know.

@rsyring

This comment has been minimized.

Copy link
Collaborator

commented Mar 14, 2019

@davidism ok, I'll take care of it then. Thanks @frostming for the submission.

rsyring added a commit that referenced this pull request Mar 14, 2019

Windows: replace time.clock with perf_counter for py3
original author: frostming
refs #638
@rsyring

This comment was marked as resolved.

Copy link
Collaborator

commented Mar 14, 2019

@frostming I've replaced this PR with #700 b/c I wasn't sure if I could rebase and force-push to your fork's branch.

@rsyring rsyring closed this Mar 14, 2019

@davidism davidism reopened this Mar 14, 2019

@davidism davidism force-pushed the frostming:deprecate-timer branch from 2396a0a to 51637e2 Mar 14, 2019

@davidism davidism changed the base branch from master to 2.x-maintenance Mar 14, 2019

rsyring added a commit that referenced this pull request Mar 14, 2019

@rsyring

This comment has been minimized.

Copy link
Collaborator

commented Mar 14, 2019

@davidism I merged this PR to the maintenance branch, after rebasing again, but the PR didn't pick up that the commit was merged. Let me know here or on Discord if you can tell what I did wrong.

Closing this PR, but it was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.