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

Using self.next_run.time() instead of self.at_time when "making sure we run at the specified time *today*" #583

Merged
merged 12 commits into from
Oct 1, 2023

Conversation

AnezeR
Copy link
Contributor

@AnezeR AnezeR commented Apr 27, 2023

An if-statement that subtracts a day from self.next_run was using self.at_time (a value not affected by timezone).
Thus, when applying timezone to self.next_run a day was incorrectly subtracted, like in #582 (comment) or, on the opposite, not subtracted, like in #579 (comment).
Tests for these issues are added as well.

@AnezeR AnezeR mentioned this pull request Apr 28, 2023
test_schedule.py Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Apr 28, 2023

Coverage Status

Coverage: 99.713%. Remained the same when pulling 97c4dd3 on AnezeR:patch-1 into a3c2074 on dbader:master.

@AnezeR AnezeR changed the title Applying timezone to self.at_time Using self.next_run.time() instead of self.at_time when "making sure we run at the specified time *today*" Apr 28, 2023
Co-authored-by: Sijmen <sijmenhuizenga@gmail.com>
@AnezeR
Copy link
Contributor Author

AnezeR commented May 1, 2023

py39: install_deps> python -I -m pip install mock mypy pytest pytest-cov types-pytz
  ERROR: HTTP error 502 while getting https://files.pythonhosted.org/packages/27/6f/fbb16f260a7107ee98871d83f6793d88c4311b7189b10ef239da0b2181db/mock-5.0.2-py3-none-any.whl (from https://pypi.org/simple/mock/) (requires-python:>=3.6)
ERROR: Could not install requirement mock from https://files.pythonhosted.org/packages/27/6f/fbb16f260a7107ee98871d83f6793d88c4311b7189b10ef239da0b2181db/mock-5.0.2-py3-none-any.whl because of HTTP error 502 Server Error: Gateway Error for url: https://files.pythonhosted.org/packages/27/6f/fbb16f260a7107ee98871d83f6793d88c4311b7189b10ef239da0b2181db/mock-5.0.2-py3-none-any.whl for URL https://files.pythonhosted.org/packages/27/6f/fbb16f260a7107ee98871d83f6793d88c4311b7189b10ef239da0b2181db/mock-5.0.2-py3-none-any.whl (from https://pypi.org/simple/mock/) (requires-python:>=3.6)

@SijmenHuizenga, is this why the tests are failing, or is there something with the code?

@yotamoron
Copy link

Hi,

Is there an ETA on this issue?

Thanks.

@orientalperil
Copy link

Can this get merged and released? This is a very serious bug.

@joshkoehler
Copy link

Would be great to get this in. Is there an estimate for when it will merge? Thanks!

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

Successfully merging this pull request may close these issues.

None yet

6 participants