summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3deprecation.dtx
blob: 153c6a49f5a0d0d1d0d393da10fa208f812fed68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
% \iffalse meta-comment
%
%% File: l3deprecation.dtx
%
% Copyright (C) 2017-2021 The LaTeX Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
% license or (at your option) any later version.  The latest version
% of this license is in the file
%
%    https://www.latex-project.org/lppl.txt
%
% This file is part of the "l3kernel bundle" (The Work in LPPL)
% and all files in that bundle must be distributed together.
%
% -----------------------------------------------------------------------
%
% The development version of the bundle can be found at
%
%    https://github.com/latex3/latex3
%
% for those people who are interested.
%
%<*driver>
\documentclass[full,kernel]{l3doc}
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \title{^^A
%   The \pkg{l3deprecation} package\\ Deprecation errors^^A
% }
%
% \author{^^A
%  The \LaTeX{} Project\thanks
%    {^^A
%      E-mail:
%        \href{mailto:latex-team@latex-project.org}
%          {latex-team@latex-project.org}^^A
%    }^^A
% }
%
% \date{Released 2021-10-17}
%
% \maketitle
%
% \begin{documentation}
%
% \section{\pkg{l3deprecation} documentation}
%
% A few commands have had to be deprecated over the years.  This module
% defines deprecated and deleted commands to produce an error.
%
% The life of a deprecated command has several stages.
% \begin{itemize}
% \item When we decide it should be eventually removed the command's
%   definition is put in this file \pkg{l3deprecation.dtx} and the name
%   of the command is added to the list in \pkg{l3obsolete.txt}.  The
%   command remains defined by default for $12$ or more months,
%   typically until the end of a year.  During that time, if \pkg{expl3}
%   is loaded with any of the options \texttt{check-declarations} or
%   \texttt{log-functions} or \texttt{enable-debug} typically used in
%   package test files, the command will produce a warning.
% \item Then by default the command produces an error for all users,
%   which can be suppressed for $6$ months through the option
%   \texttt{undo-recent-deprecations}.
% \item After this $6$-month grace period, the command irreversibly
%   produces an error.  Its original definition can then be removed from
%   the sources, leaving only the error definition.  In
%   \pkg{l3obsolete.txt} its name is moved from the \enquote{Deprecated
%   functions and variables} list to the \enquote{Removed functions and
%   variables} list.
% \end{itemize}
% Package authors are encouraged to have a test file with
% \cs{debug_on:n} |{deprecation}|, which makes commands at all stages of
% this list into errors.  This helps detect uses of deprecated commands
% before user complain.
%
% \end{documentation}
%
% \begin{implementation}
%
% \section{\pkg{l3deprecation} implementation}
%
%    \begin{macrocode}
%<*package>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*kernel>
%    \end{macrocode}
%
%    \begin{macrocode}
%<@@=deprecation>
%    \end{macrocode}
%
% \subsection{Helpers and variables}
%
% \begin{variable}{\l_@@_grace_period_bool}
%   This is set to \texttt{true} when the deprecated command that is
%   being defined is in its grace period, meaning between the time it
%   becomes an error by default and the time $6$~months later where even
%   \texttt{undo-recent-deprecations} stops restoring it.
%    \begin{macrocode}
\bool_new:N \l_@@_grace_period_bool
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\s_@@_mark,\s_@@_stop}
%   Internal scan marks.
%    \begin{macrocode}
\scan_new:N \s_@@_mark
\scan_new:N \s_@@_stop
%    \end{macrocode}
% \end{variable}
%
% \begin{macro}[EXP]{\@@_date_compare:nNnTF, \@@_date_compare_aux:w}
%   Expects |#1| and |#3| to be dates in the format YYYY-MM-DD (but
%   accepts YYYY or YYYY-MM too, filling in zeros for the missing data).
%   Compares them using |#2| (one of |<|, |=|, |>|).
%    \begin{macrocode}
\cs_new:Npn \@@_date_compare:nNnTF #1#2#3
  { \@@_date_compare_aux:w #1 -0-0- \s_@@_mark #2 #3 -0-0- \s_@@_stop }
\cs_new:Npn \@@_date_compare_aux:w
  #1 - #2 - #3 - #4 \s_@@_mark #5 #6 - #7 - #8 - #9 \s_@@_stop
  {
    \int_compare:nNnTF {#1} = {#6}
      {
        \int_compare:nNnTF {#2} = {#7}
          { \int_compare:nNnTF {#3} #5 {#8} }
          { \int_compare:nNnTF {#2} #5 {#7} }
      }
      { \int_compare:nNnTF {#1} #5 {#6} }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{variable}{\g__kernel_deprecation_undo_recent_bool}
%    \begin{macrocode}
\bool_new:N \g__kernel_deprecation_undo_recent_bool
%    \end{macrocode}
% \end{variable}
%
% \begin{macro}{\@@_not_yet_deprecated:nTF, \@@_minus_six_months:w}
%   Receives a deprecation \meta{date} and runs the \texttt{true}
%   (\texttt{false}) branch if the \pkg{expl3} date is earlier (later)
%   than \meta{date}.  If \texttt{undo-recent-deprecations} is used we
%   subtract $6$ months to the \pkg{expl3} date (equivalently add $6$
%   months to the \meta{date}).  In addition, if the \pkg{expl3} date is
%   between \meta{date} and \meta{date} plus $6$ months,
%   \cs{l_@@_grace_period_bool} is set to \texttt{true}, otherwise
%   \texttt{false}.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_not_yet_deprecated:nTF #1
  {
    \bool_set_false:N \l_@@_grace_period_bool
    \exp_args:No \@@_date_compare:nNnTF { \ExplLoaderFileDate } < {#1}
      { \use_i:nn }
      {
        \exp_args:Nf \@@_date_compare:nNnTF
          {
            \exp_after:wN \@@_minus_six_months:w
            \ExplLoaderFileDate -0-0- \s_@@_stop
          } < {#1}
          {
            \bool_set_true:N \l_@@_grace_period_bool
            \bool_if:NTF \g__kernel_deprecation_undo_recent_bool
          }
          { \use_ii:nn }
      }
  }
\cs_new:Npn \@@_minus_six_months:w #1 - #2 - #3 - #4 \s_@@_stop
  {
    \int_compare:nNnTF {#2} > 6
      { #1 - \int_eval:n { #2 - 6 } - #3 }
      { \int_eval:n { #1 - 1 } - \int_eval:n { #2 + 6 } - #3 }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Patching definitions to deprecate}
%
% \begin{quote}
%   \cs{__kernel_patch_deprecation:nnNNpn} \Arg{date} \Arg{replacement}
%   \meta{definition} \meta{function} \meta{parameters} \Arg{code}
% \end{quote}
% defines the \meta{function} to produce a warning and run its
% \meta{code}, or to produce an error and not run any \meta{code},
% depending on the \pkg{expl3} date.
% \begin{itemize}
% \item If the \pkg{expl3} date is less than the \meta{date} (plus
%   $6$~months in case \texttt{undo-recent-deprecations} is used) then
%   we define the \meta{function} to produce a warning and run its code.
%   The warning is actually suppressed in two cases:
%   \begin{itemize}
%   \item if neither \texttt{undo-recent-deprecations} nor
%     \texttt{enable-debug} are in effect we may be in an end-user's
%     document so it is suppressed;
%   \item if the command is expandable then we cannot produce a warning.
%   \end{itemize}
% \item Otherwise, we define the \meta{function} to produce an error.
% \end{itemize}
% In both cases we additionally make \cs{debug_on:n} |{deprecation}|
% turn the \meta{function} into an \tn{outer} error, and
% \cs{debug_off:n} |{deprecation}| restore whatever the behaviour was
% without \cs{debug_on:n} |{deprecation}|.
%
% In later sections we use the \pkg{l3doc} key \texttt{deprecated} with
% a date equal to that \meta{date} plus $6$~months, so that \pkg{l3doc}
% will complain if we forget to remove the stale \meta{parameters} and
% \Arg{code}.
%
% In the explanations below, \meta{definition} \meta{function}
% \meta{parameters} \Arg{code} or assignments that only differ in the
% scope of the \meta{definition} will be called \enquote{the standard
% definition}.
%
% \begin{macro}
%   {
%     \__kernel_patch_deprecation:nnNNpn, \@@_patch_aux:nnNNnn,
%     \@@_warn_once:nnNnn,
%     \@@_patch_aux:Nn,
%     \@@_just_error:nnNN
%   }
%   (The parameter text is grabbed using |#5#|.)  The arguments of
%   \cs{__kernel_deprecation_code:nn} are run upon \cs{debug_on:n}
%   |{deprecation}| and \cs{debug_off:n} |{deprecation}|, respectively.
%   In both scenarios we the \meta{function} may be \tn{outer} so we
%   undefine it with \cs{tex_let:D} before redefining it, with
%   \cs{__kernel_deprecation_error:Nnn} or with some code added shortly.
%
%   Then check the date (taking into account
%   \texttt{undo-recent-deprecations}) to see if the command should be
%   deprecated right away (\texttt{false} branch of
%   \cs{@@_not_yet_deprecated:nTF}), in which case
%   \cs{@@_just_error:nnNN} makes \meta{function} into an error (not
%   \tn{outer}), ignoring its \meta{parameters} and \meta{code}
%   completely.
%
%   Otherwise distinguish cases where we should give a warning from
%   those where we shouldn't: warnings can only happen for protected
%   commands, and we only want them if either
%   \texttt{undo-recent-deprecations} or \texttt{enable-debug} is in
%   force, not for standard users.
%    \begin{macrocode}
\cs_new_protected:Npn \__kernel_patch_deprecation:nnNNpn #1#2#3#4#5#
  { \@@_patch_aux:nnNNnn {#1} {#2} #3 #4 {#5} }
\cs_new_protected:Npn \@@_patch_aux:nnNNnn #1#2#3#4#5#6
  {
    \__kernel_deprecation_code:nn
      {
        \tex_let:D #4 \scan_stop:
        \__kernel_deprecation_error:Nnn #4 {#2} {#1}
      }
      { \tex_let:D #4 \scan_stop: }
    \@@_not_yet_deprecated:nTF {#1}
      {
        \bool_if:nTF
          {
            \cs_if_eq_p:NN #3 \cs_gset_protected:Npn &&
            \__kernel_if_debug:TF
              { \c_true_bool } { \g__kernel_deprecation_undo_recent_bool }
          }
          { \@@_warn_once:nnNnn {#1} {#2} #4 {#5} {#6} }
          { \@@_patch_aux:Nn #3 { #4 #5 {#6} } }
      }
      { \@@_just_error:nnNN {#1} {#2} #3 #4 }
  }
%    \end{macrocode}
%   In case we want a warning, the \meta{function} is defined to produce
%   such a warning without grabbing any argument, then redefine itself
%   to the standard definition that the \meta{function} should have,
%   with arguments, and call that definition.  The \texttt{x}-type
%   expansion and \cs{exp_not:n} avoid needing to double the~|#|, which
%   we could not do anyways.  We then deal with the code for
%   \cs{debug_off:n} |{deprecation}|: presumably someone doing that does
%   not need the warning so we simply do the standard definition.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_warn_once:nnNnn #1#2#3#4#5
  {
    \cs_gset_protected:Npx #3
      {
        \__kernel_if_debug:TF
          {
            \exp_not:N \msg_warning:nnxxx
              { deprecation } { deprecated-command }
              {#1}
              { \token_to_str:N #3 }
              { \tl_to_str:n {#2} }
          }
          { }
        \exp_not:n { \cs_gset_protected:Npn #3 #4 {#5} }
        \exp_not:N #3
      }
    \__kernel_deprecation_code:nn { }
      { \cs_set_protected:Npn #3 #4 {#5} }
  }
%    \end{macrocode}
%   In case we want neither warning nor error, the \meta{function} is
%   given its standard definition.  Here |#1| is \cs{cs_new:Npn} or
%   \cs{cs_new_protected:Npn}) and |#2| is \meta{function}
%   \meta{parameters} \Arg{code}, so |#1#2| performs the assignment.
%   For \cs{debug_off:n} |{deprecation}| we want to use the same
%   assignment but with a different scope, hence the \cs{cs_if_eq:NNTF}
%   test.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_patch_aux:Nn #1#2
  {
    #1 #2
    \cs_if_eq:NNTF #1 \cs_gset_protected:Npn
      { \__kernel_deprecation_code:nn { } { \cs_set_protected:Npn #2 } }
      { \__kernel_deprecation_code:nn { } { \cs_set:Npn #2 } }
  }
%    \end{macrocode}
%   Finally, if we want an error we reuse the same \cs{@@_patch_aux:Nn}
%   as the previous case.  Indeed, we want \cs{debug_off:n}
%   |{deprecation}| to make the \meta{function} into an error, just like
%   it is by default.  The error is expandable or not, and the last
%   argument of the error message is empty or is \texttt{grace} to
%   denote the case where we are in the $6$~month grace period, in which
%   case the error message is more detailed.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_just_error:nnNN #1#2#3#4
  {
    \exp_args:NNx \@@_patch_aux:Nn #3
      {
        \exp_not:N #4
        {
          \cs_if_eq:NNTF #3 \cs_gset_protected:Npn
            { \exp_not:N \msg_error:nnnnnn }
            { \exp_not:N \msg_expandable_error:nnnnnn }
            { deprecation } { deprecated-command }
            {#1}
            { \token_to_str:N #4 }
            { \tl_to_str:n {#2} }
            { \bool_if:NT \l_@@_grace_period_bool { grace } }
        }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\__kernel_deprecation_error:Nnn}
%   The \tn{outer} definition here ensures the command cannot appear
%   in an argument.  Use this auxiliary on all commands that have been
%   removed since 2015.
%    \begin{macrocode}
\cs_new_protected:Npn \__kernel_deprecation_error:Nnn #1#2#3
  {
    \tex_protected:D \tex_outer:D \tex_edef:D #1
      {
        \exp_not:N \msg_expandable_error:nnnnn
          { deprecation } { deprecated-command }
          { \tl_to_str:n {#3} } { \token_to_str:N #1 } { \tl_to_str:n {#2} }
        \exp_not:N \msg_error:nnxxx
          { deprecation } { deprecated-command }
          { \tl_to_str:n {#3} } { \token_to_str:N #1 } { \tl_to_str:n {#2} }
      }
  }
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\msg_new:nnn { deprecation } { deprecated-command }
  {
    \tl_if_blank:nF {#3} { Use~ \tl_trim_spaces:n {#3} ~not~ }
    #2~deprecated~on~#1.
    \str_if_eq:nnT {#4} { grace }
      {
        \c_space_tl
        For~6~months~after~that~date~one~can~restore~a~deprecated~
        command~by~loading~the~expl3~package~with~the~option~
        'undo-recent-deprecations'.
      }
  }
%    \end{macrocode}
%
% \subsection{Removed functions}
%
% \begin{macro}{\@@_old_protected:Nnn, \@@_old:Nnn}
%   Short-hands for old commands whose definition does not matter
%   anymore, i.e., commands past the grace period.
%    \begin{macrocode}
\cs_new_protected:Npn \@@_old_protected:Nnn #1#2#3
  {
    \__kernel_patch_deprecation:nnNNpn {#3} {#2}
    \cs_gset_protected:Npn #1 { }
  }
\cs_new_protected:Npn \@@_old:Nnn #1#2#3
  {
    \__kernel_patch_deprecation:nnNNpn {#3} {#2}
    \cs_gset:Npn #1 { }
  }
\@@_old:Nnn \box_resize:Nnn
  { \box_resize_to_wd_and_ht_plus_dp:Nnn } { 2019-01-01 }
\@@_old:Nnn \box_use_clear:N
  { \box_use_drop:N } { 2019-01-01 }
\@@_old:Nnn \c_job_name_tl
  { \c_sys_jobname_str } { 2017-01-01 }
\@@_old:Nnn \c_minus_one
  { -1 } { 2019-01-01 }
\@@_old:Nnn \c_zero
  { 0 } { 2020-01-01 }
\@@_old:Nnn \c_one
  { 1 } { 2020-01-01 }
\@@_old:Nnn \c_two
  { 2 } { 2020-01-01 }
\@@_old:Nnn \c_three
  { 3 } { 2020-01-01 }
\@@_old:Nnn \c_four
  { 4 } { 2020-01-01 }
\@@_old:Nnn \c_five
  { 5 } { 2020-01-01 }
\@@_old:Nnn \c_six
  { 6 } { 2020-01-01 }
\@@_old:Nnn \c_seven
  { 7 } { 2020-01-01 }
\@@_old:Nnn \c_eight
  { 8 } { 2020-01-01 }
\@@_old:Nnn \c_nine
  { 9 } { 2020-01-01 }
\@@_old:Nnn \c_ten
  { 10 } { 2020-01-01 }
\@@_old:Nnn \c_eleven
  { 11 } { 2020-01-01 }
\@@_old:Nnn \c_twelve
  { 12 } { 2020-01-01 }
\@@_old:Nnn \c_thirteen
  { 13 } { 2020-01-01 }
\@@_old:Nnn \c_fourteen
  { 14 } { 2020-01-01 }
\@@_old:Nnn \c_fifteen
  { 15 } { 2020-01-01 }
\@@_old:Nnn \c_sixteen
  { 16 } { 2020-01-01 }
\@@_old:Nnn \c_thirty_two
  { 32 } { 2020-01-01 }
\@@_old:Nnn \c_one_hundred
  { 100 } { 2020-01-01 }
\@@_old:Nnn \c_two_hundred_fifty_five
  { 255 } { 2020-01-01 }
\@@_old:Nnn \c_two_hundred_fifty_six
  { 256 } { 2020-01-01 }
\@@_old:Nnn \c_one_thousand
  { 1000 } { 2020-01-01 }
\@@_old:Nnn \c_ten_thousand
  { 10000 } { 2020-01-01 }
\@@_old:Nnn \dim_case:nnn
  { \dim_case:nnF } { 2015-07-14 }
\@@_old:Nnn \file_add_path:nN
  { \file_get_full_name:nN } { 2019-01-01 }
\@@_old_protected:Nnn \file_if_exist_input:nT
  { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 }
\@@_old_protected:Nnn \file_if_exist_input:nTF
  { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 }
\@@_old:Nnn \file_list:
  { \file_log_list: } { 2019-01-01 }
\@@_old:Nnn \file_path_include:n
  { \seq_put_right:Nn \l_file_search_path_seq } { 2019-01-01 }
\@@_old:Nnn \file_path_remove:n
  { \seq_remove_all:Nn \l_file_search_path_seq } { 2019-01-01 }
\@@_old:Nnn \g_file_current_name_tl
  { \g_file_curr_name_str } { 2019-01-01 }
\@@_old:Nnn \int_case:nnn
  { \int_case:nnF } { 2015-07-14 }
\@@_old:Nnn \int_from_binary:n
  { \int_from_bin:n } { 2016-01-05 }
\@@_old:Nnn \int_from_hexadecimal:n
  { \int_from_hex:n } { 2016-01-05 }
\@@_old:Nnn \int_from_octal:n
  { \int_from_oct:n } { 2016-01-05 }
\@@_old:Nnn \int_to_binary:n
  { \int_to_bin:n } { 2016-01-05 }
\@@_old:Nnn \int_to_hexadecimal:n
  { \int_to_hex:n } { 2016-01-05 }
\@@_old:Nnn \int_to_octal:n
  { \int_to_oct:n } { 2016-01-05 }
\@@_old_protected:Nnn \ior_get_str:NN
  { \ior_str_get:NN } { 2018-03-05 }
\@@_old:Nnn \ior_list_streams:
  { \ior_show_list: } { 2019-01-01 }
\@@_old:Nnn \ior_log_streams:
  { \ior_log_list: } { 2019-01-01 }
\@@_old:Nnn \iow_list_streams:
  { \iow_show_list: } { 2019-01-01 }
\@@_old:Nnn \iow_log_streams:
  { \iow_log_list: } { 2019-01-01 }
\@@_old:Nnn \lua_escape_x:n
  { \lua_escape:e } { 2020-01-01 }
\@@_old:Nnn \lua_now_x:n
  { \lua_now:e } { 2020-01-01 }
\@@_old_protected:Nnn \lua_shipout_x:n
  { \lua_shipout_e:n } { 2020-01-01 }
\@@_old:Nnn \luatex_if_engine_p:
  { \sys_if_engine_luatex_p: } { 2017-01-01 }
\@@_old:Nnn \luatex_if_engine:F
  { \sys_if_engine_luatex:F } { 2017-01-01 }
\@@_old:Nnn \luatex_if_engine:T
  { \sys_if_engine_luatex:T } { 2017-01-01 }
\@@_old:Nnn \luatex_if_engine:TF
  { \sys_if_engine_luatex:TF } { 2017-01-01 }
\@@_old_protected:Nnn \msg_interrupt:nnn
  { [Defined~error~message] } { 2020-01-01 }
\@@_old_protected:Nnn \msg_log:n
  { \iow_log:n } { 2020-01-01 }
\@@_old_protected:Nnn \msg_term:n
  { \iow_term:n } { 2020-01-01 }
\@@_old:Nnn \pdftex_if_engine_p:
  { \sys_if_engine_pdftex_p: } { 2017-01-01 }
\@@_old:Nnn \pdftex_if_engine:F
  { \sys_if_engine_pdftex:F } { 2017-01-01 }
\@@_old:Nnn \pdftex_if_engine:T
  { \sys_if_engine_pdftex:T } { 2017-01-01 }
\@@_old:Nnn \pdftex_if_engine:TF
  { \sys_if_engine_pdftex:TF } { 2017-01-01 }
\@@_old:Nnn \prop_get:cn
  { \prop_item:cn } { 2016-01-05 }
\@@_old:Nnn \prop_get:Nn
  { \prop_item:Nn } { 2016-01-05 }
\@@_old:Nnn \quark_if_recursion_tail_break:N
  { } { 2015-07-14 }
\@@_old:Nnn \quark_if_recursion_tail_break:n
  { } { 2015-07-14 }
\@@_old:Nnn \scan_align_safe_stop:
  { protected~commands } { 2017-01-01 }
\@@_old:Nnn \sort_ordered:
  { \sort_return_same: } { 2019-01-01 }
\@@_old:Nnn \sort_reversed:
  { \sort_return_swapped: } { 2019-01-01 }
\@@_old:Nnn \str_case:nnn
  { \str_case:nnF } { 2015-07-14 }
\@@_old:Nnn \str_case:onn
  { \str_case:onF } { 2015-07-14 }
\@@_old:Nnn \str_case_x:nn
  { \str_case_e:nn } { 2020-01-01 }
\@@_old:Nnn \str_case_x:nnn
  { \str_case_e:nnF } { 2015-07-14 }
\@@_old:Nnn \str_case_x:nnT
  { \str_case_e:nnT } { 2020-01-01 }
\@@_old:Nnn \str_case_x:nnTF
  { \str_case_e:nnTF } { 2020-01-01 }
\@@_old:Nnn \str_case_x:nnF
  { \str_case_e:nnF } { 2020-01-01 }
\@@_old:Nnn \str_if_eq_x_p:nn
  { \str_if_eq_p:ee } { 2020-01-01 }
\@@_old:Nnn \str_if_eq_x:nnT
  { \str_if_eq:eeT } { 2020-01-01 }
\@@_old:Nnn \str_if_eq_x:nnF
  { \str_if_eq:eeF } { 2020-01-01 }
\@@_old:Nnn \str_if_eq_x:nnTF
  { \str_if_eq:eeTF } { 2020-01-01 }
\@@_old_protected:Nnn \tl_show_analysis:N
  { \tl_analysis_show:N } { 2020-01-01 }
\@@_old_protected:Nnn \tl_show_analysis:n
  { \tl_analysis_show:n } { 2020-01-01 }
\@@_old:Nnn \tl_case:cnn
  { \tl_case:cnF } { 2015-07-14 }
\@@_old:Nnn \tl_case:Nnn
  { \tl_case:NnF } { 2015-07-14 }
\@@_old_protected:Nnn \tl_to_lowercase:n
  { \tex_lowercase:D } { 2018-03-05 }
\@@_old_protected:Nnn \tl_to_uppercase:n
  { \tex_uppercase:D } { 2018-03-05 }
\@@_old:Nnn \token_new:Nn
  { \cs_new_eq:NN } { 2019-01-01 }
\@@_old:Nnn \xetex_if_engine_p:
  { \sys_if_engine_xetex_p: } { 2017-01-01 }
\@@_old:Nnn \xetex_if_engine:F
  { \sys_if_engine_xetex:F } { 2017-01-01 }
\@@_old:Nnn \xetex_if_engine:T
  { \sys_if_engine_xetex:T } { 2017-01-01 }
\@@_old:Nnn \xetex_if_engine:TF
  { \sys_if_engine_xetex:TF } { 2017-01-01 }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Loading the patches}
%
% When loaded first, the patches are simply read here.
% Here the deprecation code is loaded with the lower-level |\__kernel_...|
% macro because we don't want it to flip the \cs{g__sys_deprecation_bool}
% boolean, so that the deprecation code can be re-loaded later (when using
% \texttt{undo-recent-deprecations}).
%
%    \begin{macrocode}
\group_begin:
\cs_set_protected:Npn \ProvidesExplFile
  {
    \char_set_catcode_space:n { `\  }
    \ProvidesExplFileAux
  }
\cs_set_protected:Npx \ProvidesExplFileAux #1#2#3#4
  {
    \group_end:
    \cs_if_exist:NTF \ProvidesFile
      { \exp_not:N \ProvidesFile {#1} [ #2~v#3~#4 ] }
      { \iow_log:x { File:~#1~#2~v#3~#4 } }
  }
\cs_gset_protected:Npn \__kernel_sys_configuration_load:n #1
  { \file_input:n { #1 .def } }
\__kernel_sys_configuration_load:n { l3deprecation }
%    \end{macrocode}
%
%    \begin{macrocode}
%</kernel>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*patches>
%    \end{macrocode}
%
% Standard file identification.
%    \begin{macrocode}
\ProvidesExplFile{l3deprecation.def}{2019-04-06}{}{L3 Deprecated functions}
%    \end{macrocode}
%
% \subsection{Deprecated \pkg{l3str} functions}
%
%    \begin{macrocode}
%<@@=str>
%    \end{macrocode}
%
% \begin{macro}[EXP, deprecated = 2022-07-01]
%   {
%     \str_lower_case:n, \str_lower_case:f,
%     \str_upper_case:n, \str_upper_case:f,
%     \str_fold_case:n,  \str_fold_case:V
%   }
%    \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \str_lowercase:n }
\cs_gset:Npn \str_lower_case:n { \str_lowercase:n }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \str_lowercase:f }
\cs_gset:Npn \str_lower_case:f { \str_lowercase:f }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \str_uppercase:n }
\cs_gset:Npn \str_upper_case:n { \str_uppercase:n }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \str_uppercase:f }
\cs_gset:Npn \str_upper_case:f { \str_uppercase:f }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \str_foldcase:n }
\cs_gset:Npn \str_fold_case:n { \str_foldcase:n }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \str_foldcase:V }
\cs_gset:Npn \str_fold_case:V { \str_foldcase:V }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}[EXP, deprecated = 2022-07-01]
%   {\str_declare_eight_bit_encoding:nnn}
%   This command was made internal, with one more argument.  There is no
%   easy way to compute a reasonable value for that extra argument so we
%   take a value that is big enough to accomodate all of Unicode.
%    \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { }
\cs_gset_protected:Npn \str_declare_eight_bit_encoding:nnn #1
  { \@@_declare_eight_bit_encoding:nnnn {#1} { 1114112 } }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Deprecated \pkg{l3seq} functions}
%
% \begin{macro}[EXP, deprecated = 2023-01-01]
%   {
%     \seq_indexed_map_inline:Nn, \seq_indexed_map_function:NN
%   }
%    \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2022-07-01 } { \seq_map_indexed_inline:Nn }
\cs_gset:Npn \seq_indexed_map_inline:Nn { \seq_map_indexed_inline:Nn }
\__kernel_patch_deprecation:nnNNpn { 2022-07-01 } { \seq_map_indexed_function:NN }
\cs_gset:Npn \seq_indexed_map_function:NN { \seq_map_indexed_function:NN }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Deprecated \pkg{l3tl} functions}
%
%    \begin{macrocode}
%<@@=tl>
%    \end{macrocode}
%
% \begin{macro}[deprecated = 2022-07-01]
%   {
%     \tl_lower_case:n, \tl_lower_case:nn,
%     \tl_upper_case:n, \tl_upper_case:nn,
%     \tl_mixed_case:n, \tl_mixed_case:nn,
%   }
%    \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_lowercase:n }
\cs_gset:Npn \tl_lower_case:n #1
  { \text_lowercase:n {#1} }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_lowercase:nn }
\cs_gset:Npn \tl_lower_case:nn #1#2
  { \text_lowercase:nn {#1} {#2} }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_uppercase:n }
\cs_gset:Npn \tl_upper_case:n #1
  { \text_uppercase:n {#1} }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_uppercase:nn }
\cs_gset:Npn \tl_upper_case:nn #1#2
  { \text_uppercase:nn {#1} {#2} }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_titlecase:n }
\cs_gset:Npn \tl_mixed_case:n #1
  { \text_titlecase:n {#1} }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_titlecase:nn }
\cs_gset:Npn \tl_mixed_case:nn #1#2
  { \text_titlecase:nn {#1} {#2} }
%    \end{macrocode}
% \end{macro}
%
% \subsection{Deprecated \pkg{l3token} functions}
%
% \begin{macro}[EXP, deprecated = 2022-07-01]
%   {
%     \char_lower_case:N, \char_upper_case:N,
%     \char_mixed_case:Nn, \char_fold_case:N,
%     \char_str_lower_case:N, \char_str_upper_case:N,
%     \char_str_mixed_case:Nn, \char_str_fold_case:N,
%   }
%    \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \char_lowercase:N }
\cs_gset:Npn \char_lower_case:N { \char_lowercase:N }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \char_uppercase:N }
\cs_gset:Npn \char_upper_case:N { \char_uppercase:N }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \char_titlecase:N }
\cs_gset:Npn \char_mixed_case:N { \char_titlecase:N }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \char_foldcase:N }
\cs_gset:Npn \char_fold_case:N { \char_foldcase:N }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \char_str_lowercase:N }
\cs_gset:Npn \char_str_lower_case:N { \char_str_lowercase:N }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \char_str_uppercase:N }
\cs_gset:Npn \char_str_upper_case:N { \char_str_uppercase:N }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \char_str_titlecase:N }
\cs_gset:Npn \char_str_mixed_case:N { \char_str_titlecase:N }
\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \char_str_foldcase:N }
\cs_gset:Npn \char_str_fold_case:N { \char_str_foldcase:N }
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
%</patches>
%    \end{macrocode}
%
%    \begin{macrocode}
%</package>
%    \end{macrocode}
%
% \end{implementation}
%
% \PrintIndex