We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Python 3.6 no longer available via ppa:jonathonf/python-3.6
Recently announced: https://launchpad.net/~jonathonf

I think we can use `ppa:deadsnakes/ppa` instead and things should work fine again.

┆Issue is synchronized with this [Jira Task](https://ucsc-cgl.atlassian.net/browse/TOIL-470)
┆Issue Number: TOIL-470


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docker/Dockerfile.py`
Content:
```
1 # Copyright (C) 2015-2016 Regents of the University of California
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 from __future__ import print_function
16 import os
17 import textwrap
18 
19 applianceSelf = os.environ['TOIL_APPLIANCE_SELF']
20 sdistName = os.environ['_TOIL_SDIST_NAME']
21 
22 
23 dependencies = ' '.join(['libffi-dev',  # For client side encryption for extras with PyNACL
24                          'python3.6',
25                          'python3.6-dev',
26                          'python-dev',  # For installing Python packages with native code
27                          'python-pip',  # Bootstrap pip, but needs upgrading, see below
28                          'python3-pip',
29                          'libcurl4-openssl-dev',
30                          'libssl-dev',
31                          'wget',
32                          'curl',
33                          'openssh-server',
34                          'mesos=1.0.1-2.0.94.ubuntu1604',
35                          "nodejs",  # CWL support for javascript expressions
36                          'rsync',
37                          'screen',
38                          'build-essential', # We need a build environment to build Singularity 3.
39                          'uuid-dev',
40                          'libgpgme11-dev',
41                          'libseccomp-dev',
42                          'pkg-config',
43                          'squashfs-tools',
44                          'cryptsetup',
45                          'git'])
46 
47 
48 def heredoc(s):
49     s = textwrap.dedent(s).format(**globals())
50     return s[1:] if s.startswith('\n') else s
51 
52 
53 motd = heredoc('''
54 
55     This is the Toil appliance. You can run your Toil script directly on the appliance. 
56     Run toil <workflow>.py --help to see all options for running your workflow.
57     For more information see http://toil.readthedocs.io/en/latest/
58 
59     Copyright (C) 2015-2018 Regents of the University of California
60 
61     Version: {applianceSelf}
62 
63 ''')
64 
65 # Prepare motd to be echoed in the Dockerfile using a RUN statement that uses bash's print
66 motd = ''.join(l + '\\n\\\n' for l in motd.splitlines())
67 
68 print(heredoc('''
69     FROM ubuntu:16.04
70 
71     RUN apt-get -y update --fix-missing && apt-get -y upgrade && apt-get -y install apt-transport-https ca-certificates software-properties-common && apt-get clean && rm -rf /var/lib/apt/lists/*
72 
73     RUN echo "deb http://repos.mesosphere.io/ubuntu/ xenial main" \
74         > /etc/apt/sources.list.d/mesosphere.list \
75         && apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF \
76         && echo "deb http://deb.nodesource.com/node_6.x xenial main" \
77         > /etc/apt/sources.list.d/nodesource.list \
78         && apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280
79 
80     RUN add-apt-repository -y ppa:jonathonf/python-3.6
81     
82     RUN apt-get -y update --fix-missing && \
83         DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \
84         DEBIAN_FRONTEND=noninteractive apt-get -y install {dependencies} && \
85         apt-get clean && \
86         rm -rf /var/lib/apt/lists/*
87 
88     RUN wget https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz && \
89         tar xvf go1.13.3.linux-amd64.tar.gz && \
90         mv go/bin/* /usr/bin/ && \
91         mv go /usr/local/
92         
93     RUN mkdir -p $(go env GOPATH)/src/github.com/sylabs && \
94         cd $(go env GOPATH)/src/github.com/sylabs && \
95         git clone https://github.com/sylabs/singularity.git && \
96         cd singularity && \
97         git checkout v3.4.2 && \
98         ./mconfig && \
99         cd ./builddir && \
100         make -j4 && \
101         make install
102     
103     RUN mkdir /root/.ssh && \
104         chmod 700 /root/.ssh
105 
106     ADD waitForKey.sh /usr/bin/waitForKey.sh
107 
108     ADD customDockerInit.sh /usr/bin/customDockerInit.sh
109 
110     RUN chmod 777 /usr/bin/waitForKey.sh && chmod 777 /usr/bin/customDockerInit.sh
111     
112     # The stock pip is too old and can't install from sdist with extras
113     RUN pip install --upgrade pip==9.0.1
114 
115     # Default setuptools is too old
116     RUN pip install --upgrade setuptools==36.5.0
117 
118     # Include virtualenv, as it is still the recommended way to deploy pipelines
119     RUN pip install --upgrade virtualenv==15.0.3
120 
121     # Install s3am (--never-download prevents silent upgrades to pip, wheel and setuptools)
122     RUN virtualenv --never-download /home/s3am \
123         && /home/s3am/bin/pip install s3am==2.0 \
124         && ln -s /home/s3am/bin/s3am /usr/local/bin/
125 
126     # Install statically linked version of docker client
127     RUN curl https://download.docker.com/linux/static/stable/x86_64/docker-18.06.1-ce.tgz \
128          | tar -xvzf - --transform='s,[^/]*/,,g' -C /usr/local/bin/ \
129          && chmod u+x /usr/local/bin/docker
130 
131     # Fix for Mesos interface dependency missing on ubuntu
132     RUN pip install protobuf==3.0.0
133 
134     # Fix for https://issues.apache.org/jira/browse/MESOS-3793
135     ENV MESOS_LAUNCHER=posix
136 
137     # Fix for `screen` (https://github.com/BD2KGenomics/toil/pull/1386#issuecomment-267424561)
138     ENV TERM linux
139     
140     # Run bash instead of sh inside of screen
141     ENV SHELL /bin/bash
142     RUN echo "defshell -bash" > ~/.screenrc
143 
144     # An appliance may need to start more appliances, e.g. when the leader appliance launches the
145     # worker appliance on a worker node. To support this, we embed a self-reference into the image:
146     ENV TOIL_APPLIANCE_SELF {applianceSelf}
147 
148     RUN mkdir /var/lib/toil
149 
150     ENV TOIL_WORKDIR /var/lib/toil
151 
152     # This component changes most frequently and keeping it last maximizes Docker cache hits.
153     COPY {sdistName} .
154     RUN pip install {sdistName}[all]
155     RUN rm {sdistName}
156 
157     # We intentionally inherit the default ENTRYPOINT and CMD from the base image, to the effect
158     # that the running appliance just gives you a shell. To start the Mesos master or slave
159     # daemons, the user # should override the entrypoint via --entrypoint.
160 
161     RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' >> /etc/bash.bashrc \
162         && printf '{motd}' > /etc/motd
163 '''))
164
```
--- 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/docker/Dockerfile.py b/docker/Dockerfile.py
--- a/docker/Dockerfile.py
+++ b/docker/Dockerfile.py
@@ -77,7 +77,7 @@
         > /etc/apt/sources.list.d/nodesource.list \
         && apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280
 
-    RUN add-apt-repository -y ppa:jonathonf/python-3.6
+    RUN add-apt-repository -y ppa:deadsnakes/ppa
     
     RUN apt-get -y update --fix-missing && \
         DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \

{"golden_diff": "diff --git a/docker/Dockerfile.py b/docker/Dockerfile.py\n--- a/docker/Dockerfile.py\n+++ b/docker/Dockerfile.py\n@@ -77,7 +77,7 @@\n         > /etc/apt/sources.list.d/nodesource.list \\\n         && apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280\n \n-    RUN add-apt-repository -y ppa:jonathonf/python-3.6\n+    RUN add-apt-repository -y ppa:deadsnakes/ppa\n     \n     RUN apt-get -y update --fix-missing && \\\n         DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \\\n", "issue": "Python 3.6 no longer available via ppa:jonathonf/python-3.6\nRecently announced: https://launchpad.net/~jonathonf\n\nI think we can use `ppa:deadsnakes/ppa` instead and things should work fine again.\n\n\u2506Issue is synchronized with this [Jira Task](https://ucsc-cgl.atlassian.net/browse/TOIL-470)\n\u2506Issue Number: TOIL-470\n\n", "before_files": [{"content": "# Copyright (C) 2015-2016 Regents of the University of California\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\nfrom __future__ import print_function\nimport os\nimport textwrap\n\napplianceSelf = os.environ['TOIL_APPLIANCE_SELF']\nsdistName = os.environ['_TOIL_SDIST_NAME']\n\n\ndependencies = ' '.join(['libffi-dev',  # For client side encryption for extras with PyNACL\n                         'python3.6',\n                         'python3.6-dev',\n                         'python-dev',  # For installing Python packages with native code\n                         'python-pip',  # Bootstrap pip, but needs upgrading, see below\n                         'python3-pip',\n                         'libcurl4-openssl-dev',\n                         'libssl-dev',\n                         'wget',\n                         'curl',\n                         'openssh-server',\n                         'mesos=1.0.1-2.0.94.ubuntu1604',\n                         \"nodejs\",  # CWL support for javascript expressions\n                         'rsync',\n                         'screen',\n                         'build-essential', # We need a build environment to build Singularity 3.\n                         'uuid-dev',\n                         'libgpgme11-dev',\n                         'libseccomp-dev',\n                         'pkg-config',\n                         'squashfs-tools',\n                         'cryptsetup',\n                         'git'])\n\n\ndef heredoc(s):\n    s = textwrap.dedent(s).format(**globals())\n    return s[1:] if s.startswith('\\n') else s\n\n\nmotd = heredoc('''\n\n    This is the Toil appliance. You can run your Toil script directly on the appliance. \n    Run toil <workflow>.py --help to see all options for running your workflow.\n    For more information see http://toil.readthedocs.io/en/latest/\n\n    Copyright (C) 2015-2018 Regents of the University of California\n\n    Version: {applianceSelf}\n\n''')\n\n# Prepare motd to be echoed in the Dockerfile using a RUN statement that uses bash's print\nmotd = ''.join(l + '\\\\n\\\\\\n' for l in motd.splitlines())\n\nprint(heredoc('''\n    FROM ubuntu:16.04\n\n    RUN apt-get -y update --fix-missing && apt-get -y upgrade && apt-get -y install apt-transport-https ca-certificates software-properties-common && apt-get clean && rm -rf /var/lib/apt/lists/*\n\n    RUN echo \"deb http://repos.mesosphere.io/ubuntu/ xenial main\" \\\n        > /etc/apt/sources.list.d/mesosphere.list \\\n        && apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF \\\n        && echo \"deb http://deb.nodesource.com/node_6.x xenial main\" \\\n        > /etc/apt/sources.list.d/nodesource.list \\\n        && apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280\n\n    RUN add-apt-repository -y ppa:jonathonf/python-3.6\n    \n    RUN apt-get -y update --fix-missing && \\\n        DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \\\n        DEBIAN_FRONTEND=noninteractive apt-get -y install {dependencies} && \\\n        apt-get clean && \\\n        rm -rf /var/lib/apt/lists/*\n\n    RUN wget https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz && \\\n        tar xvf go1.13.3.linux-amd64.tar.gz && \\\n        mv go/bin/* /usr/bin/ && \\\n        mv go /usr/local/\n        \n    RUN mkdir -p $(go env GOPATH)/src/github.com/sylabs && \\\n        cd $(go env GOPATH)/src/github.com/sylabs && \\\n        git clone https://github.com/sylabs/singularity.git && \\\n        cd singularity && \\\n        git checkout v3.4.2 && \\\n        ./mconfig && \\\n        cd ./builddir && \\\n        make -j4 && \\\n        make install\n    \n    RUN mkdir /root/.ssh && \\\n        chmod 700 /root/.ssh\n\n    ADD waitForKey.sh /usr/bin/waitForKey.sh\n\n    ADD customDockerInit.sh /usr/bin/customDockerInit.sh\n\n    RUN chmod 777 /usr/bin/waitForKey.sh && chmod 777 /usr/bin/customDockerInit.sh\n    \n    # The stock pip is too old and can't install from sdist with extras\n    RUN pip install --upgrade pip==9.0.1\n\n    # Default setuptools is too old\n    RUN pip install --upgrade setuptools==36.5.0\n\n    # Include virtualenv, as it is still the recommended way to deploy pipelines\n    RUN pip install --upgrade virtualenv==15.0.3\n\n    # Install s3am (--never-download prevents silent upgrades to pip, wheel and setuptools)\n    RUN virtualenv --never-download /home/s3am \\\n        && /home/s3am/bin/pip install s3am==2.0 \\\n        && ln -s /home/s3am/bin/s3am /usr/local/bin/\n\n    # Install statically linked version of docker client\n    RUN curl https://download.docker.com/linux/static/stable/x86_64/docker-18.06.1-ce.tgz \\\n         | tar -xvzf - --transform='s,[^/]*/,,g' -C /usr/local/bin/ \\\n         && chmod u+x /usr/local/bin/docker\n\n    # Fix for Mesos interface dependency missing on ubuntu\n    RUN pip install protobuf==3.0.0\n\n    # Fix for https://issues.apache.org/jira/browse/MESOS-3793\n    ENV MESOS_LAUNCHER=posix\n\n    # Fix for `screen` (https://github.com/BD2KGenomics/toil/pull/1386#issuecomment-267424561)\n    ENV TERM linux\n    \n    # Run bash instead of sh inside of screen\n    ENV SHELL /bin/bash\n    RUN echo \"defshell -bash\" > ~/.screenrc\n\n    # An appliance may need to start more appliances, e.g. when the leader appliance launches the\n    # worker appliance on a worker node. To support this, we embed a self-reference into the image:\n    ENV TOIL_APPLIANCE_SELF {applianceSelf}\n\n    RUN mkdir /var/lib/toil\n\n    ENV TOIL_WORKDIR /var/lib/toil\n\n    # This component changes most frequently and keeping it last maximizes Docker cache hits.\n    COPY {sdistName} .\n    RUN pip install {sdistName}[all]\n    RUN rm {sdistName}\n\n    # We intentionally inherit the default ENTRYPOINT and CMD from the base image, to the effect\n    # that the running appliance just gives you a shell. To start the Mesos master or slave\n    # daemons, the user # should override the entrypoint via --entrypoint.\n\n    RUN echo '[ ! -z \"$TERM\" -a -r /etc/motd ] && cat /etc/motd' >> /etc/bash.bashrc \\\n        && printf '{motd}' > /etc/motd\n'''))\n", "path": "docker/Dockerfile.py"}], "after_files": [{"content": "# Copyright (C) 2015-2016 Regents of the University of California\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\nfrom __future__ import print_function\nimport os\nimport textwrap\n\napplianceSelf = os.environ['TOIL_APPLIANCE_SELF']\nsdistName = os.environ['_TOIL_SDIST_NAME']\n\n\ndependencies = ' '.join(['libffi-dev',  # For client side encryption for extras with PyNACL\n                         'python3.6',\n                         'python3.6-dev',\n                         'python-dev',  # For installing Python packages with native code\n                         'python-pip',  # Bootstrap pip, but needs upgrading, see below\n                         'python3-pip',\n                         'libcurl4-openssl-dev',\n                         'libssl-dev',\n                         'wget',\n                         'curl',\n                         'openssh-server',\n                         'mesos=1.0.1-2.0.94.ubuntu1604',\n                         \"nodejs\",  # CWL support for javascript expressions\n                         'rsync',\n                         'screen',\n                         'build-essential', # We need a build environment to build Singularity 3.\n                         'uuid-dev',\n                         'libgpgme11-dev',\n                         'libseccomp-dev',\n                         'pkg-config',\n                         'squashfs-tools',\n                         'cryptsetup',\n                         'git'])\n\n\ndef heredoc(s):\n    s = textwrap.dedent(s).format(**globals())\n    return s[1:] if s.startswith('\\n') else s\n\n\nmotd = heredoc('''\n\n    This is the Toil appliance. You can run your Toil script directly on the appliance. \n    Run toil <workflow>.py --help to see all options for running your workflow.\n    For more information see http://toil.readthedocs.io/en/latest/\n\n    Copyright (C) 2015-2018 Regents of the University of California\n\n    Version: {applianceSelf}\n\n''')\n\n# Prepare motd to be echoed in the Dockerfile using a RUN statement that uses bash's print\nmotd = ''.join(l + '\\\\n\\\\\\n' for l in motd.splitlines())\n\nprint(heredoc('''\n    FROM ubuntu:16.04\n\n    RUN apt-get -y update --fix-missing && apt-get -y upgrade && apt-get -y install apt-transport-https ca-certificates software-properties-common && apt-get clean && rm -rf /var/lib/apt/lists/*\n\n    RUN echo \"deb http://repos.mesosphere.io/ubuntu/ xenial main\" \\\n        > /etc/apt/sources.list.d/mesosphere.list \\\n        && apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF \\\n        && echo \"deb http://deb.nodesource.com/node_6.x xenial main\" \\\n        > /etc/apt/sources.list.d/nodesource.list \\\n        && apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280\n\n    RUN add-apt-repository -y ppa:deadsnakes/ppa\n    \n    RUN apt-get -y update --fix-missing && \\\n        DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \\\n        DEBIAN_FRONTEND=noninteractive apt-get -y install {dependencies} && \\\n        apt-get clean && \\\n        rm -rf /var/lib/apt/lists/*\n\n    RUN wget https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz && \\\n        tar xvf go1.13.3.linux-amd64.tar.gz && \\\n        mv go/bin/* /usr/bin/ && \\\n        mv go /usr/local/\n        \n    RUN mkdir -p $(go env GOPATH)/src/github.com/sylabs && \\\n        cd $(go env GOPATH)/src/github.com/sylabs && \\\n        git clone https://github.com/sylabs/singularity.git && \\\n        cd singularity && \\\n        git checkout v3.4.2 && \\\n        ./mconfig && \\\n        cd ./builddir && \\\n        make -j4 && \\\n        make install\n    \n    RUN mkdir /root/.ssh && \\\n        chmod 700 /root/.ssh\n\n    ADD waitForKey.sh /usr/bin/waitForKey.sh\n\n    ADD customDockerInit.sh /usr/bin/customDockerInit.sh\n\n    RUN chmod 777 /usr/bin/waitForKey.sh && chmod 777 /usr/bin/customDockerInit.sh\n    \n    # The stock pip is too old and can't install from sdist with extras\n    RUN pip install --upgrade pip==9.0.1\n\n    # Default setuptools is too old\n    RUN pip install --upgrade setuptools==36.5.0\n\n    # Include virtualenv, as it is still the recommended way to deploy pipelines\n    RUN pip install --upgrade virtualenv==15.0.3\n\n    # Install s3am (--never-download prevents silent upgrades to pip, wheel and setuptools)\n    RUN virtualenv --never-download /home/s3am \\\n        && /home/s3am/bin/pip install s3am==2.0 \\\n        && ln -s /home/s3am/bin/s3am /usr/local/bin/\n\n    # Install statically linked version of docker client\n    RUN curl https://download.docker.com/linux/static/stable/x86_64/docker-18.06.1-ce.tgz \\\n         | tar -xvzf - --transform='s,[^/]*/,,g' -C /usr/local/bin/ \\\n         && chmod u+x /usr/local/bin/docker\n\n    # Fix for Mesos interface dependency missing on ubuntu\n    RUN pip install protobuf==3.0.0\n\n    # Fix for https://issues.apache.org/jira/browse/MESOS-3793\n    ENV MESOS_LAUNCHER=posix\n\n    # Fix for `screen` (https://github.com/BD2KGenomics/toil/pull/1386#issuecomment-267424561)\n    ENV TERM linux\n    \n    # Run bash instead of sh inside of screen\n    ENV SHELL /bin/bash\n    RUN echo \"defshell -bash\" > ~/.screenrc\n\n    # An appliance may need to start more appliances, e.g. when the leader appliance launches the\n    # worker appliance on a worker node. To support this, we embed a self-reference into the image:\n    ENV TOIL_APPLIANCE_SELF {applianceSelf}\n\n    RUN mkdir /var/lib/toil\n\n    ENV TOIL_WORKDIR /var/lib/toil\n\n    # This component changes most frequently and keeping it last maximizes Docker cache hits.\n    COPY {sdistName} .\n    RUN pip install {sdistName}[all]\n    RUN rm {sdistName}\n\n    # We intentionally inherit the default ENTRYPOINT and CMD from the base image, to the effect\n    # that the running appliance just gives you a shell. To start the Mesos master or slave\n    # daemons, the user # should override the entrypoint via --entrypoint.\n\n    RUN echo '[ ! -z \"$TERM\" -a -r /etc/motd ] && cat /etc/motd' >> /etc/bash.bashrc \\\n        && printf '{motd}' > /etc/motd\n'''))\n", "path": "docker/Dockerfile.py"}]}