@@ -49,6 +49,7 @@ class __getattr__:
4949 # module-level deprecations
5050 ps_backend_helper = _api .deprecated ("3.7" , obj_type = "" )(
5151 property (lambda self : PsBackendHelper ()))
52+ psDefs = _api .deprecated ("3.8" , obj_type = "" )(property (lambda self : _psDefs ))
5253
5354
5455papersize = {'letter' : (8.5 , 11 ),
@@ -921,13 +922,13 @@ def print_figure_impl(fh):
921922 f"%%EndComments\n " ,
922923 end = "" , file = fh )
923924
924- Ndict = len (psDefs )
925+ Ndict = len (_psDefs )
925926 print ("%%BeginProlog" , file = fh )
926927 if not mpl .rcParams ['ps.useafm' ]:
927928 Ndict += len (ps_renderer ._character_tracker .used )
928929 print ("/mpldict %d dict def" % Ndict , file = fh )
929930 print ("mpldict begin" , file = fh )
930- print ("\n " .join (psDefs ), file = fh )
931+ print ("\n " .join (_psDefs ), file = fh )
931932 if not mpl .rcParams ['ps.useafm' ]:
932933 for font_path , chars \
933934 in ps_renderer ._character_tracker .used .items ():
@@ -1030,9 +1031,9 @@ def _print_figure_tex(
10301031{ get_bbox_header (bbox )[0 ]}
10311032%%EndComments
10321033%%BeginProlog
1033- /mpldict { len (psDefs )} dict def
1034+ /mpldict { len (_psDefs )} dict def
10341035mpldict begin
1035- { "" .join (psDefs )}
1036+ { "" .join (_psDefs )}
10361037end
10371038%%EndProlog
10381039mpldict begin
@@ -1297,7 +1298,7 @@ def pstoeps(tmpfile, bbox=None, rotated=False):
12971298
12981299# The usage comments use the notation of the operator summary
12991300# in the PostScript Language reference manual.
1300- psDefs = [
1301+ _psDefs = [
13011302 # name proc *_d* -
13021303 # Note that this cannot be bound to /d, because when embedding a Type3 font
13031304 # we may want to define a "d" glyph using "/d{...} d" which would locally
0 commit comments