We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Upgrade of dependencies for 1.19.0
Modification
------------
# pip-requires
SQLAlchemy 1.2.7 --> 1.2.16
alembic 0.9.9 --> 1.0.6
python-dateutil 2.7.2 --> 2.7.5
s3cmd 2.0.1 --> 2.0.2
stomp.py 4.1.20 --> 4.1.21
dnspython 1.15.0 --> 1.16.0
geoip2 2.8.0 --> 2.9.0
maxminddb 1.3.0 --> 1.4.1
pycparser 2.18 --> 2.19
googleapis-common-protos 1.5.3 --> 1.5.6
httplib2 0.11.3 --> 0.12.0
pyOpenSSL 18.0.0 --> 19.0.0
cryptography 2.3.1 --> 2.4.2
oauth2client 4.1.2 --> 4.1.3
protobuf 3.5.2.post1 --> 3.6.1
grpcio 1.11.0 --> 1.18.0
pyasn1 0.4.2 --> 0.4.5
pyasn1-modules 0.2.1 --> 0.2.3
rsa 3.4.2 --> 4.0
redis 2.10.6 --> 3.0.1
numpy 1.14.2 --> 1.16.0
paramiko 2.4.1 --> 2.4.2
Flask 0.12.4 --> 1.0.2
idna 2.6 --> 2.8
MyProxyClient 2.0.1 --> 2.1.0

