Skip to content

Commit

Permalink
Trac #32852: Update traitlets to 5.1.1 (for python 3.9.8, 3.10)
Browse files Browse the repository at this point in the history
Long story : see [https://groups.google.com/g/sage-support/c/5-jWlDsITH4
sage-support].

TL;DR : On Debian testing, upgrading system Python (to 3.9.8) makes
command-line {{{sage}}} crash at startup :

{{{
charpent@p-202-021:~$ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.5.beta2, Release Date: 2021-09-26               │
│ Using Python 3.9.8. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Traceback (most recent call last):
  File "/usr/local/sage-9/src/bin/sage-ipython", line 15, in <module>
    app.initialize()
  File "/usr/local/sage-9/local/lib/python3.9/site-
packages/traitlets/config/application.py", line 88, in inner
    return method(app, *args, **kwargs)
  File "/usr/local/sage-9/local/lib/python3.9/site-
packages/IPython/terminal/ipapp.py", line 308, in initialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "/usr/local/sage-9/local/lib/python3.9/site-
packages/traitlets/config/application.py", line 88, in inner
    return method(app, *args, **kwargs)
  File "/usr/local/sage-9/local/lib/python3.9/site-
packages/IPython/core/application.py", line 450, in initialize
    self.parse_command_line(argv)
  File "/usr/local/sage-9/local/lib/python3.9/site-
packages/IPython/terminal/ipapp.py", line 303, in parse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "/usr/local/sage-9/local/lib/python3.9/site-
packages/traitlets/config/application.py", line 88, in inner
    return method(app, *args, **kwargs)
  File "/usr/local/sage-9/local/lib/python3.9/site-
packages/traitlets/config/application.py", line 709, in
parse_command_line
    self.cli_config = deepcopy(loader.load_config())
  File "/usr/local/sage-9/local/lib/python3.9/site-
packages/traitlets/config/loader.py", line 851, in load_config
    self._parse_args(argv)
  File "/usr/local/sage-9/local/lib/python3.9/site-
packages/traitlets/config/loader.py", line 908, in _parse_args
    self.parsed_data = self.parser.parse_args(to_parse)
  File "/usr/lib/python3.9/argparse.py", line 1834, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/local/sage-9/local/lib/python3.9/site-
packages/traitlets/config/loader.py", line 768, in parse_known_args
    return super().parse_known_args(args, namespace)
  File "/usr/lib/python3.9/argparse.py", line 1862, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python3.9/argparse.py", line 2076, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/lib/python3.9/argparse.py", line 2016, in consume_optional
    take_action(action, args, option_string)
  File "/usr/lib/python3.9/argparse.py", line 1944, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/sage-9/local/lib/python3.9/site-
packages/traitlets/config/loader.py", line 933, in __call__
    namespace._flags.append(self.flag)
AttributeError: 'Namespace' object has no attribute '_flags'
}}}

Neither recompiling IPython nor the whole thing is effective.

Obvious (but painful) workaround :

{{{
./configure --with-system-python3=no && make
}}}

URL: https://trac.sagemath.org/32852
Reported by: charpent
Ticket author(s): Matthias Koeppe
Reviewer(s): Emmanuel Charpentier
  • Loading branch information
Release Manager committed Nov 12, 2021
2 parents 6ec717a + bbe3f33 commit f52d21a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/traitlets/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=traitlets-VERSION.tar.gz
sha1=08d9b2db5b0cf7794e9c4ca76f7981cccc3233b6
md5=19483ec0685e837912cff128209aa845
cksum=3463913536
sha1=86d03557843700d6dd0657371d15f0520c2f392f
md5=31f7fd84518fe08cb40ab18f6dde0d54
cksum=1147319509
upstream_url=https://pypi.io/packages/source/t/traitlets/traitlets-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/traitlets/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.0
5.1.1

0 comments on commit f52d21a

Please sign in to comment.