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

chore: addasync_rest extra for async rest dependencies#701

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
ohmayr merged 7 commits intomainfromadd-extra-for-aiohttp
Sep 30, 2024

Conversation

parthea
Copy link
Collaborator

@partheaparthea commentedSep 20, 2024
edited
Loading

This PR adds an extra forasync_rest which captures the minimum version ofgoogle-auth which is required to use theasync_rest feature.

@product-auto-labelproduct-auto-labelbot added the size: sPull request size is small. labelSep 20, 2024
@partheapartheaforce-pushed theadd-extra-for-aiohttp branch 7 times, most recently from700a47f to4e3842dCompareSeptember 20, 2024 20:15
@product-auto-labelproduct-auto-labelbot added size: mPull request size is medium. and removed size: sPull request size is small. labelsSep 20, 2024
@partheapartheaforce-pushed theadd-extra-for-aiohttp branch 3 times, most recently from977a198 toc41a808CompareSeptember 20, 2024 20:23
@partheaparthea changed the titlefix: add extra for aiohttpfix: add extra for async_restSep 20, 2024
@partheaparthea marked this pull request as ready for reviewSeptember 20, 2024 20:27
@partheaparthea requested review froma team ascode ownersSeptember 20, 2024 20:27
Copy link
Contributor

@vchudnov-gvchudnov-g left a comment

Choose a reason for hiding this comment

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

One non-trivial comment about using theextras insetup.py

@ohmayr
Copy link
Contributor

One non-trivial comment about using theextras insetup.py

What's the comment? I see that we're settingextras insetup.pyhere

@ohmayrohmayr changed the titlefix: add extra for async_restfix: addasync_rest extra to install async rest transport dependenciesSep 27, 2024
@ohmayrohmayr changed the titlefix: addasync_rest extra to install async rest transport dependenciesfix: addasync_rest extra for async rest dependenciesSep 27, 2024
@ohmayrohmayr changed the titlefix: addasync_rest extra for async rest dependencieschore: addasync_rest extra for async rest dependenciesSep 27, 2024
@@ -110,7 +111,7 @@ def install_prerelease_dependencies(session, constraints_path):
session.install(*other_deps)


def default(session, install_grpc=True, prerelease=False,install_auth_aio=False):
def default(session, install_grpc=True, prerelease=False,install_async_rest=False):
Copy link
Contributor

@vchudnov-gvchudnov-gSep 30, 2024
edited
Loading

Choose a reason for hiding this comment

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

I suggest restructuring just slightly for brevity (I marked with## the sections I changed). This depends onpip install foo[] with an empty extras list working, which I think it does. If not, one more line will be needed.

install_extras= []##ifinstall_grpc:##install_extras.append("grpc")constraints_dir=str(CURRENT_DIRECTORY/"testing")ifinstall_async_rest:##install_extras.append("async_rest")constraints_type="async-rest-"else:constraints_type=""ifprerelease:install_prerelease_dependencies(session,f"{constraints_dir}/constraints-{constraints_type}{PYTHON_VERSIONS[0]}.txt",        )# This *must* be the last install command to get the package from source.session.install("-e",f".[{','.join(install_extras)}]","--no-deps"## see my other comment about installing grpc        )else:constraints_file= (f"{constraints_dir}/constraints-{constraints_type}-{session.python}.txt"        )# fall back to standard constraints fileifnotpathlib.Path(constraints_file).exists():constraints_file=f"{constraints_dir}/constraints-{session.python}.txt"session.install("-e",f".[{','.join(install_extras)}]",##"-c",constraints_file,        )

Copy link
Contributor

Choose a reason for hiding this comment

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

addressed.

noxfile.py Outdated
".[grpc]" if install_grpc else ".",
"-c",
f"{constraints_dir}/constraints-{session.python}.txt",
"-e", "." + ("[async_rest]" if install_async_rest else ""), "--no-deps"
Copy link
Contributor

Choose a reason for hiding this comment

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

This was a pre-existing issue: at the top of the function we require thatinstall_grpc be set ifprerelease is set. But here we don't installgrpc. Is that an oversight? It seems to me we probably should install it here.

Copy link
Contributor

Choose a reason for hiding this comment

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

addressed.

)
# fall back to standard constraints file
if not pathlib.Path(constraints_file).exists():
constraints_file = f"{constraints_dir}/constraints-{session.python}.txt"
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a reminder at the top of the else that the constraints file does not determinewhether the listed imports are imported.

Copy link
Contributor

Choose a reason for hiding this comment

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

addressed.

@ohmayrohmayr merged commit84bf637 intomainSep 30, 2024
37 checks passed
@ohmayrohmayr deleted the add-extra-for-aiohttp branchSeptember 30, 2024 20:58
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ohmayrohmayrohmayr approved these changes

@vchudnov-gvchudnov-gvchudnov-g approved these changes

Assignees

@ohmayrohmayr

Labels
size: mPull request size is medium.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@parthea@ohmayr@vchudnov-g

[8]ページ先頭

©2009-2025 Movatter.jp