Explorar o código

Make Python 3.6 our minimum version and fix tests. (#401)

This matches the version on Ubuntu LTS and other OSes. The only problem
I found with it in our testing is that Bazel confusingly sets the locale
to use `LANG=en_US` by default which breaks UTF-8 support. We may need
to shift this on Windows, but this seems like a reasonable first step.

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
Chandler Carruth %!s(int64=5) %!d(string=hai) anos
pai
achega
251402ceb7
Modificáronse 2 ficheiros con 9 adicións e 0 borrados
  1. 6 0
      .bazelrc
  2. 3 0
      docs/project/contribution_tools.md

+ 6 - 0
.bazelrc

@@ -8,3 +8,9 @@ build --host_crosstool_top=@bazel_cc_toolchain
 build:force_local_bootstrap --repo_env=CARBON_FORCE_LOCAL_BOOTSTRAP_BUILD=1
 
 build:fuzzer --features=fuzzer
+
+# Force actions to have a UTF-8 language encoding.
+# TODO: Need to investigate what this should be on Windows, but at least for
+# Linux and macOS this seems strictly better than the Bazel default of just
+# `en_US`.
+build --action_env=LANG=en_US.UTF-8

+ 3 - 0
docs/project/contribution_tools.md

@@ -86,6 +86,9 @@ periodically run `brew upgrade`.
 
 #### Python using `pyenv`
 
+Carbon requires Python 3.6 or newer. Everything below assumes that `python` or
+`pip` reach the Python 3 tools, not legacy installations of Python 2.
+
 We strongly recommend using [pyenv](https://github.com/pyenv/pyenv) to manage
 [Python](python.org) and Python's `pip` package manager. `pip` should typically
 be used for Python package installation rather than other package managers.