Movatterモバイル変換


[0]ホーム

URL:


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

Bump APS & Deprecatepytz Support#4582

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabotdependabotbot commented on behalf ofgithubNov 29, 2024
edited
Loading

Updates the requirements onapscheduler to permit the latest version.

Release notes

Sourced fromapscheduler's releases.

3.11.0

  • Dropped support for Python 3.6 and 3.7
  • Added support forZoneInfo time zones and deprecated support for pytz time zones
  • AddedCalendarIntervalTrigger, backported from the 4.x series
  • Added the ability to export and import jobs viascheduler.export_jobs() andscheduler.import_jobs(), respectively
  • Removed the dependency onsix
  • ChangedProcessPoolExecutor to spawn new subprocesses from scratch instead of forking on all platform
  • FixedAsyncIOScheduler inadvertently creating a defunct event loop at start, leading to the scheduler not working at all
  • FixedProcessPoolExecutor not respecting the passed keyword arguments when a broken pool was being replaced
Changelog

Sourced fromapscheduler's changelog.

Version history

To find out how to migrate your application from a previous version ofAPScheduler, see the :doc:migration section <migration>.

3.11.0

  • Dropped support for Python 3.6 and 3.7
  • Added support forZoneInfo time zones and deprecated support for pytz time zones
  • AddedCalendarIntervalTrigger, backported from the 4.x series
  • Added the ability to export and import jobs viascheduler.export_jobs() andscheduler.import_jobs(), respectively
  • Removed the dependency onsix
  • ChangedProcessPoolExecutor to spawn new subprocesses from scratch instead offorking on all platform
  • FixedAsyncIOScheduler inadvertently creating a defunct event loop at start,leading to the scheduler not working at all
  • FixedProcessPoolExecutor not respecting the passed keyword arguments when abroken pool was being replaced

3.10.4

  • Fixed incorrect module name being generated for references to class methods via asubclass where the subclass does not override the method

3.10.3

  • FixedTypeError related to entry point iteration on Python 3.9(PR by CrypticDriver)

3.10.2

  • Ensured consistent support for both PySide and PyQt (v6 to v2) onQtScheduler
  • Replaced uses of the deprecatedpkg_resources module withimportlib.metadata(PR by Ran Benita)
  • Fixed scheduling class methods likeB.methodname where theB class inheritsfrom classA andmethodname is a class method of classA
  • Fixed scheduler sleeping for too long (and thus jobs missing their scheduled runtimes) if its wakeup cycle takes too much time (fix by kbasten)

3.10.1

  • FixedTypeError: arguments did not match any overloaded call: inQtSchedulerdue towait_time being float and not an integer which QT needs it to be

3.10.0

  • Fixed compatibility with SQLAlchemy 2.0 and bumped minimum supported version to 1.4

... (truncated)

Commits
  • 6c72a51 Backported release job from master
  • 4b96510 Added the release version
  • fcec69c Added user's guide section for export/import
  • 50f67c8 Added scheduler methods for job export/import
  • 40431e5 Removed the obsoletetimedelta_seconds function
  • 9483bb4 Rearranged triggers tests to better match the master branch
  • ac55c86 Fixed project links to point to the correct branch on RTD
  • 811e973 Changed version history formatting to match the master branch
  • f3c68df Pass pool_kwargs to the replacement process pool too
  • 4584091 Removed unwarranted classifier
  • Additional commits viewable incompare view

You can trigger a rebase of this PR by commenting@dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabotdependabotbot added python ⚙️ dependenciesaffected functionality: dependencies labelsNov 29, 2024
@Bibo-Joshi
Copy link
Member

Added support for ZoneInfo time zones and deprecated support for pytz time zones

This makes the tests fail. Will need evaluation.
TBH, I would prefer switching to APS 4.x directly, if that were stable 😅 But let's work with what we have :)

Added the ability to export and import jobs viascheduler.export_jobs() andscheduler.import_jobs(), respectively

This is interesting in terms of persistency. Nothing I would see us following up on anytime soon, but at least once APS 4.x is stable, it might be worth anyother look

@dependabotdependabotbotforce-pushed thedependabot/pip/apscheduler-gte-3.10.4-and-lt-3.12.0 branch froma6a779b to17f95e3CompareDecember 4, 2024 19:54
@codecovCodecov
Copy link

codecovbot commentedDec 4, 2024
edited
Loading

❌ 1 Tests Failed:

Tests completedFailedPassedSkipped
65161651543
View the top 1 failed tests by shortest run time
tests.test_bot.TestBotWithRequest::test_set_game_score_and_high_scores
Stack Traces | 0.672s run time
self=<tests.test_bot.TestBotWithRequestobjectat0x0000021A3524F840>bot=PytestExtBot[token=5737018356:AAH138SuiKQF0LDCWsfgWeXfjJ5d63kCWLA]chat_id='675666224'@xfailasyncdeftest_set_game_score_and_high_scores(self,bot,chat_id):# First, test setting a score.game_short_name="test_game"game=awaitbot.send_game(chat_id,game_short_name)>message=awaitbot.set_game_score(user_id=chat_id,score=BASE_GAME_SCORE,# Score value is relevant for other set_game_score_* tests!chat_id=game.chat_id,message_id=game.message_id,        )tests\test_bot.py:3284:__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _telegram\ext\_extbot.py:3578:inset_game_scorereturnawaitsuper().set_game_score(telegram\_bot.py:4996:inset_game_scorereturnawaitself._send_message(telegram\ext\_extbot.py:610:in_send_messageresult=awaitsuper()._send_message(telegram\_bot.py:731:in_send_messageresult=awaitself._post(telegram\_bot.py:619:in_postreturnawaitself._do_post(telegram\ext\_extbot.py:354:in_do_postreturnawaitsuper()._do_post(telegram\_bot.py:648:in_do_postresult=awaitrequest.post(telegram\request\_baserequest.py:202:inpostresult=awaitself._request_wrapper(tests\auxil\networking.py:48:in_request_wrapperreturnawaitsuper()._request_wrapper(__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self=<tests.auxil.networking.NonchalantHttpxRequestobjectat0x0000021A34394BE0>url='https://api.telegram.org/bot5737018356:AAH138SuiKQF0LDCWsfgWeXfjJ5d63kCWLA/setGameScore'method='POST'request_data=<telegram.request._requestdata.RequestDataobjectat0x0000021A33D08610>read_timeout=None,write_timeout=None,connect_timeout=Nonepool_timeout=Noneasyncdef_request_wrapper(self,url:str,method:str,request_data:Optional[RequestData]=None,read_timeout:ODVInput[float]=DEFAULT_NONE,write_timeout:ODVInput[float]=DEFAULT_NONE,connect_timeout:ODVInput[float]=DEFAULT_NONE,pool_timeout:ODVInput[float]=DEFAULT_NONE,    )->bytes:"""Wraps the real implementation request method.        Performs the following tasks:        * Handle the various HTTP response codes.        * Parse the Telegram server response.        Args:            url (:obj:`str`): The URL to request.            method (:obj:`str`): HTTP method (i.e. 'POST', 'GET', etc.).            request_data (:class:`telegram.request.RequestData`, optional): An object containing                information about parameters and files to upload for the request.            read_timeout (:obj:`float` | :obj:`None`, optional): If passed, specifies the maximum                amount of time (in seconds) to wait for a response from Telegram's server instead                of the time specified during creating of this object. Defaults to                :attr:`DEFAULT_NONE`.            write_timeout (:obj:`float` | :obj:`None`, optional): If passed, specifies the maximum                amount of time (in seconds) to wait for a write operation to complete (in terms of                a network socket; i.e. POSTing a request or uploading a file) instead of the time                specified during creating of this object. Defaults to :attr:`DEFAULT_NONE`.            connect_timeout (:obj:`float` | :obj:`None`, optional): If passed, specifies the                maximum amount of time (in seconds) to wait for a connection attempt to a server                to succeed instead of the time specified during creating of this object. Defaults                to :attr:`DEFAULT_NONE`.            pool_timeout (:obj:`float` | :obj:`None`, optional): If passed, specifies the maximum                amount of time (in seconds) to wait for a connection to become available instead                of the time specified during creating of this object. Defaults to                :attr:`DEFAULT_NONE`.        Returns:            bytes: The payload part of the HTTP server response.        Raises:            TelegramError        """# Import needs to be here since HTTPXRequest is a subclass of BaseRequestfromtelegram.requestimportHTTPXRequest# pylint: disable=import-outside-toplevel# 20 is the documented default value for all the media related bot methods and custom# implementations of BaseRequest may explicitly rely on that. Hence, we follow the# standard deprecation policy and deprecate starting with version 20.7.# For our own implementation HTTPXRequest, we can handle that ourselves, so we skip the# warning in that case.has_files=request_dataandrequest_data.multipart_dataif (has_filesandnotisinstance(self,HTTPXRequest)andisinstance(write_timeout,DefaultValue)        ):warn(PTBDeprecationWarning("20.7",f"The `write_timeout` parameter passed to{self.__class__.__name__}.do_request"" will default to `BaseRequest.DEFAULT_NONE` instead of 20 in future versions ""for *all* methods of the `Bot` class, including methods sending media.",                ),stacklevel=3,            )write_timeout=20try:code,payload=awaitself.do_request(url=url,method=method,request_data=request_data,read_timeout=read_timeout,write_timeout=write_timeout,connect_timeout=connect_timeout,pool_timeout=pool_timeout,            )exceptTelegramError:raiseexceptExceptionasexc:raiseNetworkError(f"Unknown error in HTTP implementation:{exc!r}")fromexcifHTTPStatus.OK<=code<=299:# 200-299 range are HTTP success statusesreturnpayloadresponse_data=self.parse_json_payload(payload)description=response_data.get("description")message=descriptionifdescriptionelse"Unknown HTTPError"# In some special cases, we can raise more informative exceptions:# see https://core.telegram.org/bots/api#responseparameters and# https://core.telegram.org/bots/api#making-requests# TGs response also has the fields 'ok' and 'error_code'.# However, we rather rely on the HTTP status code for now.parameters=response_data.get("parameters")ifparameters:migrate_to_chat_id=parameters.get("migrate_to_chat_id")ifmigrate_to_chat_id:raiseChatMigrated(migrate_to_chat_id)retry_after=parameters.get("retry_after")ifretry_after:raiseRetryAfter(retry_after)message+=f"\nThe server response contained unknown parameters:{parameters}"ifcode==HTTPStatus.FORBIDDEN:# 403raiseForbidden(message)ifcodein (HTTPStatus.NOT_FOUND,HTTPStatus.UNAUTHORIZED):# 404 and 401# TG returns 404 Not found for#   1) malformed tokens#   2) correct tokens but non-existing method, e.g. api.tg.org/botTOKEN/unkonwnMethod# 2) is relevant only for Bot.do_api_request, where we have special handing for it.# TG returns 401 Unauthorized for correctly formatted tokens that are not validraiseInvalidToken(message)ifcode==HTTPStatus.BAD_REQUEST:# 400>raiseBadRequest(message)Etelegram.error.BadRequest:Bot_score_not_modifiedtelegram\request\_baserequest.py:383:BadRequest

