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

Issue:
BUG missing one second-order wavelet for low-T Sc1D and JTFS
MWE 

```python
import numpy as np
from kymatio.numpy import Scattering1D

N = 1024
x = np.zeros(N)
S = Scattering1D(J=8, shape=(N,), T=2)
Sx = S(x)
```

Traceback:

```
IndexError                                Traceback (most recent call last)
Cell In [5], line 7
      4 kwargs = dict(J=8, shape=(N,))
      6 S = Scattering1D(**kwargs, T=2)
----> 7 S(x)

File ~/kymatio/kymatio/frontend/numpy_frontend.py:10, in ScatteringNumPy.__call__(self, x)
      7 def __call__(self, x):
      8     """This method is an alias for `scattering`."""
---> 10     return self.scattering(x)

File ~/kymatio/kymatio/scattering1d/frontend/base_frontend.py:116, in ScatteringBase1D.scattering(self, x)
    113 elif self.out_type == 'dict':
    114     S = dict()
--> 116 for path in S_gen:
    117     path['order'] = len(path['n'])
    118     if self.average == 'local':

File ~/kymatio/kymatio/scattering1d/core/scattering1d.py:97, in scattering1d(U_0, backend, filters, oversampling, average_local)
     94 sub2_adj = min(j2, log2_T) if average_local else j2
     95 k2 = max(sub2_adj - k1 - oversampling, 0)
---> 97 U_2_c = backend.cdgmm(U_1_hat, psi2[n2]['levels'][k1])
     98 U_2_hat = backend.subsample_fourier(U_2_c, 2**k2)
     99 # take the modulus

IndexError: list index out of range
```


Discussion:

Resolving patch:
diff --git a/kymatio/scattering1d/filter_bank.py b/kymatio/scattering1d/filter_bank.py
--- a/kymatio/scattering1d/filter_bank.py
+++ b/kymatio/scattering1d/filter_bank.py
@@ -377,8 +377,8 @@ def scattering_filter_factory(N, J, Q, T, filterbank):
             j = get_max_dyadic_subsampling(xi, sigma, **filterbank_kwargs)
 
             # Resample to smaller resolutions if necessary (beyond 1st layer)
-            # The idiom min(previous_J, j, log2_T) implements "j1 < j2"
-            for level in range(1, min(previous_J, j, log2_T)):
+            # The idiom min(previous_J, j, 1+log2_T) implements "j1 < j2"
+            for level in range(1, min(previous_J, j, 1+log2_T)):
                 psi_level = psi_levels[0].reshape(2 ** level, -1).mean(axis=0)
                 psi_levels.append(psi_level)
             psi_f.append({'levels': psi_levels, 'xi': xi, 'sigma': sigma, 'j': j})


Test patch:
diff --git a/tests/scattering1d/test_numpy_scattering1d.py b/tests/scattering1d/test_numpy_scattering1d.py
--- a/tests/scattering1d/test_numpy_scattering1d.py
+++ b/tests/scattering1d/test_numpy_scattering1d.py
@@ -114,6 +114,16 @@ def test_Scattering1D_average_global(self, backend):
         Sx = sc(x)
         assert Sx.shape[-1] == 1
 
+    def test_981(self, backend):
+        """
+        Tests against bug #981, in which some low values of T triggered an
+        `IndexError` in second-order backend.cdgmm
+        """
+        N = 1024
+        x = np.zeros(N)
+        sc = Scattering1D(J=8, shape=(N,), T=2)
+        Sx = sc(x)
+        assert Sx.shape[-1] == N/sc.T
 
 
 frontends = ['numpy', 'sklearn']
Repository: unbit/django-uwsgi

Issue:
Any plans to support Django 3.x
The app currently does not appear to work with the new Django release. First issue i noticed is that no workers are listed on the panel. Also when I try to hit the admin page i get the following error:

```
admin_static' is not a registered tag library. Must be one of:
account
admin_list
admin_modify
admin_urls
cache
debugger_tags
highlighting
i18n
indent_text
l10n
log
rest_framework
socialaccount
static
syntax_color
tz
widont
```

I believe admin_static is just static now.


Discussion:

