Bump minimum supported Python version to 3.6. Closes #6297.
diff --git a/.github/workflows/os_comp.yml b/.github/workflows/os_comp.yml
index 3b38bab..5f4df20 100644
--- a/.github/workflows/os_comp.yml
+++ b/.github/workflows/os_comp.yml
@@ -7,26 +7,6 @@
   pull_request:
 
 jobs:
-  xenial:
-    name: Ubuntu 16.04
-    runs-on: ubuntu-16.04
-    steps:
-    - uses: actions/checkout@v2
-    - name: Install Dependencies
-      run: |
-        sudo apt update -yq
-        sudo apt install -yq --no-install-recommends python3-setuptools python3-pip g++ gfortran gobjc gobjc++ zlib1g-dev python-dev python3-dev python3-jsonschema
-    - name: Install ninja-build tool
-      uses: seanmiddleditch/gha-setup-ninja@v1
-    - name: Python version
-      run: python3 --version
-    - name: Ninja version
-      run: ninja --version
-    - name: Run tests
-      run: LD_LIBRARY_PATH=/usr/local/share/boost/1.69.0/lib/:$(rustc --print sysroot)/lib:$LD_LIBRARY_PATH python3 run_tests.py
-      env:
-        XENIAL: '1'
-
   arch:
     name: ${{ matrix.cfg.name }}
     runs-on: ubuntu-latest
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 1ff542a..26735a2 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -36,7 +36,7 @@
   steps:
   - task: UsePythonVersion@0
     inputs:
-      versionSpec: '3.5'
+      versionSpec: '3.6'
       addToPath: true
       architecture: 'x64'
   - template: ci/azure-steps.yml
diff --git a/docs/markdown/snippets/pythonbump.md b/docs/markdown/snippets/pythonbump.md
new file mode 100644
index 0000000..5a31291
--- /dev/null
+++ b/docs/markdown/snippets/pythonbump.md
@@ -0,0 +1,6 @@
+## Minimum required Python version updated to 3.6
+
+Meson now requires at least Python version 3.6 to run as Python 3.5
+reaches EOL on September 2020. In practice this should only affect
+people developing on Ubuntu Xenial, which will similarly reach EOL in
+April 2021.
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index e07c0df..9bf6ef6 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -111,7 +111,6 @@
         return 0
 
     def run(self, args):
-        print_py35_notice = False
         # If first arg is not a known command, assume user wants to run the setup
         # command.
         known_commands = list(self.commands.keys()) + ['-h', '--help']
@@ -125,17 +124,10 @@
             args = args[1:]
         else:
             parser = self.parser
-            command = None
 
         args = mesonlib.expand_arguments(args)
         options = parser.parse_args(args)
 
-        if command is None:
-            command = options.command
-
-        if command in ('setup', 'compile', 'test', 'install') and sys.version_info < (3, 6):
-            print_py35_notice = True
-
         try:
             return options.run_func(options)
         except MesonException as e:
@@ -152,9 +144,6 @@
             traceback.print_exc()
             return 2
         finally:
-            if print_py35_notice:
-                mlog.notice('You are using Python 3.5 which is EOL. Starting with v0.57, '
-                            'Meson will require Python 3.6 or newer', fatal=False)
             mlog.shutdown()
 
 def run_script_command(script_name, script_args):
@@ -192,8 +181,8 @@
                 sys.stdout.buffer = sys.stdout.raw if hasattr(sys.stdout, 'raw') else sys.stdout
 
 def run(original_args, mainfile):
-    if sys.version_info < (3, 5):
-        print('Meson works correctly only with python 3.5+.')
+    if sys.version_info < (3, 6):
+        print('Meson works correctly only with python 3.6+.')
         print('You have python {}.'.format(sys.version))
         print('Please update your environment')
         return 1
diff --git a/run_project_tests.py b/run_project_tests.py
index c843888..bde9149 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -242,7 +242,6 @@
 failing_logs = []
 print_debug = 'MESON_PRINT_TEST_OUTPUT' in os.environ
 under_ci = 'CI' in os.environ
-under_xenial_ci = under_ci and ('XENIAL' in os.environ)
 skip_scientific = under_ci and ('SKIP_SCIENTIFIC' in os.environ)
 do_debug = under_ci or print_debug
 no_meson_log_msg = 'No meson-log.txt found.'
@@ -828,8 +827,8 @@
     return False
 
 def skippable(suite, test):
-    # Everything is optional when not running on CI, or on Ubuntu 16.04 CI
-    if not under_ci or under_xenial_ci:
+    # Everything is optional when not running on CI
+    if not under_ci:
         return True
 
     if not suite.endswith('frameworks'):