# pip-requires-test
Paste 2.0.3 --> 3.0.6
coverage 4.4.2 --> 4.5.2
Sphinx 1.6.5 --> 1.8.3
sphinx-rtd-theme 0.2.4 --> 0.4.2
sphinxcontrib-httpdomain 1.6.0 --> 1.7.0
Pygments 2.2.0 --> 2.3.1
pyflakes 1.6.0 --> 2.0.0
flake8 3.5.0 --> 3.6.0
pylint 1.7.4 --> 2.2.2
virtualenv 15.1.0 --> 16.2.0
tox 2.9.1 --> 3.7.0
pytest 3.2.5 --> 4.1.1
pytest-xdist 1.20.1 --> 1.26.0
pytz 2017.3 --> 2018.9
Babel 2.5.1 --> 2.6.0
subprocess32 3.2.7 --> 3.5.3
pycodestyle 2.3.1 --> 2.4.0

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `lib/rucio/db/sqla/migrate_repo/versions/3345511706b8_replicas_table_pk_definition_is_in_.py`
Content:
```
1 # Copyright 2013-2019 CERN for the benefit of the ATLAS collaboration.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15 # Authors:
16 # - Martin Barisits <martin.barisits@cern.ch>, 2019
17 #
18 # Topic: Replicas table PK definition is in wrong order
19 # Revision ID: 3345511706b8
20 # Revises: 9eb936a81eb1
21 # Creation Date: 2019-01-30 14:20:35.058889
22 
23 from alembic.op import (create_primary_key, drop_constraint)
24 
25 from alembic import context
26 
27 
28 # revision identifiers used by alembic
29 revision = '3345511706b8'       # pylint: disable=invalid-name
30 down_revision = 'bf3baa1c1474'  # pylint: disable=invalid-name
31 
32 
33 def upgrade():
34     '''
35     Upgrade the database to this revision
36     '''
37     if context.get_context().dialect.name != 'sqlite':
38         drop_constraint('REPLICAS_PK', 'replicas')
39         create_primary_key('REPLICAS_PK', 'replicas', ['scope', 'name', 'rse_id'])
40 
41 
42 def downgrade():
43     '''
44     Downgrade the database to the previous revision
45     '''
46     if context.get_context().dialect.name != 'sqlite':
47         drop_constraint('REPLICAS_PK', 'replicas')
48         create_primary_key('REPLICAS_PK', 'replicas', ['rse_id', 'scope', 'name'])
49
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/lib/rucio/db/sqla/migrate_repo/versions/3345511706b8_replicas_table_pk_definition_is_in_.py b/lib/rucio/db/sqla/migrate_repo/versions/3345511706b8_replicas_table_pk_definition_is_in_.py
--- a/lib/rucio/db/sqla/migrate_repo/versions/3345511706b8_replicas_table_pk_definition_is_in_.py
+++ b/lib/rucio/db/sqla/migrate_repo/versions/3345511706b8_replicas_table_pk_definition_is_in_.py
@@ -27,7 +27,7 @@
 
 # revision identifiers used by alembic
 revision = '3345511706b8'       # pylint: disable=invalid-name
-down_revision = 'bf3baa1c1474'  # pylint: disable=invalid-name
+down_revision = '01eaf73ab656'  # pylint: disable=invalid-name
 
 
 def upgrade():

{"golden_diff": "diff --git a/lib/rucio/db/sqla/migrate_repo/versions/3345511706b8_replicas_table_pk_definition_is_in_.py b/lib/rucio/db/sqla/migrate_repo/versions/3345511706b8_replicas_table_pk_definition_is_in_.py\n--- a/lib/rucio/db/sqla/migrate_repo/versions/3345511706b8_replicas_table_pk_definition_is_in_.py\n+++ b/lib/rucio/db/sqla/migrate_repo/versions/3345511706b8_replicas_table_pk_definition_is_in_.py\n@@ -27,7 +27,7 @@\n \n # revision identifiers used by alembic\n revision = '3345511706b8'       # pylint: disable=invalid-name\n-down_revision = 'bf3baa1c1474'  # pylint: disable=invalid-name\n+down_revision = '01eaf73ab656'  # pylint: disable=invalid-name\n \n \n def upgrade():\n", "issue": "Upgrade of dependencies for 1.19.0\nModification\r\n------------\r\n# pip-requires\r\nSQLAlchemy 1.2.7 --> 1.2.16\r\nalembic 0.9.9 --> 1.0.6\r\npython-dateutil 2.7.2 --> 2.7.5\r\ns3cmd 2.0.1 --> 2.0.2\r\nstomp.py 4.1.20 --> 4.1.21\r\ndnspython 1.15.0 --> 1.16.0\r\ngeoip2 2.8.0 --> 2.9.0\r\nmaxminddb 1.3.0 --> 1.4.1\r\npycparser 2.18 --> 2.19\r\ngoogleapis-common-protos 1.5.3 --> 1.5.6\r\nhttplib2 0.11.3 --> 0.12.0\r\npyOpenSSL 18.0.0 --> 19.0.0\r\ncryptography 2.3.1 --> 2.4.2\r\noauth2client 4.1.2 --> 4.1.3\r\nprotobuf 3.5.2.post1 --> 3.6.1\r\ngrpcio 1.11.0 --> 1.18.0\r\npyasn1 0.4.2 --> 0.4.5\r\npyasn1-modules 0.2.1 --> 0.2.3\r\nrsa 3.4.2 --> 4.0\r\nredis 2.10.6 --> 3.0.1\r\nnumpy 1.14.2 --> 1.16.0\r\nparamiko 2.4.1 --> 2.4.2\r\nFlask 0.12.4 --> 1.0.2\r\nidna 2.6 --> 2.8\r\nMyProxyClient 2.0.1 --> 2.1.0\r\n\r\n# pip-requires-test\r\nPaste 2.0.3 --> 3.0.6\r\ncoverage 4.4.2 --> 4.5.2\r\nSphinx 1.6.5 --> 1.8.3\r\nsphinx-rtd-theme 0.2.4 --> 0.4.2\r\nsphinxcontrib-httpdomain 1.6.0 --> 1.7.0\r\nPygments 2.2.0 --> 2.3.1\r\npyflakes 1.6.0 --> 2.0.0\r\nflake8 3.5.0 --> 3.6.0\r\npylint 1.7.4 --> 2.2.2\r\nvirtualenv 15.1.0 --> 16.2.0\r\ntox 2.9.1 --> 3.7.0\r\npytest 3.2.5 --> 4.1.1\r\npytest-xdist 1.20.1 --> 1.26.0\r\npytz 2017.3 --> 2018.9\r\nBabel 2.5.1 --> 2.6.0\r\nsubprocess32 3.2.7 --> 3.5.3\r\npycodestyle 2.3.1 --> 2.4.0\n", "before_files": [{"content": "# Copyright 2013-2019 CERN for the benefit of the ATLAS collaboration.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# Authors:\n# - Martin Barisits <martin.barisits@cern.ch>, 2019\n#\n# Topic: Replicas table PK definition is in wrong order\n# Revision ID: 3345511706b8\n# Revises: 9eb936a81eb1\n# Creation Date: 2019-01-30 14:20:35.058889\n\nfrom alembic.op import (create_primary_key, drop_constraint)\n\nfrom alembic import context\n\n\n# revision identifiers used by alembic\nrevision = '3345511706b8'       # pylint: disable=invalid-name\ndown_revision = 'bf3baa1c1474'  # pylint: disable=invalid-name\n\n\ndef upgrade():\n    '''\n    Upgrade the database to this revision\n    '''\n    if context.get_context().dialect.name != 'sqlite':\n        drop_constraint('REPLICAS_PK', 'replicas')\n        create_primary_key('REPLICAS_PK', 'replicas', ['scope', 'name', 'rse_id'])\n\n\ndef downgrade():\n    '''\n    Downgrade the database to the previous revision\n    '''\n    if context.get_context().dialect.name != 'sqlite':\n        drop_constraint('REPLICAS_PK', 'replicas')\n        create_primary_key('REPLICAS_PK', 'replicas', ['rse_id', 'scope', 'name'])\n", "path": "lib/rucio/db/sqla/migrate_repo/versions/3345511706b8_replicas_table_pk_definition_is_in_.py"}], "after_files": [{"content": "# Copyright 2013-2019 CERN for the benefit of the ATLAS collaboration.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# Authors:\n# - Martin Barisits <martin.barisits@cern.ch>, 2019\n#\n# Topic: Replicas table PK definition is in wrong order\n# Revision ID: 3345511706b8\n# Revises: 9eb936a81eb1\n# Creation Date: 2019-01-30 14:20:35.058889\n\nfrom alembic.op import (create_primary_key, drop_constraint)\n\nfrom alembic import context\n\n\n# revision identifiers used by alembic\nrevision = '3345511706b8'       # pylint: disable=invalid-name\ndown_revision = '01eaf73ab656'  # pylint: disable=invalid-name\n\n\ndef upgrade():\n    '''\n    Upgrade the database to this revision\n    '''\n    if context.get_context().dialect.name != 'sqlite':\n        drop_constraint('REPLICAS_PK', 'replicas')\n        create_primary_key('REPLICAS_PK', 'replicas', ['scope', 'name', 'rse_id'])\n\n\ndef downgrade():\n    '''\n    Downgrade the database to the previous revision\n    '''\n    if context.get_context().dialect.name != 'sqlite':\n        drop_constraint('REPLICAS_PK', 'replicas')\n        create_primary_key('REPLICAS_PK', 'replicas', ['rse_id', 'scope', 'name'])\n", "path": "lib/rucio/db/sqla/migrate_repo/versions/3345511706b8_replicas_table_pk_definition_is_in_.py"}]}