internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: conda-forge/conda-smithy

Issue:
Failing Feedstock Token Registration
Recent feedstocks are failing to finish creation. During the `conda smithy register-feedstock-token` calls, the following error is encountered:

> AttributeError: 'Namespace' object has no attribute 'github_actions'

**Example:** 
https://github.com/conda-forge/staged-recipes/runs/5260020751?check_suite_focus=true#step:6:2291

This appears to be due to the addition of GitHub Actions tokens in the v3.17 release ([diff](https://github.com/conda-forge/conda-smithy/compare/v3.16.2...v3.17.0)).

- [x] I read [the conda-forge documentation](https://conda-forge.org/docs/user/introduction.html#how-can-i-install-packages-from-conda-forge) and could not find the solution for my problem there.




Discussion:
@isuruf, could you have a look?

Resolving patch:
diff --git a/conda_smithy/cli.py b/conda_smithy/cli.py
--- a/conda_smithy/cli.py
+++ b/conda_smithy/cli.py
@@ -242,7 +242,7 @@ def __init__(self, parser):
         ]:
             scp.add_argument(
                 "--without-{}".format(ci.lower()),
-                dest=ci.lower(),
+                dest=ci.lower().replace("-", "_"),
                 action="store_false",
                 help="If set, {} will be not registered".format(ci),
             )
@@ -767,7 +767,7 @@ def __init__(self, parser):
         ]:
             scp.add_argument(
                 "--without-{}".format(ci.lower()),
-                dest=ci.lower(),
+                dest=ci.lower().replace("-", "_"),
                 action="store_false",
                 help="If set, {} will be not registered".format(ci),
             )
@@ -877,7 +877,7 @@ def __init__(self, parser):
         ]:
             scp.add_argument(
                 "--without-{}".format(ci.lower()),
-                dest=ci.lower(),
+                dest=ci.lower().replace("-", "_"),
                 action="store_false",
                 help="If set, the token on {} will be not changed.".format(ci),
             )


Test patch:
Repository: conda-forge/conda-smithy