Resolving patch:
diff --git a/django_uwsgi/panels.py b/django_uwsgi/panels.py
--- a/django_uwsgi/panels.py
+++ b/django_uwsgi/panels.py
@@ -20,9 +20,10 @@ def nav_subtitle(self):
             status = _('uWSGI is missing =(')
         return status
 
-    def process_response(self, request, response):
+    def generate_stats(self, request, response):
         if uwsgi is None:
             self.record_stats({'unavailable': True})
         else:
             from .stats import get_uwsgi_stats
             self.record_stats(get_uwsgi_stats())
+    process_response = generate_stats
diff --git a/django_uwsgi/stats.py b/django_uwsgi/stats.py
--- a/django_uwsgi/stats.py
+++ b/django_uwsgi/stats.py
@@ -32,7 +32,6 @@ def get_uwsgi_stats():
             ('cores', uwsgi.cores),
             ('cwd', os.getcwd()),
             ('logsize', uwsgi.logsize()),
-            ('cache_exists', uwsgi.cache_exists),
             ('spooler_pid', uwsgi.spooler_pid() if uwsgi.opt.get('spooler') else _('disabled')),
             ('threads', _('enabled') if uwsgi.has_threads else _('disabled'))
         ],


Test patch:
Repository: zostera/django-bootstrap5

Issue:
Injection in render_tag
`render_tag` should not try  to form attributes:

```python
> render_tag('div', {'class': '{tag}'})
expected: <div class="{tag}"></div>
actual: <div class="div"></div>

> render_tag('div', {'class': '{foo}'})
expected: <div class="{foo}"></div>
actual: KeyError
```


Discussion:

Resolving patch:
diff --git a/src/django_bootstrap5/html.py b/src/django_bootstrap5/html.py
--- a/src/django_bootstrap5/html.py
+++ b/src/django_bootstrap5/html.py
@@ -20,8 +20,8 @@ def render_link_tag(url):
 def render_tag(tag, attrs=None, content=None, close=True):
     """Render an HTML tag."""
     attrs_string = flatatt(attrs) if attrs else ""
-    builder = "<{tag}" + attrs_string + ">{content}"
+    builder = "<{tag}{attrs}>{content}"
     content_string = text_value(content)
     if content_string or close:
         builder += "</{tag}>"
-    return format_html(builder, tag=tag, content=content_string)
+    return format_html(builder, tag=tag, attrs=attrs_string, content=content_string)


Test patch:
diff --git a/tests/test_html.py b/tests/test_html.py
--- a/tests/test_html.py
+++ b/tests/test_html.py
@@ -8,3 +8,4 @@ def test_render_tag(self):
         self.assertEqual(render_tag("span"), "<span></span>")
         self.assertEqual(render_tag("span", content="foo"), "<span>foo</span>")
         self.assertEqual(render_tag("span", attrs={"bar": 123}, content="foo"), '<span bar="123">foo</span>')
+        self.assertEqual(render_tag("span", attrs={"bar": "{foo}"}, content="foo"), '<span bar="{foo}">foo</span>')
Repository: zostera/django-bootstrap5

Issue:
Rendering form with exclude is broken
Example:

```
{% bootstrap_form form exclude="ignore_field" %}
```
field renderer returns empty (unsafe) string when encountering the ignored field. When concatenated with safe text, the resulting string becomes unsafe and renders escaped html string into template instead rendering the form.


Discussion:

Resolving patch:
diff --git a/src/django_bootstrap5/renderers.py b/src/django_bootstrap5/renderers.py
--- a/src/django_bootstrap5/renderers.py
+++ b/src/django_bootstrap5/renderers.py
@@ -464,7 +464,7 @@ def field_before_label(self):
 
     def render(self):
         if self.field.name in self.exclude.replace(" ", "").split(","):
-            return ""
+            return mark_safe("")
         if self.field.is_hidden:
             return text_value(self.field)
 


Test patch:
Repository: zostera/django-bootstrap5

Issue:
Django-4.0 Compatibility



Discussion:

