anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: beautify-web/js-beautify
Issue: Python: missing explicit dependency on "six" package

Platform: OSX 10.9, pip: 1.5.5, js-beautify: 1.5.1

It appears that "six" is not explicitly listed as a dependency in setup.py.

```
$ sudo pip install jsbeautifier
Downloading/unpacking jsbeautifier
  Downloading jsbeautifier-1.5.1.tar.gz
  Running setup.py (path:/private/tmp/pip_build_root/jsbeautifier/setup.py) egg_info for package jsbeautifier
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/private/tmp/pip_build_root/jsbeautifier/setup.py", line 4, in <module>
        from jsbeautifier.__version__ import __version__
      File "jsbeautifier/__init__.py", line 8, in <module>
        import six
    ImportError: No module named six
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/private/tmp/pip_build_root/jsbeautifier/setup.py", line 4, in <module>

    from jsbeautifier.__version__ import __version__

  File "jsbeautifier/__init__.py", line 8, in <module>

    import six
```

Temporary workaround:

```
pip install six
```


Changed files:
python/setup.py

diff --git a/python/setup.py b/python/setup.py
index e7d85838..6e539a5c 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -14,5 +14,6 @@ setup(name='jsbeautifier',
       scripts=['js-beautify'],
       packages=['jsbeautifier', 'jsbeautifier.tests',
                 'jsbeautifier.unpackers', 'jsbeautifier.unpackers.tests'],
+      install_requires=["six>=1.6.1"],
       license='MIT',
      )
Repository: doccano/doccano
Issue: Mutli-label text classification export issues: same classes but in different orders

How to reproduce the behaviour
---------
<!-- Before submitting an issue, make sure to check the docs and closed issues and FAQ to see if any of the solutions work for you. https://github.com/doccano/doccano/wiki/Frequently-Asked-Questions -->
We are two annotators on a multi-label classification project. When I export the annotations, for some examples, me and my co-annotator have put the same labels, but on the exported CSV, they do not appear in the same order:

Annotator 1:

| text | labels |
| example 1 | label1#label2#label3 |

Annotator 2:

| text | labels |
| example 1 | label2#label3#label1 |

As I try to use these CSVs for comparing our annotations, this brings more difficulty.

<!-- Include a code example or the steps that led to the problem. Please try to be as specific as possible. -->

Your Environment
---------
<!-- Include details of your environment.-->
*   Operating System: Debian
*   Python Version Used: Don't know, I pulled the latest version from Docker Hub
*   When you install doccano: 3 days ago
*   How did you install doccano (Heroku button etc): Docker


Changed files:
backend/api/views/download/writer.py, backend/api/tests/download/test_writer.py

diff --git a/backend/api/tests/download/test_writer.py b/backend/api/tests/download/test_writer.py
index 2c48cb92..720244dd 100644
--- a/backend/api/tests/download/test_writer.py
+++ b/backend/api/tests/download/test_writer.py
@@ -32,6 +32,16 @@ class TestCSVWriter(unittest.TestCase):
         }
         self.assertEqual(line, expected)
 
+    def test_label_order(self):
+        writer = CsvWriter('.')
+        record1 = Record(id=0, data='', label=['labelA', 'labelB'], user='', metadata={})
+        record2 = Record(id=0, data='', label=['labelB', 'labelA'], user='', metadata={})
+        line1 = writer.create_line(record1)
+        line2 = writer.create_line(record2)
+        expected = 'labelA#labelB'
+        self.assertEqual(line1['label'], expected)
+        self.assertEqual(line2['label'], expected)
+
     @patch('os.remove')
     @patch('zipfile.ZipFile')
     @patch('csv.DictWriter.writerow')
diff --git a/backend/api/views/download/writer.py b/backend/api/views/download/writer.py
index 5de1264e..a4d5293a 100644
--- a/backend/api/views/download/writer.py
+++ b/backend/api/views/download/writer.py
@@ -84,7 +84,7 @@ class CsvWriter(BaseWriter):
         return {
             'id': record.id,
             'data': record.data,
-            'label': '#'.join(record.label),
+            'label': '#'.join(sorted(record.label)),
             **record.metadata
         }
 
@@ -144,6 +144,7 @@ class FastTextWriter(LineWriter):
 
     def create_line(self, record):
         line = [f'__label__{label}' for label in record.label]
+        line.sort()
         line.append(record.data)
         line = ' '.join(line)
         return line
Repository: doccano/doccano
Issue: After Quick Deploy on Heroku, App crash due to sqlalchemy

How to reproduce the behaviour
---------
Start the quick deploy to heroku
Wait for successful build and deploy
Open app and wait for crash.

**Logs** 
`sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres`
 `celery crashed`
`Process exited with status 12021-04-23T17:02:29.297622+00:00 heroku[web.1]: State changed from up to crashed`

Apparently versions of SQLAlchemy 1.4+ require postgresql:// and do not accept postgre:// anymore.

The DATABASE_URL start with postgres:// after deployment on heroku

Your Environment
---------
Installed with the deploy to heroku from doccano's home page, built from Dockerfile.
SQLAlchemy was 1.4.7


Changed files:
backend/app/settings.py

diff --git a/backend/app/settings.py b/backend/app/settings.py
index 5df89e66..9c4d59f0 100644
--- a/backend/app/settings.py
+++ b/backend/app/settings.py
@@ -353,7 +353,12 @@ try:
     CELERY_BROKER_URL = env('CELERY_BROKER_URL')
 except EnvError:
     try:
-        CELERY_BROKER_URL = 'sqla+{}'.format(env('DATABASE_URL'))
+        # quickfix for Heroku.
+        # See https://github.com/doccano/doccano/issues/1327.
+        uri = env('DATABASE_URL')
+        if uri.startswith('postgres://'):
+            uri = uri.replace('postgres://', 'postgresql://', 1)
+        CELERY_BROKER_URL = 'sqla+{}'.format(uri)
     except EnvError:
         CELERY_BROKER_URL = 'sqla+sqlite:///{}'.format(DATABASES['default']['NAME'])
 CELERY_ACCEPT_CONTENT = ['application/json']