Project

General

Profile

Actions

Bug #5137

closed

[SDKs] Add Python version test 2.7 <= sys.version_info < 3

Added by Peter Amstutz about 9 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assigned To:
-
Category:
SDKs
Target version:
-
Story points:
0.5

Description

<tetron> brett: regarding #5136 any thoughts on how to warn the user if they are using Python < 2.7 ?
<brett> tetron: Inspect sys.version_info.
<tetron> so in arvados/__init__.py we should put a test at the top
<brett> Have arvados/__init__.py raise an ImportError or something. Don't see much point warning when it's never going to work.
<tetron> and bail out if sys.version_info isn't 2.7 or greater
<tetron> I'll add a ticket to bug triage
<brett> We should just check that major and minor are exactly 2.7.
<brett> It's not going to work under Python 3 either.
<tetron> er
<tetron> yes
<brett> Well, I guess for total correctness check 2.7 <= v < 3.0.
<tetron> I was thinking more about a hypothetical Python 2.8
<brett> It's never going to happen but sure.
<tetron> brett: #5137


Related issues

Related to Arvados - Bug #5136: arv-run arv-keep command gives error while runningClosed02/04/201502/05/2015Actions
Actions #1

Updated by Peter Amstutz about 9 years ago

  • Description updated (diff)
Actions #2

Updated by Brett Smith about 9 years ago

  • Category set to SDKs
Actions #3

Updated by Brett Smith about 9 years ago

In order for the proposal to work, the old version of Python has to be able to compile and run arvados/__init__.py up through where the check is. Otherwise, users will get some kind of SyntaxError instead. The syntax currently in that file is pretty conservative, but the more conservative we make it, the better. The ternary operator and context managers ("with" statements) were added in Python 2.5. Syntax newer than that includes set literals and dictionary comprehensions.

At a first glance, I think we could make this file compile in all of Python 2.x if we flattened the ternary operator in logging setup.

Actions #4

Updated by Tom Clegg about 9 years ago

  • Target version changed from Bug Triage to 2015-03-11 sprint
Actions #5

Updated by Ward Vandewege about 9 years ago

  • Target version changed from 2015-03-11 sprint to 2015-04-01 sprint
Actions #6

Updated by Brett Smith about 9 years ago

  • Assigned To set to Brett Smith
Actions #7

Updated by Ward Vandewege about 9 years ago

  • Target version changed from 2015-04-01 sprint to Arvados Future Sprints
Actions #8

Updated by Ward Vandewege about 9 years ago

  • Assigned To deleted (Brett Smith)
Actions #9

Updated by Ward Vandewege over 3 years ago

  • Status changed from New to Rejected
Actions #10

Updated by Ward Vandewege over 3 years ago

  • Target version deleted (Arvados Future Sprints)
Actions

Also available in: Atom PDF