Skip to content

Commit

Permalink
Fix re import on Pythonic as well
Browse files Browse the repository at this point in the history
Add some notes to remind maintainers to update both files.
  • Loading branch information
cbm755 committed Jan 5, 2024
1 parent 2443793 commit 570c0c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions inst/private/python_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

# In some cases this code is fed into stdin: two blank lines between
# try-except blocks, no blank lines within each block.
#
# Maintenance note: this code is largely duplicated with python_ipc_native
# Ensure both are updated!

import sys

Expand Down
5 changes: 3 additions & 2 deletions inst/private/python_ipc_native.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%% Copyright (C) 2016, 2018-2019, 2023 Colin B. Macdonald
%% Copyright (C) 2016, 2018-2019, 2023-2024 Colin B. Macdonald
%% Copyright (C) 2016 Abhinav Tripathi
%% Copyright (C) 2021 Johannes Maria Frank
%% Copyright (C) 2022 Chris Gorman
Expand Down Expand Up @@ -61,11 +61,13 @@
newl = sprintf('\n');

if isempty(have_headers)
% Maintenance note: you must edit both this and python_header.py
pyexec(strjoin({'import sys'
'import sympy'
'import mpmath'
'import sympy as sp'
'from sympy import __version__ as spver'
'from re import split as lib_re_split'
'from sympy import *'
'from sympy.logic.boolalg import Boolean, BooleanFunction'
'from sympy.core.relational import Relational'
Expand Down Expand Up @@ -97,7 +99,6 @@
' return LooseVersion(v.replace(".dev", ""))'
'import itertools'
'import collections'
'from re import split'
'# patch pretty printer, issue #952'
'from sympy.printing.pretty.pretty import PrettyPrinter'
'_mypp = PrettyPrinter'
Expand Down

0 comments on commit 570c0c9

Please sign in to comment.