Resolving patch:
diff --git a/example/urls.py b/example/urls.py
--- a/example/urls.py
+++ b/example/urls.py
@@ -1,4 +1,4 @@
-from django.conf.urls import url
+from django.urls import path
 
 from app.views import (
     DefaultFormByFieldView,
@@ -13,13 +13,13 @@
 )
 
 urlpatterns = [
-    url(r"^$", HomePageView.as_view(), name="home"),
-    url(r"^formset$", DefaultFormsetView.as_view(), name="formset_default"),
-    url(r"^form$", DefaultFormView.as_view(), name="form_default"),
-    url(r"^form_by_field$", DefaultFormByFieldView.as_view(), name="form_by_field"),
-    url(r"^form_horizontal$", FormHorizontalView.as_view(), name="form_horizontal"),
-    url(r"^form_inline$", FormInlineView.as_view(), name="form_inline"),
-    url(r"^form_with_files$", FormWithFilesView.as_view(), name="form_with_files"),
-    url(r"^pagination$", PaginationView.as_view(), name="pagination"),
-    url(r"^misc$", MiscView.as_view(), name="misc"),
+    path("", HomePageView.as_view(), name="home"),
+    path("formset", DefaultFormsetView.as_view(), name="formset_default"),
+    path("form", DefaultFormView.as_view(), name="form_default"),
+    path("form_by_field", DefaultFormByFieldView.as_view(), name="form_by_field"),
+    path("form_horizontal", FormHorizontalView.as_view(), name="form_horizontal"),
+    path("form_inline", FormInlineView.as_view(), name="form_inline"),
+    path("form_with_files", FormWithFilesView.as_view(), name="form_with_files"),
+    path("pagination", PaginationView.as_view(), name="pagination"),
+    path("misc", MiscView.as_view(), name="misc"),
 ]


Test patch:
Repository: zostera/django-bootstrap5

Issue:
Pass "horizontal_field_offset_class" to child renderers
The "horizontal_field_offset_class" doesnt pass to child renderers (from form to fields), so it actually does't work as described in documentation.


Discussion:

Resolving patch:
diff --git a/src/django_bootstrap5/renderers.py b/src/django_bootstrap5/renderers.py
--- a/src/django_bootstrap5/renderers.py
+++ b/src/django_bootstrap5/renderers.py
@@ -94,6 +94,7 @@ def get_kwargs(self):
             "size": self.size,
             "horizontal_label_class": self.horizontal_label_class,
             "horizontal_field_class": self.horizontal_field_class,
+            "horizontal_field_offset_class": self.horizontal_field_offset_class,
             "checkbox_layout": self.checkbox_layout,
             "checkbox_style": self.checkbox_style,
             "inline_field_class": self.inline_field_class,


Test patch:
diff --git a/tests/test_bootstrap_form.py b/tests/test_bootstrap_form.py
--- a/tests/test_bootstrap_form.py
+++ b/tests/test_bootstrap_form.py
@@ -14,6 +14,10 @@ class ShowLabelTestForm(forms.Form):
     subject = forms.CharField()
 
 
+class CheckboxTestForm(forms.Form):
+    test = forms.BooleanField()
+
+
 class NonFieldErrorTestForm(FormTestForm):
     non_field_error_message = "This is a non field error."
 
@@ -145,3 +149,41 @@ def test_show_label_false_in_formset(self):
             '<label class="visually-hidden" for="id_form-0-subject">Subject</label>',
             self.render("{% bootstrap_formset formset show_label=False %}", {"formset": TestFormSet()}),
         )
+
+
+class HorizontalFormTestCase(BootstrapTestCase):
+    def test_horizontal_field_offset_class(self):
+        """Test form with horizontal field offset class."""
+        form = CheckboxTestForm()
+        html = self.render(
+            "{% bootstrap_form form layout='horizontal' %}",
+            context={"form": form},
+        )
+        self.assertHTMLEqual(
+            html,
+            (
+                '<div class="django_bootstrap5-req mb-3 row">'
+                '<div class="col-sm-10 offset-sm-2">'
+                '<div class="form-check">'
+                '<input class="form-check-input" id="id_test" name="test" required type="checkbox">'
+                '<label class="form-check-label" for="id_test">Test</label>'
+                "</div>"
+                "</div>"
+            ),
+        )
+        html = self.render(
+            "{% bootstrap_form form layout='horizontal' horizontal_field_offset_class='foo-bar' %}",
+            context={"form": form},
+        )
+        self.assertHTMLEqual(
+            html,
+            (
+                '<div class="django_bootstrap5-req mb-3 row">'
+                '<div class="col-sm-10 foo-bar">'
+                '<div class="form-check">'
+                '<input class="form-check-input" id="id_test" name="test" required type="checkbox">'
+                '<label class="form-check-label" for="id_test">Test</label>'
+                "</div>"
+                "</div>"
+            ),
+        )
Repository: deis/deis

