Skip to content

Commit a661a07

Browse files
committed
Version bump v2.0.0-beta.21
+ Python 3 compatibility: Fix languages stdlib
1 parent dfea27b commit a661a07

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

codeintel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.0.0-beta.20'
1+
__version__ = '2.0.0-beta.21'

codeintel/codeintel2/database/stdlib.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def vers_and_names_from_lang(self, lang):
297297
# ((5,3), "php-5.3")
298298
# ],
299299
# "ruby": [
300-
# (None, "ruby"),
300+
# ((0,0), "ruby"),
301301
# ],
302302
# ...
303303
# }
@@ -314,7 +314,7 @@ def vers_and_names_from_lang(self, lang):
314314
ver = _ver_from_ver_str(ver_str)
315315
else:
316316
base = name
317-
ver = None
317+
ver = (0, 0)
318318
if base.lower() != lang.lower():
319319
# Only process when the base name matches the language.
320320
# I.e. skip if base is "python3" and lang is "python".
@@ -383,7 +383,7 @@ def get_lib(self, lang, ver_str=None):
383383

384384
# Here is something like what we have for PHP:
385385
# vers_and_names = [
386-
# (None, "php"),
386+
# ((0,0), "php"),
387387
# ((4,0), "php-4.0"),
388388
# ((4,1), "php-4.1"),
389389
# ((4,2), "php-4.2"),
@@ -508,7 +508,7 @@ def _update_lang_with_ver(self, lang, ver=None, progress_cb=None):
508508
if progress_cb:
509509
try: progress_cb("Determining necessary updates...", 5)
510510
except: log.exception("error in progress_cb (ignoring)")
511-
if ver is not None:
511+
if ver != (0, 0):
512512
ver_str = ".".join(map(str, ver))
513513
cix_path = join(self.stdlibs_dir,
514514
"%s-%s.cix" % (safe_lang_from_lang(lang), ver_str))
@@ -539,7 +539,7 @@ def _update_lang_with_ver(self, lang, ver=None, progress_cb=None):
539539

540540
def update_lang(self, lang, progress_cb=None, ver=None):
541541
vers_and_names = self.vers_and_names_from_lang(lang)
542-
if ver is not None:
542+
if ver != (0, 0):
543543
ver = _ver_from_ver_str(ver)
544544
key = (ver, "zzz") # 'zzz' > any stdlib name (e.g., 'zzz' > 'php-4.2')
545545
idx = max(0, bisect.bisect_right(vers_and_names, key)-1)

0 commit comments

Comments
 (0)