internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: pyload/pyload

Issue:
HOOK LinkdecrypterCom: 'LinkdecrypterComHook' object has no attribute 'COOKIES' 
03.08.2015 20:46:43 INFO    Free space: 6.48 TiB
630 03.08.2015 20:46:43 INFO    Activating Accounts...
631 03.08.2015 20:46:43 INFO    Activating Plugins...
632 03.08.2015 20:46:43 WARNING HOOK AntiStandby: Unable to change system power state | [Errno 2] No such file or directory
633 03.08.2015 20:46:43 WARNING HOOK AntiStandby: Unable to change display power state | [Errno 2] No such file or directory
634 03.08.2015 20:46:43 INFO    HOOK XFileSharingPro: Handling any hoster I can!
635 03.08.2015 20:46:43 WARNING HOOK UpdateManager: Unable to retrieve server to get updates
636 03.08.2015 20:46:43 INFO    HOOK XFileSharingPro: Handling any crypter I can!
637 03.08.2015 20:46:43 INFO    pyLoad is up and running
638 03.08.2015 20:46:45 INFO    HOOK LinkdecrypterCom: Reloading supported crypter list
639 03.08.2015 20:46:45 WARNING HOOK LinkdecrypterCom: 'LinkdecrypterComHook' object has no attribute 'COOKIES' | Waiting 1 minute and retry
640 03.08.2015 20:46:53 INFO    HOOK ClickAndLoad: Proxy listening on 127.0.0.1:9666
641 03.08.2015 20:46:53 INFO    HOOK LinkdecrypterCom: Reloading supported crypter list
642 03.08.2015 20:46:53 WARNING HOOK LinkdecrypterCom: 'LinkdecrypterComHook' object has no attribute 'COOKIES' | Waiting 1 minute and retry
643 03.08.2015 20:47:45 WARNING HOOK LinkdecrypterCom: 'LinkdecrypterComHook' object has no attribute 'COOKIES' | Waiting 1 minute and retry
644 03.08.2015 20:47:53 WARNING HOOK LinkdecrypterCom: 'LinkdecrypterComHook' object has no attribute 'COOKIES' | Waiting 1 minute and retry



Discussion:
same here

Same too

https://github.com/pyload/pyload/pull/1696/files

same here, adding COOKIES=False to acc. or crypter doesn't help

Someone could fix this?


Resolving patch:
diff --git a/module/plugins/hooks/LinkdecrypterComHook.py b/module/plugins/hooks/LinkdecrypterComHook.py
--- a/module/plugins/hooks/LinkdecrypterComHook.py
+++ b/module/plugins/hooks/LinkdecrypterComHook.py
@@ -21,6 +21,7 @@ class LinkdecrypterComHook(MultiHook):
     __license__     = "GPLv3"
     __authors__     = [("Walter Purcaro", "vuolter@gmail.com")]
 