Issue:
'deis register' with existing cookie causes "Login Failed"



Discussion:
I haven't been able to reproduce this yet.

@gabrtv suggests re-provisioning a controller in place after registering, then registering again.


Resolving patch:
diff --git a/client/deis.py b/client/deis.py
--- a/client/deis.py
+++ b/client/deis.py
@@ -77,6 +77,14 @@ def __init__(self):
             self.cookies.load()
             self.cookies.clear_expired_cookies()
 
+    def clear(self, domain):
+        """Clear cookies for the specified domain."""
+        try:
+            self.cookies.clear(domain)
+            self.cookies.save()
+        except KeyError:
+            pass
+
     def git_root(self):
         """
         Return the absolute path from the git repository root
@@ -300,6 +308,8 @@ def auth_login(self, args):
             password = getpass('password: ')
         url = urlparse.urljoin(controller, '/api/auth/login/')
         payload = {'username': username, 'password': password}
+        # clear any cookies for this controller's domain
+        self._session.clear(urlparse.urlparse(url).netloc)
         # prime cookies for login
         self._session.get(url, headers=headers)
         # post credentials to the login URL


Test patch:
Repository: deis/deis

Issue:
CLI stack trace if you haven't done "deis register"
Forgot to `deis register` and tried `deis create --flavor=ec2-us-west-2`. Got a python stack trace from the client. We should handle this more cleanly with a human-readable error.



Discussion:
I haven't succeeded in reproducing this yet.


Resolving patch:
diff --git a/client/deis.py b/client/deis.py
--- a/client/deis.py
+++ b/client/deis.py
@@ -236,7 +236,11 @@ def _dispatch(self, method, path, body=None,
         Dispatch an API request to the active Deis controller
         """
         func = getattr(self._session, method.lower())
-        url = urlparse.urljoin(self._settings['controller'], path, **kwargs)
+        controller = self._settings['controller']
+        if not controller:
+            raise EnvironmentError(
+                'No active controller. Use `deis login` or `deis register` to get started.')
+        url = urlparse.urljoin(controller, path, **kwargs)
         response = func(url, data=body, headers=headers)
         return response
 
@@ -646,7 +650,7 @@ def formations_create(self, args):
         try:
             self._session.git_root()  # check for a git repository
         except EnvironmentError:
-            print 'No git repository found, use `git init` to create one'
+            print 'No git repository found, use `git init` to create one.'
             return
         for opt in ('--id',):
             o = args.get(opt)
@@ -1345,9 +1349,8 @@ def main():
     # dispatch the CLI command
     try:
         method(args)
-    except EnvironmentError:
-        print 'Could not find git remote for deis'
-        raise DocoptExit()
+    except EnvironmentError as err:
+        raise DocoptExit(err.message)
 
 
 if __name__ == '__main__':


Test patch:
Repository: deis/deis

Issue:
`deis open` should open a browser window with the application URL
Right now checking your application requires finding the FQDN of a proxy and pasting that into `curl` or a browser tab.  We should open URLs automatically with `deis open`.



Discussion:

Resolving patch:
diff --git a/client/deis.py b/client/deis.py
--- a/client/deis.py
+++ b/client/deis.py
@@ -15,6 +15,7 @@
   create        create a new container formation
   scale         scale container types (web=2, worker=1)
   logs          print most recent logs for the formation
+  open          open a URL for the formation in a browser
   info          print a representation of the formation
   converge      force-converge all nodes in the formation
   calculate     recalculate and update the formation databag
@@ -44,18 +45,19 @@
 import glob
 import json
 import os.path
+import random
 import re
 import subprocess
 import sys
 import time
 import urlparse
+import webbrowser
 import yaml
 
 from docopt import docopt
 from docopt import DocoptExit
 import requests
 
-
 __version__ = '0.0.5'
 
 
