ghstack 0.9.1__tar.gz → 0.9.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ghstack-0.9.1 → ghstack-0.9.2}/PKG-INFO +2 -1
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/gpg_sign.py +1 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/rage.py +1 -1
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/shell.py +7 -17
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/submit.py +32 -10
- {ghstack-0.9.1 → ghstack-0.9.2}/pyproject.toml +4 -3
- {ghstack-0.9.1 → ghstack-0.9.2}/LICENSE +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/README.md +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/__init__.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/__main__.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/action.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/cache.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/checkout.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/circleci.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/circleci_real.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/cli.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/config.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/diff.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/forensics.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/git.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/github.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/github_fake.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/github_real.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/github_schema.graphql +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/github_utils.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/inbox.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/land.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/logs.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/py.typed +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/status.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/test_prelude.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/types.py +0 -0
- {ghstack-0.9.1 → ghstack-0.9.2}/ghstack/unlink.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ghstack
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.2
|
|
4
4
|
Summary: Stack diff support for GitHub
|
|
5
5
|
Home-page: https://github.com/ezyang/ghstack
|
|
6
6
|
License: MIT
|
|
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
17
|
Requires-Dist: aiohttp (>=3,<4)
|
|
18
18
|
Requires-Dist: click (>=8,<9)
|
|
19
|
+
Requires-Dist: flake8 (>=7.0.0,<8.0.0)
|
|
19
20
|
Requires-Dist: importlib-metadata (>=1.4) ; python_version < "3.8"
|
|
20
21
|
Requires-Dist: requests (>=2,<3)
|
|
21
22
|
Requires-Dist: typing-extensions (>=3,<5)
|
|
@@ -233,23 +233,16 @@ class Shell(object):
|
|
|
233
233
|
return s
|
|
234
234
|
|
|
235
235
|
@overload # noqa: F811
|
|
236
|
-
def git(self, *args: str) -> str:
|
|
237
|
-
...
|
|
236
|
+
def git(self, *args: str) -> str: ...
|
|
238
237
|
|
|
239
238
|
@overload # noqa: F811
|
|
240
|
-
def git(self, *args: str, input: str) -> str:
|
|
241
|
-
|
|
242
|
-
...
|
|
239
|
+
def git(self, *args: str, input: str) -> str: ...
|
|
243
240
|
|
|
244
241
|
@overload # noqa: F811
|
|
245
|
-
def git(self, *args: str, input: str, env: Dict[str, str]) -> str:
|
|
246
|
-
|
|
247
|
-
...
|
|
242
|
+
def git(self, *args: str, input: str, env: Dict[str, str]) -> str: ...
|
|
248
243
|
|
|
249
244
|
@overload # noqa: F811
|
|
250
|
-
def git(self, *args: str, **kwargs: Any) -> _SHELL_RET:
|
|
251
|
-
|
|
252
|
-
...
|
|
245
|
+
def git(self, *args: str, **kwargs: Any) -> _SHELL_RET: ...
|
|
253
246
|
|
|
254
247
|
def git(self, *args: str, **kwargs: Any) -> _SHELL_RET: # noqa: F811
|
|
255
248
|
"""
|
|
@@ -288,16 +281,13 @@ class Shell(object):
|
|
|
288
281
|
return self._maybe_rstrip(self.sh(*(("git",) + args), **kwargs))
|
|
289
282
|
|
|
290
283
|
@overload # noqa: F811
|
|
291
|
-
def hg(self, *args: str) -> str:
|
|
292
|
-
...
|
|
284
|
+
def hg(self, *args: str) -> str: ...
|
|
293
285
|
|
|
294
286
|
@overload # noqa: F811
|
|
295
|
-
def hg(self, *args: str, input: str) -> str:
|
|
296
|
-
...
|
|
287
|
+
def hg(self, *args: str, input: str) -> str: ...
|
|
297
288
|
|
|
298
289
|
@overload # noqa: F811
|
|
299
|
-
def hg(self, *args: str, **kwargs: Any) -> _SHELL_RET:
|
|
300
|
-
...
|
|
290
|
+
def hg(self, *args: str, **kwargs: Any) -> _SHELL_RET: ...
|
|
301
291
|
|
|
302
292
|
def hg(self, *args: str, **kwargs: Any) -> _SHELL_RET: # noqa: F811
|
|
303
293
|
"""
|
|
@@ -363,9 +363,9 @@ class Submitter:
|
|
|
363
363
|
# did not exist on the stack at all), because they were associated
|
|
364
364
|
# with a patch that contains no changes. GhNumber may be false
|
|
365
365
|
# if the diff was never associated with a PR.
|
|
366
|
-
ignored_diffs: List[
|
|
367
|
-
|
|
368
|
-
|
|
366
|
+
ignored_diffs: List[Tuple[ghstack.diff.Diff, Optional[DiffWithGitHubMetadata]]] = (
|
|
367
|
+
dataclasses.field(default_factory=list)
|
|
368
|
+
)
|
|
369
369
|
|
|
370
370
|
# Set of seen ghnums
|
|
371
371
|
seen_ghnums: Set[Tuple[str, GhNumber]] = dataclasses.field(default_factory=set)
|
|
@@ -692,9 +692,11 @@ class Submitter:
|
|
|
692
692
|
parent_commit,
|
|
693
693
|
parent_diff_meta,
|
|
694
694
|
diff,
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
695
|
+
(
|
|
696
|
+
self.elaborate_diff(diff)
|
|
697
|
+
if diff.pull_request_resolved is not None
|
|
698
|
+
else None
|
|
699
|
+
),
|
|
698
700
|
submit,
|
|
699
701
|
)
|
|
700
702
|
if diff_meta is not None:
|
|
@@ -952,9 +954,11 @@ to disassociate the commit with the pull request, and then try again.
|
|
|
952
954
|
[
|
|
953
955
|
f"{strip_mentions(diff.summary.rstrip())}\n\n",
|
|
954
956
|
f"ghstack-source-id: {diff.source_id}\n",
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
957
|
+
(
|
|
958
|
+
f"ghstack-comment-id: {elab_diff.comment_id}\n"
|
|
959
|
+
if self.direct
|
|
960
|
+
else ""
|
|
961
|
+
),
|
|
958
962
|
f"Pull Request resolved: {pull_request_resolved.url()}",
|
|
959
963
|
]
|
|
960
964
|
)
|
|
@@ -1193,6 +1197,22 @@ is closed (likely due to being merged). Please rebase to upstream and try again
|
|
|
1193
1197
|
base_args: List[str] = []
|
|
1194
1198
|
if push_branches.base.commit is not None:
|
|
1195
1199
|
base_args.extend(("-p", push_branches.base.commit.commit_id))
|
|
1200
|
+
# We don't technically need to do this, but often tooling
|
|
1201
|
+
# relies on pull requests being able to compute merge-base
|
|
1202
|
+
# with the main branch. While the result you get here can be
|
|
1203
|
+
# misleading (in particular, the merge-base will not
|
|
1204
|
+
# incorporate changes on base, and if a ghstack has been
|
|
1205
|
+
# rebased backwards in time, the merge-base will be stuck
|
|
1206
|
+
# on the more recent commit), it is useful so we put it in.
|
|
1207
|
+
extra_base = self.sh.git("merge-base", base.commit_id, self.base)
|
|
1208
|
+
if push_branches.base.commit is None or not self.sh.git(
|
|
1209
|
+
"merge-base",
|
|
1210
|
+
"--is-ancestor",
|
|
1211
|
+
extra_base,
|
|
1212
|
+
push_branches.base.commit.commit_id,
|
|
1213
|
+
exitcode=True,
|
|
1214
|
+
):
|
|
1215
|
+
base_args.extend(("-p", extra_base))
|
|
1196
1216
|
new_base = GitCommitHash(
|
|
1197
1217
|
self.sh.git(
|
|
1198
1218
|
"commit-tree",
|
|
@@ -1672,7 +1692,9 @@ is closed (likely due to being merged). Please rebase to upstream and try again
|
|
|
1672
1692
|
# Direct commit parent typically have base, as it will be the
|
|
1673
1693
|
# main branch
|
|
1674
1694
|
if not self.direct:
|
|
1675
|
-
|
|
1695
|
+
pass
|
|
1696
|
+
# This is now set to the orig base
|
|
1697
|
+
# assert not base_commit.parents
|
|
1676
1698
|
|
|
1677
1699
|
# 8. Head branch is not malformed
|
|
1678
1700
|
assert self.sh.git(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "ghstack"
|
|
3
|
-
version = "0.9.
|
|
3
|
+
version = "0.9.2"
|
|
4
4
|
authors = ["Edward Z. Yang <ezyang@mit.edu>"]
|
|
5
5
|
description = "Stack diff support for GitHub"
|
|
6
6
|
readme = "README.md"
|
|
@@ -23,10 +23,11 @@ python = "^3.8.1"
|
|
|
23
23
|
requests = "^2"
|
|
24
24
|
typing-extensions = ">=3 <5"
|
|
25
25
|
click = "^8"
|
|
26
|
+
flake8 = "^7.0.0"
|
|
26
27
|
|
|
27
28
|
[tool.poetry.dev-dependencies]
|
|
28
|
-
black = "^
|
|
29
|
-
flake8 = "^
|
|
29
|
+
black = "^24.3.0"
|
|
30
|
+
flake8 = "^7"
|
|
30
31
|
graphql-core = "^3"
|
|
31
32
|
hypothesis = "^6"
|
|
32
33
|
mypy = "^1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|