+    COOKIES = False
 
     def get_hosters(self):
         list = re.search(r'>Supported\(\d+\)</b>: <i>(.[\w.\-, ]+)',


Test patch:
Repository: pyload/pyload

Issue:
YoutubeCom  'YoutubeCom' object has no attribute 'invalid_chars'
INFO    Download starts: https://www.youtube.com/watch?v=CcWUenJP27c
32  11.08.2015 15:21:40 DEBUG   HOOK UserAgentSwitcher: Use custom user-agent string: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
33  11.08.2015 15:21:40 DEBUG   HOOK UserAgentSwitcher: Use custom user-agent string: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
34  11.08.2015 15:21:40 DEBUG   HOSTER YoutubeCom[917]: PROCESS URL https://www.youtube.com/watch?v=CcWUenJP27c | PLUGIN VERSION 0.44
35  11.08.2015 15:21:40 DEBUG   HOSTER YoutubeCom[917]: LOAD URL https://www.youtube.com/watch?v=CcWUenJP27c | cookies=True | get={} | req=None | decode=True | multipart=False | post={} | ref=True | just_header=False
36  11.08.2015 15:21:41 DEBUG   HOSTER YoutubeCom[917]: AVAILABLE STREAMS: [43, 18, 5, 36, 17]
37  11.08.2015 15:21:41 DEBUG   HOSTER YoutubeCom[917]: DESIRED STREAM: ITAG:22 (.mp4 1280x720 Q:8 3D:False) NOT found, allowed
38  11.08.2015 15:21:41 DEBUG   HOSTER YoutubeCom[917]: Choosing nearest fmt: [(18, True, 6), (5, True, 7)]
39  11.08.2015 15:21:41 DEBUG   HOSTER YoutubeCom[917]: Chosen fmt: 18
40  11.08.2015 15:21:41 DEBUG   HOSTER YoutubeCom[917]: URL: https://r4---sn-oxujvavbox-jboe.googlevideo.com/videoplayback?dur=6508.088&sver=3&expire=1439320900&pl=17&mime=video%2Fmp4&ratebypass=yes&lmt=1393772868287300&id=o-APzBbdpg776jFizHG3Jkt06bKfyx5g9WzQZUsYl72KZA&upn=sqEKQpDr0q8&initcwndbps=1382500&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&fexp=9408513%2C9408710%2C9415365%2C9415435%2C9415485%2C9416023%2C9416126%2C9416838%2C9416906%2C9417279%2C9417926%2C9417951%2C9418153%2C9418531%2C9418562%2C9418702%2C9418780&ip=78.34.155.128&source=youtube&ms=au&mt=1439299147&mv=m&mm=31&mn=sn-oxujvavbox-jboe&requiressl=yes&key=yt5&itag=18&ipbits=0&signature=31662FD80FB656E037243D5362B4C00BD41EAFC8.7BF40D610E90CC4345B30EAFBD16F0596B560AC6
41  11.08.2015 15:21:41 WARNING Download failed: https://www.youtube.com/watch?v=CcWUenJP27c | 'YoutubeCom' object has no attribute 'invalid_chars'



Discussion:

Resolving patch:
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -33,7 +33,7 @@ def which(program):
 class YoutubeCom(Hoster):
     __name__    = "YoutubeCom"
     __type__    = "hoster"
-    __version__ = "0.44"
+    __version__ = "0.45"
     __status__  = "testing"
 
     __pattern__ = r'https?://(?:[^/]*\.)?(youtube\.com|youtu\.be)/watch\?(?:.*&)?v=.+'
@@ -54,7 +54,7 @@ class YoutubeCom(Hoster):
     URL_REPLACEMENTS = [(r'youtu\.be/', 'youtube.com/')]
 
     #: Invalid characters that must be removed from the file name
-    invalidChars = u'\u2605:?><"|\\'
+    invalid_chars = u'\u2605:?><"|\\'
 
     #: name, width, height, quality ranking, 3D
     formats = {5  : (".flv" , 400 , 240 , 1 , False),


Test patch:
Repository: pyload/pyload

Issue:
RapidGator No JSON object could be decoded
Could not login to Rapidgator since around one week ago. Tried to remove the userplugins directory but UpdateManager cannot recreate them.

INFO    ACCOUNT RapidgatorNet: Login user `XXX@gmail.com`...
DEBUG   ACCOUNT RapidgatorNet: LOAD URL http://rapidgator.net/api/login | cookies=True | get={} | req=None | decode=True | multipart=False | post={'username': 'XXX@gmail.com', 'password': 'J@s0n1812'} | ref=True | just_header=False
ERROR   ACCOUNT RapidgatorNet: No JSON object could be decoded
WARNING ACCOUNT RapidgatorNet: Could not login user `XXX@gmail.com` | Login handshake has failed
INFO    ACCOUNT RapidgatorNet: Parsing account info for user `XXX@gmail.com`..



Discussion:
I have had the same issue for about a week now :(

Anyone ?  let me know if i can help in any way or if there is a way to revert the plugin back a version ? 

Seems line 78 is different 
https://github.com/pyload/pyload/blob/8f17f875f6e28f73ddb10da59c6464bd04922222/module/plugins/accounts/RapidgatorNet.py (line 78 show as        self.fail()   )  )  while in the plugin v 11 it shows as self.login_fail()  not sure if that could be a issue. 

In `RapidgatorNet.py`, make these changes:

line 33:
`html = self.load(urlparse.urljoin(self.API_URL, "info")`
change to:
`html = self.load(urlparse.urljoin(self.API_URL, "user/info")`

line 61:
`html = self.load(urlparse.urljoin(self.API_URL, "login"),`
change to:
`html = self.load(urlparse.urljoin(self.API_URL, "user/login"),`


Resolving patch:
diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py
--- a/module/plugins/accounts/RapidgatorNet.py
+++ b/module/plugins/accounts/RapidgatorNet.py
@@ -9,7 +9,7 @@
 class RapidgatorNet(Account):
     __name__    = "RapidgatorNet"
     __type__    = "account"
-    __version__ = "0.11"
+    __version__ = "0.12"
     __status__  = "testing"
 
     __description__ = """Rapidgator.net account plugin"""
@@ -30,7 +30,7 @@ def parse_info(self, user, password, data, req):
             sid = self.get_data(user).get('sid', None)
             assert sid
 
-            html = self.load(urlparse.urljoin(self.API_URL, "info"),
+            html = self.load(urlparse.urljoin(self.API_URL, "user/info"),
                              get={'sid': sid})
 
             self.log_debug("API:USERINFO", html)
@@ -58,7 +58,7 @@ def parse_info(self, user, password, data, req):
 
     def login(self, user, password, data, req):
         try:
-            html = self.load(urlparse.urljoin(self.API_URL, "login"),
+            html = self.load(urlparse.urljoin(self.API_URL, "user/login"),
                              post={'username': user,
                                    'password': password})
 


Test patch:
Repository: pyload/pyload

Issue:
[bug] cannot use self.load(url, decode=...)
Hi,
There is a bug which prevents using `load()` with the `decode="encoding"` parameter:
if you specify `self.load(pyfile.url, decode="unicode-escape")` , for example, you get this error:

```
Traceback (most recent call last):
  File "/usr/share/pyload/module/PluginThread.py", line 191, in run
    pyfile.plugin.preprocessing(self)
  File "/home/user/.pyload-0.4.9/userplugins/internal/Hoster.py", line 185, in preprocessing
    return self.process(self.pyfile)
  File "/home/user/.pyload-0.4.9/userplugins/internal/SimpleHoster.py", line 288, in process
    self.handle_free(pyfile)
  File "/home/user/.pyload-0.4.9/userplugins/hoster/LolabitsEs.py", line 45, in handle_free
    decode="unicode-escape")
  File "/home/user/.pyload-0.4.9/userplugins/internal/Plugin.py", line 354, in load
    res = decode(res, decode)
TypeError: 'str' object is not callable
```

This is because of [Plugin.py#L348](https://github.com/pyload/pyload/blob/stable/module/plugins/internal/Plugin.py#L348):
 `res = decode(res, decode)`

Since the parameter `decode` contains a `str` it has overwritten the global function `decode` an so the call at line 348 fails because `decode` is a `str` and not a function.



Discussion:

Resolving patch:
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py
--- a/module/plugins/internal/Plugin.py
+++ b/module/plugins/internal/Plugin.py
@@ -7,6 +7,7 @@
 import os
 import re
 import urllib
+import sys
 
 if os.name != "nt":
     import grp
@@ -146,7 +147,7 @@ def chunks(iterable, size):
 class Plugin(object):
     __name__    = "Plugin"
     __type__    = "hoster"
-    __version__ = "0.30"
+    __version__ = "0.32"
     __status__  = "testing"
 
     __pattern__ = r'^unmatchable$'
@@ -345,7 +346,7 @@ def load(self, url, get={}, post={}, ref=True, cookies=True, just_header=False,
 
         #@TODO: Move to network in 0.4.10
         if isinstance(decode, basestring):
-            res = decode(res, decode)
+            res = sys.modules[__name__].decode(res, decode) #@TODO: See #1787, use utils.decode() in 0.4.10
 
         if self.pyload.debug:
             frame = inspect.currentframe()


Test patch:
Repository: python/typeshed

Issue:
Stubsabot isn't updating open stubsabot PRs
If I understand correctly, stubsabot has logic that _should_ mean that it auto-updates PRs (providing no manual changes have been made to the PR branch by maintainers).

That part of the script doesn't seem to be working correctly. #8490 was filed by stubsabot on August 5th, to bump `types-stripe` from `3.5.*` to `4.0.*`. But since then, stripe `4.1` was released on August 19th. Since no maintainers have pushed to that PR branch, I think stubsabot _should_ have force-pushed to that branch so that the PR proposes updating to `4.1.*` instead of `4.0.*` -- but it hasn't.


https://github.com/python/typeshed/issues/8778#tasklist-block-e07bdbeb-93d3-4b63-bbcc-ba29a36d73bc



Discussion:

Resolving patch:
diff --git a/scripts/stubsabot.py b/scripts/stubsabot.py
--- a/scripts/stubsabot.py
+++ b/scripts/stubsabot.py
@@ -377,19 +377,19 @@ async def create_or_update_pull_request(*, title: str, body: str, branch_name: s
         response.raise_for_status()
 
 
-def origin_branch_has_changes(branch: str) -> bool:
+def has_non_stubsabot_commits(branch: str) -> bool:
     assert not branch.startswith("origin/")
     try:
         # number of commits on origin/branch that are not on branch or are
         # patch equivalent to a commit on branch
         output = subprocess.check_output(
-            ["git", "rev-list", "--right-only", "--cherry-pick", "--count", f"{branch}...origin/{branch}"],
+            ["git", "log", "--right-only", "--pretty=%an", "--cherry-pick", f"{branch}...origin/{branch}"],
             stderr=subprocess.DEVNULL,
         )
+        return bool(set(output.splitlines()) - {b"stubsabot"})
     except subprocess.CalledProcessError:
         # origin/branch does not exist
         return False
-    return int(output) > 0
 
 
 class RemoteConflict(Exception):
@@ -397,7 +397,7 @@ class RemoteConflict(Exception):
 
 
 def somewhat_safe_force_push(branch: str) -> None:
-    if origin_branch_has_changes(branch):
+    if has_non_stubsabot_commits(branch):
         raise RemoteConflict(f"origin/{branch} has changes not on {branch}!")
     subprocess.check_call(["git", "push", "origin", branch, "--force"])
 


Test patch:
Repository: python/typeshed

Issue:
scripts/create_baseline_stubs.py instructions are outdated
I would prefer:
 ```
 1. Manually review the generated stubs in {stub_dir}
 2. Run tests locally if you want (see CONTRIBUTING.md)
 3. Commit the changes on a new branch and create a typeshed PR
 ```

The CI will check everything anyway, and is set up so that you don't have to run anything locally. This would also be consistent with CONTRIBUTING.md.

_Originally posted by @Akuli in https://github.com/python/typeshed/issues/8686#issuecomment-1237374669_
      


Discussion:
One problem with the generated stubs were overzealous re-exports. Is this still an issue? In that case we should probably mention it. But +1 from me.
@Avasam has a proposed fix for this included as part of #8798 (edit: now merged).
> One problem with the generated stubs were overzealous re-exports. Is this still an issue? In that case we should probably mention it. But +1 from me.

This is _definitely_ still an issue. But @hauntsaninja mentioned to me recently that this can probably be fixed just by passing the `--export-less` argument to stubgen. We should see if that fixes the problem — if so, there's no need to mention it to contributors in the `create_baseline_stubs.py` instructions.

Resolving patch:
diff --git a/scripts/create_baseline_stubs.py b/scripts/create_baseline_stubs.py
--- a/scripts/create_baseline_stubs.py
+++ b/scripts/create_baseline_stubs.py
@@ -47,7 +47,7 @@ def get_installed_package_info(project: str) -> tuple[str, str] | None:
 
 def run_stubgen(package: str, output: str) -> None:
     print(f"Running stubgen: stubgen -o {output} -p {package}")
-    subprocess.run(["stubgen", "-o", output, "-p", package], check=True)
+    subprocess.run(["stubgen", "-o", output, "-p", package, "--export-less"], check=True)
 
 
 def run_black(stub_dir: str) -> None:


Test patch:
Repository: python/typeshed

Issue:
stubsabot: find_first_release_with_py_typed() doesn't work when only the latest release has py.typed
https://github.com/python/typeshed/blob/da9366d0163bb65817216bba13ec4538f0a6e6c0/scripts/stubsabot.py#L173-L180

This function returns `None` if the latest release has `py.typed` and other releases don't. This is because the first `next(release_iter)` consumes the first release and essentially hides it from the rest of this function.

Broken in #9754


Discussion:
cc. @Avasam 

Resolving patch:
diff --git a/scripts/stubsabot.py b/scripts/stubsabot.py
--- a/scripts/stubsabot.py
+++ b/scripts/stubsabot.py
@@ -171,15 +171,15 @@ async def release_contains_py_typed(release_to_download: PypiReleaseDownload, *,
 
 
 async def find_first_release_with_py_typed(pypi_info: PypiInfo, *, session: aiohttp.ClientSession) -> PypiReleaseDownload | None:
-    release_iter = pypi_info.releases_in_descending_order()
+    release_iter = (release for release in pypi_info.releases_in_descending_order() if not release.version.is_prerelease)
+    latest_release = next(release_iter)
     # If the latest release is not py.typed, assume none are.
-    if not (await release_contains_py_typed(release := next(release_iter), session=session)):
+    if not (await release_contains_py_typed(latest_release, session=session)):
         return None
 
-    first_release_with_py_typed: PypiReleaseDownload | None = None
+    first_release_with_py_typed = latest_release
     while await release_contains_py_typed(release := next(release_iter), session=session):
-        if not release.version.is_prerelease:
-            first_release_with_py_typed = release
+        first_release_with_py_typed = release
     return first_release_with_py_typed
 
 


Test patch:
Repository: python/typeshed

Issue:
Stubsabot failed on Sat Mar 11 2023
Stubsabot runs are listed here: https://github.com/python/typeshed/actions/workflows/stubsabot.yml


Discussion:
Who knew that in 2004 paramiko's versioning scheme was alphabetical pokemon https://pypi.org/project/paramiko/#history

Resolving patch:
diff --git a/scripts/stubsabot.py b/scripts/stubsabot.py
--- a/scripts/stubsabot.py
+++ b/scripts/stubsabot.py
@@ -82,6 +82,17 @@ class PypiReleaseDownload:
 ReleaseDownload: TypeAlias = dict[str, Any]
 
 
+def _best_effort_version(version: VersionString) -> packaging.version.Version:
+    try:
+        return packaging.version.Version(version)
+    except packaging.version.InvalidVersion:
+        # packaging.version.Version no longer parses legacy versions
+        try:
+            return packaging.version.Version(version.replace("-", "+"))
+        except packaging.version.InvalidVersion:
+            return packaging.version.Version("0")
+
+
 @dataclass
 class PypiInfo:
     distribution: str
@@ -104,7 +115,7 @@ def get_latest_release(self) -> PypiReleaseDownload:
         return self.get_release(version=self.info["version"])
 
     def releases_in_descending_order(self) -> Iterator[PypiReleaseDownload]:
-        for version in sorted(self.releases, key=packaging.version.Version, reverse=True):
+        for version in sorted(self.releases, key=_best_effort_version, reverse=True):
             yield self.get_release(version=version)
 
 


Test patch:
Repository: python/typeshed

Issue:
`create_baseline_stubs.py` script does not add default values
As title says. Now that typeshed prefers having default values, it would make sense if the `create_baseline_stubs.py` script added them.
Maybe that would be stubgen's job?
For now I'm running https://github.com/JelleZijlstra/stubdefaulter manually as I am moving stubs out of https://github.com/microsoft/python-type-stubs, but I don't think that's even documented/mentioned in the contributing guidelines.


Discussion:
Yeah, really this should be added to stubgen, but in the meantime, I wouldn't be opposed to adding a stubdefaulter step to `create_baseline_stubs.py`
Given that stubdefaulter is only avaiable from github, it won't be cached by pip. Meaning if I add it to `requirements-tests.txt`, it'll cause extra unnecessary downloads for the CI.
Do you think it's a better idea to catch it as part of the create stub script? If not installed, stop the script and tell the user to install stubdefaulter? (`python -m pip install git+https://github.com/JelleZijlstra/stubdefaulter.git#egg=stubdefaulter`). It would be added to the initial `pip install` doc too.

Or ask @JelleZijlstra to publish the tool on PyPI. But if usage in `create_baseline_stubs.py` is meant to be "temporary" (you know how these things go sometimes :P ) until added to stubgen idk if worth it.

Thoughts?
https://pypi.org/project/stubdefaulter/0.1.0/

Oops, I missed the description. I guess that's for 0.2.0 :)
Awesome.
On it!

Resolving patch:
diff --git a/scripts/create_baseline_stubs.py b/scripts/create_baseline_stubs.py
--- a/scripts/create_baseline_stubs.py
+++ b/scripts/create_baseline_stubs.py
@@ -50,6 +50,11 @@ def run_stubgen(package: str, output: str) -> None:
     subprocess.run(["stubgen", "-o", output, "-p", package, "--export-less"], check=True)
 
 
+def run_stubdefaulter(stub_dir: str) -> None:
+    print(f"Running stubdefaulter: stubdefaulter --packages {stub_dir}")
+    subprocess.run(["stubdefaulter", "--packages", stub_dir])
+
+
 def run_black(stub_dir: str) -> None:
     print(f"Running black: black {stub_dir}")
     subprocess.run(["black", stub_dir])
@@ -57,7 +62,7 @@ def run_black(stub_dir: str) -> None:
 
 def run_isort(stub_dir: str) -> None:
     print(f"Running isort: isort {stub_dir}")
-    subprocess.run(["python3", "-m", "isort", stub_dir])
+    subprocess.run([sys.executable, "-m", "isort", stub_dir])
 
 
 def create_metadata(stub_dir: str, version: str) -> None:
@@ -152,6 +157,7 @@ def main() -> None:
         sys.exit(f"Error: {package_dir} already exists (delete it first)")
 
     run_stubgen(package, stub_dir)
+    run_stubdefaulter(stub_dir)
 
     run_isort(stub_dir)
     run_black(stub_dir)


Test patch:
Repository: python/typeshed

Issue:
Remove emoji stubs (not before May 2023)
With https://github.com/carpedm20/emoji/pull/166 merged using the stubs previously contributed to typeshed, the ~~latest release now~~ next release should include type hints. Seems 2.1.0 was tagged directly before type hints being merged. 


Discussion:
As per our [policy](https://github.com/python/typeshed/blob/master/CONTRIBUTING.md#third-party-library-removal-policy), we'll want to wait until the library has shipped with a `py.typed` file for at least six months before removing the stubs from typeshed, but this is great to hear! :)
Emoji 2.1.0 was released on September 17, 2022. 

https://pypi.org/project/emoji/2.1.0/

When in front of a computer, I'll confirm that it has the py.typed marker. If so, this should give us a date for when this should be removed. 

I'll plan to file a separate issue for automated `py.typed` detection to gauge interest in this type of automation / integration. 
> I'll plan to file a separate issue for automated `py.typed` detection to gauge interest in this type of automation / integration.

Stubsabot already does that for us (see, e.g., #8746). If there's already been an `emoji` release that has a `py.typed` file, that indicates that there's a bug in stubsabot.
There doesn't appear to be a bug in stubsabot. The `master` branch has the `py.typed` marker, but the latest release, 2.1.0, released on September 17, does not have the `py.typed` marker.
Probably a bug in emoji packaging
It is a bug in emoji. The `py.typed` marker isn't added to the package https://github.com/carpedm20/emoji/pull/239
We now have a release with a `py.typed` file!

- #9051

Resolving patch:
diff --git a/scripts/stubsabot.py b/scripts/stubsabot.py
--- a/scripts/stubsabot.py
+++ b/scripts/stubsabot.py
@@ -280,7 +280,7 @@ async def get_diff_info(
     versions_to_tags: dict[packaging.version.Version, str] = {}
     for tag in github_info.tags:
         tag_name = tag["name"]
-        # Some packages in typeshed (e.g. emoji) have tag names
+        # Some packages in typeshed have tag names
         # that are invalid to be passed to the Version() constructor,
         # e.g. v.1.4.2
         with contextlib.suppress(packaging.version.InvalidVersion):


Test patch:
Repository: python/typeshed

Issue:
Stubsabot failed on Wed Sep 06 2023
Stubsabot runs are listed here: https://github.com/python/typeshed/actions/workflows/stubsabot.yml


Discussion:
`AssertionError: 2023.3.post1 not in 2023.3`. Possibly we don't handle postreleases.

Resolving patch:
diff --git a/scripts/stubsabot.py b/scripts/stubsabot.py
--- a/scripts/stubsabot.py
+++ b/scripts/stubsabot.py
@@ -223,7 +223,7 @@ def get_updated_version_spec(spec: str, version: packaging.version.Version) -> s
     spec="1.1.1.*", version="1.2.3" -> "1.2.3.*"
     """
     if not spec.endswith(".*"):
-        return _check_spec(version.base_version, version)
+        return _check_spec(str(version), version)
 
     specificity = spec.count(".") if spec.removesuffix(".*") else 0
     rounded_version = version.base_version.split(".")[:specificity]


Test patch: