Skip to content

[Service Bus] Deprecate Internal _Accesstoken - #14450

Merged
yunhaoling merged 5 commits into
Azure:masterfrom
egelfand:egelfand/servicebus/deprecate_internal_accesstoken
Nov 2, 2020
Merged

[Service Bus] Deprecate Internal _Accesstoken#14450
yunhaoling merged 5 commits into
Azure:masterfrom
egelfand:egelfand/servicebus/deprecate_internal_accesstoken

Conversation

@egelfand

Copy link
Copy Markdown
Contributor

Replaced references to internal _Accesstoken with the Accesstoken itself, now that its available. Closes #13638.

@ghost ghost added Service Bus customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Oct 13, 2020
@ghost

ghost commented Oct 13, 2020

Copy link
Copy Markdown

Thank you for your contribution egelfand! We will review the pull request and get back to you soon.

@KieranBrantnerMagee

Copy link
Copy Markdown
Member

I don't know if you're able to view the CI output so I've pasted the current exception below, should be a simple fix (just addressing the async import for this same stanza) otherwise this approach looks solid.

ImportError while importing test module '/home/vsts/work/1/s/sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: tests/async_tests/test_sessions_async.py:17: in <module> from azure.servicebus.aio import ServiceBusClient, ReceivedMessage, AutoLockRenew azure/servicebus/aio/__init__.py:7: in <module> from ._servicebus_sender_async import ServiceBusSender azure/servicebus/aio/_servicebus_sender_async.py:14: in <module> from ._base_handler_async import BaseHandler azure/servicebus/aio/_base_handler_async.py:17: in <module> from .._base_handler import _generate_sas_token, _AccessToken, BaseHandler as BaseHandlerSync E ImportError: cannot import name '_AccessToken' from 'azure.servicebus._base_handler' (/home/vsts/work/1/s/sdk/servicebus/azure-servicebus/azure/servicebus/_base_handler.py)

@ghost

ghost commented Oct 27, 2020

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@yunhaoling

yunhaoling commented Oct 27, 2020

Copy link
Copy Markdown
Contributor

hey @egelfand , thanks for the PR :) we're very close to merging it with just three minor mypy/pylint issue:

mypy is reporting:

azure/servicebus/_base_handler.py:96: error: Name '_AccessToken' is not defined
azure/servicebus/_base_handler.py:150: error: Name '_AccessToken' is not defined

action: _AccessToken -> AccessToken

pylint is reporting:

azure/servicebus/_base_handler.py:5: [W0611(unused-import), ] Unused import collections

action: we could simply remove the import

I'm sure CI would be happy after we apply the changes, then we could approve and merge the PR.

@yunhaoling

Copy link
Copy Markdown
Contributor

/azp run python - servicebus - tests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@yunhaoling

Copy link
Copy Markdown
Contributor

hey @egelfand, your PR looks good to me, could you sign the agreement mentioned by microsoft-cla:
#14450 (comment)

so that we could merge your PR.

@egelfand

Copy link
Copy Markdown
Contributor Author

Just did so, thanks for all of your help!

@yunhaoling yunhaoling left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for the contribution!

@yunhaoling
yunhaoling merged commit 5407248 into Azure:master Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Bus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ServiceBus] Deprecate historical _AccessToken workaround now that AccessToken is imported from core.

3 participants