Issue:
Handle `conda-forge-pinning` in `.conda` format (maybe with `.tar.bz2 fallback handling)
Currently conda-smithy expects `conda-forge-pinning` to be in `.tar.bz2` format (please see below):

https://github.com/conda-forge/conda-smithy/blob/6de36e002b2d7982d77d4baa2a30e7001a4152ef/conda_smithy/configure_feedstock.py#L2019

Would be good to update this to support `.conda` or maybe better both formats. This way `conda-forge-pinning` can be moved to `.conda` as well


Discussion:

Resolving patch:
diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py
--- a/conda_smithy/configure_feedstock.py
+++ b/conda_smithy/configure_feedstock.py
@@ -2015,8 +2015,17 @@ def commit_changes(forge_file_directory, commit, cs_ver, cfp_ver, cb_ver):
 
 def get_cfp_file_path(temporary_directory):
     pkg = get_most_recent_version("conda-forge-pinning")
+    if pkg.url.endswith(".conda"):
+        ext = ".conda"
+    elif pkg.url.endswith(".tar.bz2"):
+        ext = ".tar.bz2"
+    else:
+        raise RuntimeError(
+            "Could not determine proper conda package extension for "
+            "pinning package '%s'!" % pkg.url
+        )
     dest = os.path.join(
-        temporary_directory, f"conda-forge-pinning-{ pkg.version }.tar.bz2"
+        temporary_directory, f"conda-forge-pinning-{ pkg.version }{ext}"
     )
 
     logger.info(f"Downloading conda-forge-pinning-{ pkg.version }")
@@ -2027,7 +2036,7 @@ def get_cfp_file_path(temporary_directory):
         f.write(response.content)
 
     logger.info(f"Extracting conda-forge-pinning to { temporary_directory }")
-    subprocess.check_call(["bsdtar", "-xf", dest], cwd=temporary_directory)
+    subprocess.check_call(["cph", "x", "--dest", temporary_directory, dest])
 
     logger.debug(os.listdir(temporary_directory))
 


Test patch:
Repository: conda-forge/conda-smithy

Issue:
Python 3 regression: Undefined Jinja2 variables get rendered as empty string in linting
### Solution to issue cannot be found in the documentation.

- [X] I checked the documentation.

### Issue

For linting, undefined Jinja2 variables get rendered by `conda_smithy.utils.NullUndefined`. That class contains a `__unicode__` method that returns the name of the variable. This is useful to put a clear placeholder where variables will be filled by variants from `conda_build_config.yaml` during the actual build. However, `NullUndefined` doesn't overwrite the `__str__` method of Jinja's own `Undefined`, which returns an empty string.

In effect, linting in a Python 2 environment renders, e.g. `- {{ libjpeg }}` as `- libjpeg`, but in a Python 3 environment, we get `- ` which becomes `None` in the `requirements_section` dictionary.

### Installed packages

```shell
-
```


### Environment info

```shell
-
```



Discussion:

Resolving patch:
diff --git a/conda_smithy/utils.py b/conda_smithy/utils.py
--- a/conda_smithy/utils.py
+++ b/conda_smithy/utils.py
@@ -61,7 +61,7 @@ def tmp_directory():
 
 
 class NullUndefined(jinja2.Undefined):
-    def __unicode__(self):
+    def __str__(self):
         return self._undefined_name
 
     def __getattr__(self, name):


Test patch:
Repository: conda-forge/conda-smithy

Issue:
Call a `conda` subcommand instead of `cph`
Currently we call `cph` by subcommand:

https://github.com/conda-forge/conda-smithy/blob/140a2729aa5aaf79eaa41d958e9422b1fbd49ce6/conda_smithy/configure_feedstock.py

However this can lead to [a wonky user experience if things are not installed as expected]( https://gitter.im/conda-forge/conda-forge.github.io?at=63856051326f06602c6d1268 ).

This might be better if we could use a `conda` subcommand instead of calling `cph`. Though one doesn't exist atm, this could be added and used in the future ( https://github.com/conda/conda-package-handling/issues/165 )


Discussion:
Struggling to find info on why I was getting `FileNotFoundError: [Errno 2] No such file or directory: 'cph'`; the gitter link above is not taking me to any relevant content. Hoping by commenting it may help someone else.

It turned out it was because I had `conda-smithy` installed in my `base` environment, but had another environment activated. After `conda deactivate`, all was well.

Resolving patch:
diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py
--- a/conda_smithy/configure_feedstock.py
+++ b/conda_smithy/configure_feedstock.py
@@ -4,6 +4,7 @@
 import os
 from os import fspath
 import re
+import sys
 import subprocess
 import textwrap
 import yaml
@@ -2084,7 +2085,12 @@ def get_cfp_file_path(temporary_directory):
         f.write(response.content)
 
     logger.info(f"Extracting conda-forge-pinning to { temporary_directory }")
-    subprocess.check_call(["cph", "x", "--dest", temporary_directory, dest])
+    cmd = ["cph"]
+    # If possible, avoid needing to activate the environment to access cph
+    if sys.executable:
+        cmd = [sys.executable, "-m", "conda_package_handling.cli"]
+    cmd += ["x", "--dest", temporary_directory, dest]
+    subprocess.check_call(cmd)
 
     logger.debug(os.listdir(temporary_directory))
 


Test patch:
Repository: conda-forge/conda-smithy

Issue:
Soften up-to-date check
Currently if `conda-smithy` is not on the latest version during a rerender, it will raise an error

However if the latest `conda-smithy` is marked broken, this behavior persists without taking into account the latest non-broken version is older than the latest version naively checked

This can leave [bot codes that rerender]( https://github.com/search?q=org%3Aconda-forge+conda+smithy+rerender+language%3APython&type=code&l=Python ) in a dysfunctional state. Meaning core needs to hunt down and fix these lines at the same time a broken conda-smithy emerges (the exact same time we may not have bandwidth to fix it for the same reason)

Some options we might consider here:
* Teach the up-to-date check about broken versions
* Soften the up-to-date check to a warning unless a flag is passed to create the error
* ...?

Please feel free to suggest more


Discussion:
> Teach the up-to-date check about broken versions

Definitely this. It's a pity that we don't publish the `broken` label anymore, so I guess we'll have to use the `repodata.json` sources directly.
We can also mark the release as "not latest" in GH? If that's what we are checking.
Thinks it is using this logic

https://github.com/conda-forge/conda-smithy/blob/123be4e8d6bd7ffcd7251a7d081a004428d6e388/conda_smithy/configure_feedstock.py#L2191-L2204

We do mark them `broken`, but they are still under `main` as well

Do we need to check a different URL than we are using to pick up the repodata patching?
I think we can use this variation:

```python
pkg = max(
  [
    f 
    for f in request.json()['files'] 
    if "broken" not in f["labels"]
  ],
  key=lambda x: VersionOrder(x['version']),
)
```

Resolving patch:
diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py
--- a/conda_smithy/configure_feedstock.py
+++ b/conda_smithy/configure_feedstock.py
@@ -2188,17 +2188,17 @@ def _load_forge_config(forge_dir, exclusive_config_file, forge_yml=None):
     return config
 
 
-def get_most_recent_version(name):
+def get_most_recent_version(name, include_broken=False):
     from conda_build.conda_interface import VersionOrder
 
     request = requests.get(
         "https://api.anaconda.org/package/conda-forge/" + name
     )
     request.raise_for_status()
-
-    pkg = max(
-        request.json()["files"], key=lambda x: VersionOrder(x["version"])
-    )
+    files = request.json()["files"]
+    if not include_broken:
+        files = [f for f in files if "broken" not in f.get("labels", ())]
+    pkg = max(files, key=lambda x: VersionOrder(x["version"]))
 
     PackageRecord = namedtuple("PackageRecord", ["name", "version", "url"])
     return PackageRecord(name, pkg["version"], "https:" + pkg["download_url"])


Test patch:
Repository: conda-forge/conda-smithy

Issue:
Linter hint about `{{ stdlib("c") }}` variable is incorrect for noarch packages
### Solution to issue cannot be found in the documentation.

- [X] I checked the documentation.

### Issue

Platform-specific noarch packages that use `__osx` receive a hint that they should depend on `{{ stdlib("c") }}` but they are noarch and do not require it.

Example: https://github.com/conda-forge/poetry-feedstock/pull/99#issuecomment-2101613350
Code: https://github.com/conda-forge/conda-smithy/blob/f892a5b8ceed015cae5dab453a6869e2ca861f87/conda_smithy/lint_recipe.py#L885
Background: https://github.com/conda-forge/conda-forge.github.io/issues/2102#issuecomment-2103123950



Discussion:
CC @jakirkham and @h-vetinari

Resolving patch:
diff --git a/conda_smithy/lint_recipe.py b/conda_smithy/lint_recipe.py
--- a/conda_smithy/lint_recipe.py
+++ b/conda_smithy/lint_recipe.py
@@ -882,7 +882,7 @@ def check_pins_build_and_requirements(top_level):
         "the respective platform as necessary. For further details, please see "
         "https://github.com/conda-forge/conda-forge.github.io/issues/2102."
     )
-    if any(req.startswith("__osx") for req in run_reqs + constraints):
+    if any(req.startswith("__osx >") for req in run_reqs + constraints):
         if osx_hint not in hints:
             hints.append(osx_hint)
 


Test patch:
diff --git a/tests/test_lint_recipe.py b/tests/test_lint_recipe.py
--- a/tests/test_lint_recipe.py
+++ b/tests/test_lint_recipe.py
@@ -94,6 +94,28 @@ def test_osx_hint(where):
         assert any(h.startswith(expected_message) for h in hints)
 
 
+@pytest.mark.parametrize("where", ["run", "run_constrained"])
+def test_osx_noarch_hint(where):
+    # don't warn on packages that are using __osx as a noarch-marker, see
+    # https://conda-forge.org/docs/maintainer/knowledge_base/#noarch-packages-with-os-specific-dependencies
+    avoid_message = "You're setting a constraint on the `__osx` virtual"
+
+    with tmp_directory() as recipe_dir:
+        with io.open(os.path.join(recipe_dir, "meta.yaml"), "w") as fh:
+            fh.write(
+                f"""
+                package:
+                   name: foo
+                requirements:
+                  {where}:
+                    - __osx  # [osx]
+                """
+            )
+
+        _, hints = linter.main(recipe_dir, return_hints=True)
+        assert not any(h.startswith(avoid_message) for h in hints)
+
+
 class Test_linter(unittest.TestCase):
     def test_pin_compatible_in_run_exports(self):
         meta = {
Repository: lra/mackup

Issue:
Add support for Divvy
Hi, Ira!

mackup should add support for Divvy, to remember configurations and the invoke key combo.

Divvy saves its files here:
userdir/Library/Preferences/com.mizage.direct.Divvy.plist
userdir/Library/Preferences/com.mizage.divvy.plist



Discussion:
A PR is welcome =)


Resolving patch:
diff --git a/mackup.py b/mackup.py
--- a/mackup.py
+++ b/mackup.py
@@ -133,6 +133,8 @@
                PREFERENCES + 'com.panic.Coda2.plist'],
 
     'Curl': ['.netrc'],
+    
+    'Divvy': [PREFERENCES + 'com.mizage.direct.Divvy.plist'],
 
     'Droplr': [PREFERENCES + 'com.droplr.droplr-mac.plist'],
 


Test patch:
Repository: lra/mackup

Issue:
Critical error! Using .mackup as directory option deletes application configs
I used the following config as `~/.mackup.cfg` 
```
[storage]
engine = file_system
path = /Users/myuser
directory = .mackup
```

And running `mackup backup` deleted all my application configs because [this step](https://github.com/lra/mackup/blob/master/mackup/application.py#L114-L116) doesn't check if `home_filepath` is equal to `mackup_filepath` therefore copying files to `.mackup` then deleting `.mackup`...

Thanks a lot :(


Discussion:
It's an edge case, we need to make sure that a user can't use Mackup`s folder as a storage folder.

Thanks for reporting.

Resolving patch:
diff --git a/mackup/config.py b/mackup/config.py
--- a/mackup/config.py
+++ b/mackup/config.py
@@ -3,7 +3,8 @@
 import os
 import os.path
 
-from .constants import (MACKUP_BACKUP_PATH,
+from .constants import (CUSTOM_APPS_DIR,
+                        MACKUP_BACKUP_PATH,
                         MACKUP_CONFIG_FILE,
                         ENGINE_DROPBOX,
                         ENGINE_GDRIVE,
@@ -228,6 +229,10 @@ def _parse_directory(self):
         """
         if self._parser.has_option('storage', 'directory'):
             directory = self._parser.get('storage', 'directory')
+            # Don't allow CUSTOM_APPS_DIR as a storage directory
+            if directory == CUSTOM_APPS_DIR:
+                raise ConfigError("{} cannot be used as a storage directory."
+                                  .format(CUSTOM_APPS_DIR))
         else:
             directory = MACKUP_BACKUP_PATH
 


Test patch:
Repository: lra/mackup

Issue:
AssertionError on Ubuntu 18.04.2 LTS, Mackup 0.8.25, Python 3.6.7
I'm trying to `mackup restore` on a machine running

- Ubuntu 18.04.2 LTS
- Mackup 0.8.25
- Python 3.6.7

It fails immediately with the following:

```
Traceback (most recent call last):
  File "/home/REDACTED/.pyenv/versions/3.6.7/bin/mackup", line 10, in <module>
    sys.exit(main())
  File "/home/REDACTED/.pyenv/versions/3.6.7/lib/python3.6/site-packages/mackup/main.py", line 102, in main
    verbose)
  File "/home/REDACTED/.pyenv/versions/3.6.7/lib/python3.6/site-packages/mackup/application.py", line 26, in __init__
    assert isinstance(files, set)
AssertionError
```

I sync via dropbox, and to debug I made a tar.gz of the original mackup folder and copied/extracted it directly with no luck :( Not sure how to proceed to debug further, I've also tried `mackup restore -v` with no luck.


Discussion:
me too, it may be a spelling error, try to fix with this:
`sudo vi /usr/local/lib/python2.7/dist-packages/mackup/application.py`
go to line 26, note it or replace it with follow:
`assert isinstance(files, list)`
Then it will be fine
@lubocheng Brilliant!  This worked.  Without this fix Mackup is plain broken on python 2 and 3
Same here on macOS with Mackup 0.8.25
Duplicate of https://github.com/lra/mackup/issues/1410

Looks like the issue is caused by the change in this commit: https://github.com/lra/mackup/pull/1402/commits/54e5d98ac84e9db10039cd2b28fe5c02b4460541#diff-cfe235ad3bb75c756c89b6a752e6dd4aR142. It seems that adding `sorted` there turns the set into an array.

```python
(Pdb) self.apps[name]['configuration_files']
{'.mackup', '.mackup.cfg'}
(Pdb) sorted(self.apps[name]['configuration_files'])
['.mackup', '.mackup.cfg']
```

which fails the assertion in the stack trace above:

```python
assert isinstance(files, set)
```


PR available #1411

Resolving patch:
diff --git a/mackup/appsdb.py b/mackup/appsdb.py
--- a/mackup/appsdb.py
+++ b/mackup/appsdb.py
@@ -139,7 +139,7 @@ def get_files(self, name):
         Returns:
             set of str.
         """
-        return sorted(self.apps[name]['configuration_files'])
+        return self.apps[name]['configuration_files']
 
     def get_app_names(self):
         """


Test patch:
Repository: lra/mackup

Issue:
Config Parser deprecated issue
``` ~ % mackup restore -f 
Traceback (most recent call last):
  File "/usr/local/bin/mackup", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/Cellar/mackup/0.8.37/libexec/lib/python3.12/site-packages/mackup/main.py", line 66, in main
    mckp = Mackup()
           ^^^^^^^^
  File "/usr/local/Cellar/mackup/0.8.37/libexec/lib/python3.12/site-packages/mackup/mackup.py", line 24, in __init__
    self._config = config.Config()
                   ^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/mackup/0.8.37/libexec/lib/python3.12/site-packages/mackup/config.py", line 46, in __init__
    self._parser = self._setup_parser(filename)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/mackup/0.8.37/libexec/lib/python3.12/site-packages/mackup/config.py", line 150, in _setup_parser
    parser = configparser.SafeConfigParser(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
```


Discussion:

Resolving patch:
diff --git a/mackup/appsdb.py b/mackup/appsdb.py
--- a/mackup/appsdb.py
+++ b/mackup/appsdb.py
@@ -26,7 +26,7 @@ def __init__(self):
         self.apps = dict()
 
         for config_file in ApplicationsDatabase.get_config_files():
-            config = configparser.SafeConfigParser(allow_no_value=True)
+            config = configparser.ConfigParser(allow_no_value=True)
 
             # Needed to not lowercase the configuration_files in the ini files
             config.optionxform = str
diff --git a/mackup/config.py b/mackup/config.py
--- a/mackup/config.py
+++ b/mackup/config.py
@@ -139,7 +139,7 @@ def _setup_parser(self, filename=None):
             filename (str) or None
 
         Returns:
-            SafeConfigParser
+            ConfigParser
         """
         assert isinstance(filename, str) or filename is None
 
@@ -147,7 +147,7 @@ def _setup_parser(self, filename=None):
         if not filename:
             filename = MACKUP_CONFIG_FILE
 
-        parser = configparser.SafeConfigParser(
+        parser = configparser.ConfigParser(
             allow_no_value=True, inline_comment_prefixes=(";", "#")
         )
         parser.read(os.path.join(os.path.join(os.environ["HOME"], filename)))


Test patch:
Repository: alpa-projects/alpa

Issue:
Adding the `pjit` in the comparison
Some people are more familiar with using model parallel via [`pjit`](https://github.com/google/jax/blob/main/jax/experimental/pjit.py). What about adding one more rows [here](https://github.com/alpa-projects/alpa/blob/main/docs/gallery/tutorials/alpa_vs_pmap.py#L46-L52)?


Discussion:
Pjit will be exactly the same as xmap in this table.  I can add it later

Resolving patch:
diff --git a/docs/gallery/tutorials/alpa_vs_pmap.py b/docs/gallery/tutorials/alpa_vs_pmap.py
--- a/docs/gallery/tutorials/alpa_vs_pmap.py
+++ b/docs/gallery/tutorials/alpa_vs_pmap.py
@@ -34,14 +34,15 @@
 # TODO
 
 ################################################################################
-# Comparing ``alpa.parallelize``, ``pmap``, and ``xmap``
-# ------------------------------------------------------
+# Comparing ``alpa.parallelize``, ``pmap``, ``xmap``, and ``pjit``
+# -----------------------------------------------------------------
 # Besides ``pmap``, jax also provides
-# `xmap <https://jax.readthedocs.io/en/latest/notebooks/xmap_tutorial.html>`_
+# `xmap <https://jax.readthedocs.io/en/latest/notebooks/xmap_tutorial.html>`_ and 
+# `pjit <https://jax.readthedocs.io/en/latest/jax-101/08-pjit.html>`_
 # for more advanced parallelization.
-# The table below compares the features of ``alpa.parallelize``, ``pmap``, and ``xmap``.
-# In summary, ``alpa.parallelize`` supports more parallelism techniques in a
-# more automatic way.
+# The table below compares the features of ``alpa.parallelize``, ``pmap``, ``xmap`` 
+# and ``pjit``. In summary, ``alpa.parallelize`` supports more parallelism 
+# techniques in a more automatic way.
 #
 # ================  ================ ==================== ==================== =========
 # Transformation    Data Parallelism Operator Parallelism Pipeline Parallelism Automated
@@ -49,6 +50,7 @@
 # alpa.parallelize  yes              yes                  yes                  yes
 # pmap              yes              no                   no                   no
 # xmap              yes              yes                  no                   no
+# pjit              yes              yes                  no                   no
 # ================  ================ ==================== ==================== =========
 #
 # .. note::


Test patch: