Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions x.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,16 @@

# soft deprecation of old python versions
skip_check = os.environ.get("RUST_IGNORE_OLD_PYTHON") == "1"
if not skip_check and (major < 3 or (major == 3 and minor < 6)):
msg = cleandoc(
"""
Using python {}.{} but >= 3.6 is recommended. Your python version
should continue to work for the near future, but this will
eventually change. If python >= 3.6 is not available on your system,
please file an issue to help us understand timelines.

This message can be suppressed by setting `RUST_IGNORE_OLD_PYTHON=1`
""".format(major, minor)
)
warnings.warn(msg, stacklevel=1)
if not skip_check and (major < 3 or (major == 3 and minor < 6)):
msg = cleandoc(f"""
Using python {major}.{minor} but >= 3.6 is recommended. Your python version
should continue to work for the near future, but this will
eventually change. If python >= 3.6 is not available on your system,
please file an issue to help us understand timelines.

This message can be suppressed by setting `RUST_IGNORE_OLD_PYTHON=1`
""")
warnings.warn(msg, stacklevel=1)

rust_dir = os.path.dirname(os.path.abspath(__file__))
# For the import below, have Python search in src/bootstrap first.
Expand Down
Loading