To view more test analytics, go to theTest Analytics Dashboard
📢 Thoughts on this report?Let us know!

@dependabotdependabotbotforce-pushed thedependabot/pip/apscheduler-gte-3.10.4-and-lt-3.12.0 branch from17f95e3 toea6f067CompareDecember 7, 2024 10:16
Updates the requirements on [apscheduler](https://github.com/agronholm/apscheduler) to permit the latest version.- [Release notes](https://github.com/agronholm/apscheduler/releases)- [Changelog](https://github.com/agronholm/apscheduler/blob/3.11.0/docs/versionhistory.rst)- [Commits](agronholm/apscheduler@3.10.4...3.11.0)---updated-dependencies:- dependency-name: apscheduler  dependency-type: direct:production...Signed-off-by: dependabot[bot] <support@github.com>
@dependabotdependabotbotforce-pushed thedependabot/pip/apscheduler-gte-3.10.4-and-lt-3.12.0 branch fromea6f067 to8c02b05CompareDecember 7, 2024 10:32
Updates the requirements on [apscheduler](https://github.com/agronholm/apscheduler) to permit the latest version.- [Release notes](https://github.com/agronholm/apscheduler/releases)- [Changelog](https://github.com/agronholm/apscheduler/blob/3.11.0/docs/versionhistory.rst)- [Commits](agronholm/apscheduler@3.10.4...3.11.0)---updated-dependencies:- dependency-name: apscheduler  dependency-type: direct:production...Signed-off-by: dependabot[bot] <support@github.com>
@dependabotdependabotbotforce-pushed thedependabot/pip/apscheduler-gte-3.10.4-and-lt-3.12.0 branch from8c02b05 tofcccd32CompareDecember 29, 2024 19:21
@Bibo-JoshiBibo-Joshi added the ℹ️ needs-wiki-updateinformation: needs-wiki-update labelDec 30, 2024
@Bibo-Joshi
Copy link
Member

Turns out that with apscheduler deprecating pytz support, we can now do that as well and use thezoneinfo module (new in py3.9). So this PR now does a bit more than just bump apscheduler:

  • ensure that arbitrarydtm.tzinfo objects are handled correctly
  • keep compatibility withpytz for now while issuing deprecation warnings

after a merge, the wiki page on defaults should be updated

@Bibo-JoshiBibo-Joshi changed the titleUpdate apscheduler requirement from ~=3.10.4 to >=3.10.4,<3.12.0Bump APS & Deprecatepytz SupportDec 30, 2024
@Bibo-JoshiBibo-Joshi added 🔗 pythonrelated technology: python and removed python labelsDec 30, 2024
Copy link
Member

@harshil21harshil21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

some nitpicks and questions

Copy link
Member

@harshil21harshil21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@Bibo-JoshiBibo-Joshi merged commitd0a6e51 intomasterJan 1, 2025
26 checks passed
@Bibo-JoshiBibo-Joshi deleted the dependabot/pip/apscheduler-gte-3.10.4-and-lt-3.12.0 branchJanuary 1, 2025 18:43
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 9, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@Bibo-JoshiBibo-JoshiBibo-Joshi left review comments

@harshil21harshil21harshil21 approved these changes

@PoolitzerPoolitzerAwaiting requested review from Poolitzer

Assignees
No one assigned
Labels
⚙️ dependenciesaffected functionality: dependenciesℹ️ needs-wiki-updateinformation: needs-wiki-update🔗 pythonrelated technology: python
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Bibo-Joshi@harshil21

[8]ページ先頭

©2009-2025 Movatter.jp