@@ -1144,6 +1146,28 @@ def providers(self, args):
         """
         return self.providers_list(args)
 
+    def open(self, args):
+        """
+        Open a URL to the application in a browser
+
+        Usage: deis open
+        """
+        formation = args.get('--formation')
+        if not formation:
+            formation = self._session.formation
+        # TODO: replace with a proxy lookup that doesn't have any side effects
+        # this currently recalculates and updates the databag
+        response = self._dispatch('post',
+                                  "/api/formations/{}/calculate".format(formation))
+        if response.status_code == requests.codes.ok:  # @UndefinedVariable
+            databag = json.loads(response.content)
+            proxy = random.choice(databag['nodes'].get('proxy', {}).values())
+            # use the OS's default handler to open this URL
+            webbrowser.open('http://{}/'.format(proxy))
+            return proxy
+        else:
+            print('Error!', response.text)
+
     def providers_create(self, args):
         """
         Create a provider for use by Deis


Test patch:
Repository: deis/deis

Issue:
500 errors should log stack trace by default
Running Django with DEBUG=True is too verbose (and bad practice), but we need to see errors when they occur.

See issue #77. 



Discussion:

Resolving patch:
diff --git a/deis/settings.py b/deis/settings.py
--- a/deis/settings.py
+++ b/deis/settings.py
@@ -195,12 +195,29 @@
 LOGGING = {
     'version': 1,
     'disable_existing_loggers': False,
+    'formatters': {
+        'verbose': {
+            'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
+        },
+        'simple': {
+            'format': '%(levelname)s %(message)s'
+        },
+    },
     'filters': {
         'require_debug_false': {
             '()': 'django.utils.log.RequireDebugFalse'
         }
     },
     'handlers': {
+        'null': {
+            'level': 'DEBUG',
+            'class': 'logging.NullHandler',
+        },
+        'console': {
+            'level': 'DEBUG',
+            'class': 'logging.StreamHandler',
+            'formatter': 'simple'
+        },
         'mail_admins': {
             'level': 'ERROR',
             'filters': ['require_debug_false'],
@@ -208,9 +225,19 @@
         }
     },
     'loggers': {
+        'django': {
+            'handlers': ['null'],
+            'propagate': True,
+            'level': 'INFO',
+        },
         'django.request': {
-            'handlers': ['mail_admins'],
-            'level': 'ERROR',
+            'handlers': ['console', 'mail_admins'],
+            'level': 'WARNING',
+            'propagate': True,
+        },
+        'api': {
+            'handlers': ['console', 'mail_admins'],
+            'level': 'INFO',
             'propagate': True,
         },
     }


Test patch:
Repository: deis/deis

Issue:
`deis logs` should say "no logs," not "Error!"
If you try `deis logs` before the formation has been scaled up and `git push`ed, there won't be a logfile on the server:

```
(deis)gradishar:example-python-flask matt$ deis logs
('Error!', u'<h1>Server Error (500)</h1>')
```

I think this would be preferable:

```
(deis)gradishar:example-python-flask matt$ deis logs
No logs for vulcan-ponytail.
```



Discussion:
Agreed, this is bad form.  Reproduce steps:

```
$ deis create --flavor=ec2-us-west-2
Creating formation... done, created unisex-gemstone
Git remote deis added

Creating runtime layer... done in 2s
Creating proxy layer... done in 1s

Use `deis layers:scale proxy=1 runtime=1` to scale a basic formation
$ deis logs
('Error!', u'<h1>Server Error (500)</h1>')
```


Resolving patch:
diff --git a/api/views.py b/api/views.py
--- a/api/views.py
+++ b/api/views.py
@@ -225,7 +225,12 @@ def converge(self, request, **kwargs):
 
     def logs(self, request, **kwargs):
         formation = self.get_object()
-        logs = formation.logs()
+        try:
+            logs = formation.logs()
+        except EnvironmentError:
+            return Response("No logs for {}".format(formation.id),
+                            status=status.HTTP_404_NOT_FOUND,
+                            content_type='text/plain')
         return Response(logs, status=status.HTTP_200_OK,
                         content_type='text/plain')
 
diff --git a/client/deis.py b/client/deis.py
--- a/client/deis.py
+++ b/client/deis.py
@@ -1056,6 +1056,8 @@ def logs(self, args):
                                   "/api/formations/{}/logs".format(formation))
         if response.status_code == requests.codes.ok:  # @UndefinedVariable
             print(response.json())
+        elif response.status_code == requests.codes.not_found:  # @UndefinedVariable
+            print(response.json())
         else:
             print('Error!', response.text)
 


Test patch:
diff --git a/api/tests/formation.py b/api/tests/formation.py
--- a/api/tests/formation.py
+++ b/api/tests/formation.py
@@ -136,9 +136,13 @@ def test_formation_actions(self):
         if not os.path.exists(settings.DEIS_LOG_DIR):
             os.mkdir(settings.DEIS_LOG_DIR)
         path = os.path.join(settings.DEIS_LOG_DIR, formation_id + '.log')
+        url = '/api/formations/{formation_id}/logs'.format(**locals())
+        response = self.client.post(url)
+        self.assertEqual(response.status_code, 404)
+        self.assertEqual(response.data, 'No logs for {}'.format(formation_id))
+        # write out some fake log data and try again
         with open(path, 'w') as f:
             f.write(FAKE_LOG_DATA)
-        url = '/api/formations/{formation_id}/logs'.format(**locals())
         response = self.client.post(url)
         self.assertEqual(response.status_code, 200)
         self.assertEqual(response.data, FAKE_LOG_DATA)
Repository: deis/deis

Issue:
Cannot add SSH key without comment
Offending key (note missing comment at the end):

```
ssh-dss AAAAB3NzaC1kc3MAAACBAN3JC+IAAAIG49qoWssAX1RtqkFWQRIS/1jXX9zVhHEP1n38jMZwNkcjmad8mzQTUD09h8IF4DUqVt1x+NVkRYq1ALm/+51ZSOFwbMmCHtRgBCePdEZ+DBn1cnS9yKCYSXM9BywPWEuXhzQWqWLqPtDzB0PrIW9/MQAAvopnPAMNAAAAFQCPLBerskbdv21rS8La4vAMP9xnNwAAAIEAmdVnqBmExptVb7wnU3O9tZkqcwRFOeJzVwxx6t+vAKpoNwrk9bkXt/fxkbBmMPr8Fx/uGZQVyjgRK2FF5NGnxb90lmfbeRDi1sNfaCKkOq3OGAJ+5wCVEBvzeRiCArAhk+AgbC08gWS3y+seBGLMpZ8mL7Iryy6Q38vgoZlGZ+EAAACAE+Qo56S1Y1gKn9GzVfdRm/I/32cuwtLbgRfEcA49F12FdGBxlbG4XpA+Unb7q1GUjh886dbdwS3wWxuX+yt4P1NbwGYoMHdNoXL6lazUchmAimbF0c0Nd0RMXg9R7bjLGFNEKDGR/qz+gdABZcxSINR9oCOkvK+x8KsrIK+u/5g=
```

Offending regex:

```
match = re.match(r'^(ssh-...) ([^ ]+) (.+)', data)
```



Discussion:

Resolving patch:
diff --git a/client/deis.py b/client/deis.py
--- a/client/deis.py
+++ b/client/deis.py
@@ -981,7 +981,7 @@ def keys_add(self, args):
                 return
         with open(path) as f:
             data = f.read()
-        match = re.match(r'^(ssh-...) ([^ ]+) (.+)', data)
+        match = re.match(r'^(ssh-...) ([^ ]+) ?(.*)', data)
         if not match:
             print('Could not parse public key material')
             return


Test patch:
Repository: deis/deis

Issue:
No SSH keys still prompts user for input
On `deis register` or `deis keys:add` we prompt the user for input even if we didn't find any keys:

```
gabriel@alpha:~$ deis register http://gabrtv.deis.io/
username: test
password: 
email: gabriel+test1@opdemand.com
Registered test
Logged in as test

Found the following SSH public keys:
Which would you like to use with Deis? 
Aborting
```

We need to instead print a "No keys found" message and continue on.



Discussion:

Resolving patch:
diff --git a/client/deis.py b/client/deis.py
--- a/client/deis.py
+++ b/client/deis.py
@@ -968,6 +968,9 @@ def keys_add(self, args):
         if not path:
             ssh_dir = os.path.expanduser('~/.ssh')
             pubkeys = glob.glob(os.path.join(ssh_dir, '*.pub'))
+            if not pubkeys:
+                print('No SSH public keys found')
+                return
             print('Found the following SSH public keys:')
             for i, k in enumerate(pubkeys):
                 key = k.split(os.path.sep)[-1]


Test patch: