-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[BUG + REFACTOR] Change behavior of JobQueue.run_monthly
#2627
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
Comments
@Bibo-Joshi can i work on this issue? |
Hi, sure, you're welcome to! just make sure to base your branch on the v14 branch (and the PR should also go to there), as we're working towards a majorly breaking release :) |
I have done the changes how can I test it? |
We use |
(on branch v14) i forked -> cloned -> changes -> pytest -> pre-commit -> added files -> commit -> pushed ( and it says every thing is upto date) |
It doesn't look like the commit actually commited. Maybe run |
yes, it's showing your commit but is that |
If it doesn't show your commit, then you haven't commited ;) double check the contribution guide and carefully read what's printed in the console on each of the steps you make. e.g. when you tried to commit, you may have overlooked a error message that git showed you. running |
@iota-008 Or maybe you created your own branch, committed there, and switched back to V14 accidentally? That could be the case if |
I am getting 3 assertion error's on pytest in test_schedule_removal, test_in_updater, in which I haven't changed anything. |
Thats alright, job queue tests are very time sensitive. As long as they run on the CI, nothing to worry about. Pytest isn't part of the pre-commit hooks though and shouldn't stop your commit from going through |
getting these errors now :( telegram\passport\credentials.py:192: error: Item "Ed448PrivateKey" of "Union[Ed25519PrivateKey, Ed448PrivateKey, RSAPrivateKey, DSAPrivateKey, EllipticCurvePrivateKey]" has no attribute "decrypt" [union-attr] telegram\passport\credentials.py:192: error: Item "DSAPrivateKey" of "Union[Ed25519PrivateKey, Ed448PrivateKey, RSAPrivateKey, DSAPrivateKey, EllipticCurvePrivateKey]" has no attribute "decrypt" [union-attr] telegram\passport\credentials.py:192: error: Item "EllipticCurvePrivateKey" of "Union[Ed25519PrivateKey, Ed448PrivateKey, RSAPrivateKey, DSAPrivateKey, EllipticCurvePrivateKey]" has telegram\passport\credentials.py:192: error: Incompatible types in assignment (expression has type "Union[Any, bytes]", variable has type "None") [assignment] Found 5 errors in 1 file (checked 147 source files) |
for now you can commit with |
i have made a pull request. |
i have made a pull request |
I saw and I will review it when I have time for it 😉 |
GitHub's closing from PR comment feature is broken, so closing manually |
Steps to reproduce
job_queue.run_monthly(day=30, day_is_strict=False)
Expected behaviour
Runs on 30th day of each month excluding Feb + on Feb 28th/29th
Actual behaviour
Runs on 30th and 31st day of each month excluding Feb + on Feb 28th/29th
This happens because I didn't pay enough attention when writing this:
python-telegram-bot/telegram/ext/jobqueue.py
Lines 364 to 384 in 0c50850
However, the use case of
day_is_strict
is mainly "run on the last day of the month". I therefore suggest to just drop the parameter and instead allow to passday='last'
orday=-1
(I like this one better) to indicate that you want to run the job on the last day of the month.The use case described above can still be achieved with
run_custom
.The text was updated successfully, but these errors were encountered: