← 输入框|github.com|刷新
Skip to content

Project: Private Image Sharing - #633

Merged
ezilber-akamai merged 5 commits into
devfrom
proj/private-image-sharing
Jan 16, 2026
Merged

ezilber-akamai merged 5 commits into
devfrom
proj/private-image-sharing

Conversation

@ezilber-akamai

Copy link
Copy Markdown
Contributor

📝 Description

Merge Private Image Sharing project branch into dev branch to stage for release.

ezilber-akamai and others added 4 commits November 24, 2025 16:55
…aring

Added support for Private Image Sharing
* Create integration tests for share groups - part 1

* Create test test_try_to_add_member_invalid_token

* Update integration tests for private image sharing feature

* Apply code review sugestions

---------

Co-authored-by: Erik Zilber <ezilber@akamai.com>
@ezilber-akamai
ezilber-akamai requested a review from a team as a code owner January 15, 2026 19:47
@ezilber-akamai ezilber-akamai added the project for new projects in the changelog. label Jan 15, 2026
@ezilber-akamai
ezilber-akamai requested review from lkowalsk-akamai-com and mawilk90 and removed request for a team January 15, 2026 19:47
@ezilber-akamai ezilber-akamai changed the title Proj/private image sharing Project: Private Image Sharing Jan 15, 2026
from .database import *
from .domain import *
from .image import *
from .image_share_group import *

Check notice

Code scanning / CodeQL

'import *' may pollute namespace

Import pollutes the enclosing namespace, as the imported module [linode_api4.groups.image_share_group](1) does not define '__all__'.

Copilot Autofix

AI 11 months ago

In general, the way to fix this kind of issue is either (1) define __all__ in the imported module so that from module import * only brings in an intentional, controlled set of names, or (2) avoid import * and instead explicitly import either specific names or the module object itself. Because we can’t edit image_share_group here, we must stop using from .image_share_group import * in this file.

The single best fix in this file, without changing the rest of the design, is to replace from .image_share_group import * with a regular module import such as from . import image_share_group. This keeps access to everything in image_share_group via the image_share_group namespace (e.g. image_share_group.SomeClass) but stops it from polluting the linode_api4.groups namespace. We do not remove or alter any other imports, and we don’t add any new external dependencies.

Concretely:

  • In linode_api4/groups/__init__.py, line 9, replace from .image_share_group import * with from . import image_share_group.
  • No new helper methods or additional imports are required beyond this change.
Suggested changeset 1
linode_api4/groups/__init__.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/linode_api4/groups/__init__.py b/linode_api4/groups/__init__.py
--- a/linode_api4/groups/__init__.py
+++ b/linode_api4/groups/__init__.py
@@ -6,7 +6,7 @@
 from .database import *
 from .domain import *
 from .image import *
-from .image_share_group import *
+from . import image_share_group
 from .linode import *
 from .lke import *
 from .lke_tier import *
EOF
@@ -6,7 +6,7 @@
from .database import *
from .domain import *
from .image import *
from .image_share_group import *
from . import image_share_group
from .linode import *
from .lke import *
from .lke_tier import *
Copilot is powered by AI and may make mistakes. Always verify output.

@jriddle-linode jriddle-linode left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, works locally

@lgarber-akamai
lgarber-akamai self-requested a review January 16, 2026 15:29
@ezilber-akamai
ezilber-akamai merged commit f08c0cd into dev Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project for new projects in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants