Closed mkoeppe closed 4 years ago
Description changed:
---
+++
@@ -2,8 +2,9 @@
Access is through functions `verbose`, `set_verbose`, `set_verbose_files`, `get_verbose_files`, `unset_verbose_files`, `get_verbose`, all of which are imported by `sage.misc.all`.
-Only `verbose` is used in sagelib.
-`set_verbose` is used in doctests of sagelib.
+Only `verbose` and `get_verbose` are used in sagelib.
+
+Additionally, `set_verbose` is used in doctests of sagelib.
We move the functions to a new module `sage.misc.verbose`, with `lazy_import` and deprecation.
Description changed:
---
+++
@@ -12,5 +12,5 @@
See also:
- #21349: build verbose upon Python's logging module
+- #17815: Remove verbose from the global namespace
-
We can reuse some of the commits of #21349 for this ticket.
Author: Daniel Krenn, Matthias Koeppe
Description changed:
---
+++
@@ -6,8 +6,9 @@
Additionally, `set_verbose` is used in doctests of sagelib.
-We move the functions to a new module `sage.misc.verbose`, with `lazy_import` and deprecation.
+We move the functions to a new module `sage.misc.verbose`, with `lazy_import` and deprecation. This is preparation for #21349, and is also helpful for #29865 (modularization).
+We also deprecate the import of `verbose` into `sage.misc.all` as proposed in #17815.
See also:
The branch does not work yet because it the moved functions depend on cputime
from sage.misc.misc
and other missing imports
Last 10 new commits:
a5453bf | Fixup: Add src/sage/misc/call.py |
64c5701 | lazy_import from sage.misc.call with deprecation |
65414f7 | Fix imports and one deprecation warning |
b9314d4 | sage.misc.call: Add standard header information, add to reference manual |
6024ffd | src/sage/misc/call.py: register_unpickle_override for call_method |
e8ad8d3 | sage.misc.verbose: New module |
ad01c5f | sage.misc.misc: Move *verbose* to sage.misc.verbose |
67f7eb2 | sage.misc.all: Import *verbose* from sage.misc.verbose, deprecate import of function verbose |
8068325 | sage.misc.misc: lazy_import *verbose* with deprecation |
2363642 | fixup |
Description changed:
---
+++
@@ -1,12 +1,14 @@
The "simple verbosity system" in `sage.misc.misc` has 2 global variables, `LEVEL` and `verbose_files`, which are meant to be internal.
-Access is through functions `verbose`, `set_verbose`, `set_verbose_files`, `get_verbose_files`, `unset_verbose_files`, `get_verbose`, all of which are imported by `sage.misc.all`.
+- Access is through functions `verbose`, `set_verbose`, `set_verbose_files`, `get_verbose_files`, `unset_verbose_files`, `get_verbose`, all of which are imported by `sage.misc.all`.
-Only `verbose` and `get_verbose` are used in sagelib.
+- Only `verbose` and `get_verbose` are used in sagelib.
-Additionally, `set_verbose` is used in doctests of sagelib.
+- Additionally, `set_verbose` is used in doctests of sagelib.
We move the functions to a new module `sage.misc.verbose`, with `lazy_import` and deprecation. This is preparation for #21349, and is also helpful for #29865 (modularization).
+
+We also add some documentation taken from #21349.
We also deprecate the import of `verbose` into `sage.misc.all` as proposed in #17815.
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
68da7f5 | replace all of sage.misc.*verbose by sage.verbose.*verbose |
55ec500 | resolve verbose-nameclash |
c9eb31d | Replace imports *verbose* from sage.misc.all by imports from sage.misc.verbose |
06dcba2 | sage.plot.graphics: Use warnings.warn instead of nonexisting sage.misc.misc.warn |
210c1a7 | sage.plot: Import sage.misc.verbose |
8a5e384 | Fix remaining imports of *verbose* |
5632556 | src/sage/modular/modsym/relation_matrix_pyx.pyx: Fixup import |
41d42e9 | sage.misc.verbose: Fix imports |
b3af9e2 | sage.misc.verbose: Fix doctest |
d8abdb0 | Fixup various imports and uses of verbose |
Branch pushed to git repo; I updated commit sha1. New commits:
db40fd5 | Fix pyflakes warnings regarding imports |
The remaining patchbot plugin warnings are old news. Needs review.
LGTM.
Reviewer: Travis Scrimshaw
Thank you!
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
df742b1 | Merge tag '9.2.beta3' into t/29895/move_sage_misc_misc__verbose__to_new_module_sage_misc_verbose |
Merge conflict
Dependencies: #29892
Branch pushed to git repo; I updated commit sha1. New commits:
3f5b6ea | Move sage.misc.misc.coeff_repr, repr_lincomb to new module sage.misc.repr |
08fedfa | src/sage/combinat/root_system/type_dual.py: Remove unused variable to fix pyflakes warning |
05efc11 | sage.misc.repr.coeff_repr: Add doctest, adapted from sage.misc.latex.coeff_repr |
538323b | src/sage/misc/call.py: Fix block syntax in docstring |
b5f63a5 | src/sage/misc/call.py: Returns should be Return |
ceaf817 | Merge branch 't/29892/move_sage_misc_misc_coeff_repr__repr_lincomb_to_new_module_sage_misc_repr' into t/29895/move_sage_misc_misc__verbose__to_new_module_sage_misc_verbose |
Trivial merge to resolve conflict
sage -t --long --warn-long 36.6 src/sage/algebras/splitting_algebra.py
**********************************************************************
File "src/sage/algebras/splitting_algebra.py", line 56, in sage.algebras.splitting_algebra.SplittingAlgebraElement
Failed example:
CR6.<e6> = SplittingAlgebra(cp6)
Expected nothing
Got:
doctest:warning
File "/home/release/Sage/src/bin/sage-runtests", line 177, in <module>
err = DC.run()
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/doctest/control.py", line 1207, in run
self.run_doctests()
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/doctest/control.py", line 908, in run_doctests
self.dispatcher.dispatch()
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 2038, in dispatch
self.parallel_dispatch()
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1933, in parallel_dispatch
w.start() # This might take some time
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 2205, in start
super(DocTestWorker, self).start()
File "/home/release/Sage/local/lib/python3.7/multiprocessing/process.py", line 112, in start
self._popen = self._Popen(self)
File "/home/release/Sage/local/lib/python3.7/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/release/Sage/local/lib/python3.7/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/release/Sage/local/lib/python3.7/multiprocessing/popen_fork.py", line 20, in __init__
self._launch(process_obj)
File "/home/release/Sage/local/lib/python3.7/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/home/release/Sage/local/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 2177, in run
task(self.options, self.outtmpfile, msgpipe, self.result_queue)
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 2506, in __call__
doctests, extras = self._run(runner, options, results)
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 2552, in _run
result = runner.run(test)
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 905, in run
return self._run(test, compileflags, out)
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 707, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1131, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.algebras.splitting_algebra.SplittingAlgebraElement[2]>", line 1, in <module>
CR6 = SplittingAlgebra(cp6, names=('e6',)); (e6,) = CR6._first_ngens(1)
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/algebras/splitting_algebra.py", line 224, in __init__
% (base_ring, monic_polynomial, iterate, warning))
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/misc/superseded.py", line 100, in deprecation
warning(trac_number, message, DeprecationWarning, stacklevel)
File "/home/release/Sage/local/lib/python3.7/site-packages/sage/misc/superseded.py", line 146, in warning
warn(message, warning_class, stacklevel)
File "/home/release/Sage/local/lib/python3.7/warnings.py", line 110, in _showwarnmsg
msg.file, msg.line)
:
DeprecationWarning:
Importing verbose from here is deprecated. If you need to use it, please import it directly from sage.misc.verbose
See http://trac.sagemath.org/17815 for details.
**********************************************************************
1 item had failures:
1 of 6 in sage.algebras.splitting_algebra.SplittingAlgebraElement
[107 tests, 1 failure, 0.65 s]
----------------------------------------------------------------------
sage -t --long --warn-long 36.6 src/sage/algebras/splitting_algebra.py # 1 doctest failed
----------------------------------------------------------------------
Branch pushed to git repo; I updated commit sha1. New commits:
8d7609e | src/sage/algebras/splitting_algebra.py: from sage.misc.verbose import verbose |
Changed reviewer from Travis Scrimshaw to Travis Scrimshaw, Markus Wageringel
The fix looks good to me and the bot is green.
Thanks!
Changed branch from u/mkoeppe/move_sage_misc_miscverboseto_new_module_sage_misc_verbose to 8d7609e
The "simple verbosity system" in
sage.misc.misc
has 2 global variables,LEVEL
andverbose_files
, which are meant to be internal.Access is through functions
verbose
,set_verbose
,set_verbose_files
,get_verbose_files
,unset_verbose_files
,get_verbose
, all of which are imported bysage.misc.all
.Only
verbose
andget_verbose
are used in sagelib.Additionally,
set_verbose
is used in doctests of sagelib.We move the functions to a new module
sage.misc.verbose
, withlazy_import
and deprecation. This is preparation for #21349, and is also helpful for #29865 (modularization).We also add some documentation taken from #21349.
We also deprecate the import of
verbose
intosage.misc.all
as proposed in #17815.See also:
21349: build verbose upon Python's logging module
17815: Remove verbose from the global namespace
Depends on #29892
CC: @fchapoton @tscrim @dkrenn @mwageringel
Component: refactoring
Author: Daniel Krenn, Matthias Koeppe
Branch/Commit:
8d7609e
Reviewer: Travis Scrimshaw, Markus Wageringel
Issue created by migration from https://trac.sagemath.org/ticket/29895