you got me: I was including $SAGE_ROOT/src/build/
now the numbers agree
S.

* leif <not.rea...@online.de> [2016-08-14 16:55:23]:

> leif wrote:
> > VulK wrote:
> >> Really weird, his is what I have:
> >>
> >> $ cd $SAGE_ROOT/src
> >> $ grep __cmp__ **/*.py* | grep def |  wc
> >>     624    2538   48212
> >> $ grep __cmp__ **/*.py* | wc
> >>     915    4020   76837
> >>
> >> (I am running zsh so **/*.py* is expanded to any file under $SAGE_ROOT/src
> >> whose extension begin by py)
> > 
> > $ grep -R --include "*.py" --include "*.pyx" --include "*.pxi" --include
> > "*.pxd" 'def[ \t]\+__cmp__' src/sage/ | wc -l
> > 339
> > 
> > (Still 7.3.beta9 though.  There are two definitions below src/mac-app/,
> > too.  And none in *.px[di] AFAICT, so you could omit these.)
> > 
> > You presumably grepped src/build/ as well, and also *.pyc files.
> 
> P.S.:
> 
> $ grep -Rc --include "*.py" --include "*.pyx" --include "*.pxi"
> --include "*.pxd" 'def[ \t]\+__cmp__' src/sage/ | grep -v ':0$' | sort | nl
>      1        src/sage/algebras/free_algebra_element.py:1
>      2        src/sage/algebras/free_algebra_quotient_element.py:1
>      3        src/sage/algebras/quatalg/quaternion_algebra.py:3
>      4        src/sage/arith/multi_modular.pyx:1
>      5        src/sage/categories/examples/semigroups_cython.pyx:1
>      6        src/sage/categories/functor.pyx:1
>      7        src/sage/categories/homset.py:1
>      8        src/sage/categories/map.pyx:1
>      9        src/sage/categories/pushout.py:15
>     10        src/sage/coding/binary_code.pyx:1
>     11        src/sage/combinat/combinat.py:2
>     12        src/sage/combinat/constellation.py:1
>     13        src/sage/combinat/crystals/affine.py:1
>     14        src/sage/combinat/crystals/affinization.py:1
>     15        src/sage/combinat/crystals/alcove_path.py:1
>     16        src/sage/combinat/crystals/fast_crystals.py:1
>     17        src/sage/combinat/crystals/subcrystal.py:1
>     18        src/sage/combinat/e_one_star.py:1
>     19        src/sage/combinat/free_module.py:2
>     20        src/sage/combinat/integer_list_old.py:1
>     21        src/sage/combinat/misc.py:1
>     22        src/sage/combinat/posets/elements.py:1
>     23        src/sage/combinat/rigged_configurations/kleber_tree.py:1
>     24        src/sage/combinat/root_system/ambient_space.py:1
>     25        src/sage/combinat/root_system/branching_rules.py:1
>     26        src/sage/combinat/root_system/cartan_type.py:1
>     27        src/sage/combinat/root_system/coxeter_group.py:1
>     28        src/sage/combinat/root_system/fundamental_group.py:1
>     29        src/sage/combinat/root_system/reflection_group_complex.py:1
>     30        src/sage/combinat/root_system/root_system.py:1
>     31        src/sage/combinat/root_system/type_dual.py:1
>     32        src/sage/combinat/root_system/type_reducible.py:1
>     33        src/sage/combinat/sloane_functions.py:1
>     34        src/sage/combinat/species/series.py:1
>     35        src/sage/combinat/species/species.py:1
>     36        src/sage/combinat/words/abstract_word.py:1
>     37        src/sage/combinat/words/word_char.pyx:1
>     38        src/sage/combinat/yang_baxter_graph.py:1
>     39        src/sage/crypto/boolean_function.pyx:1
>     40        src/sage/crypto/mq/sbox.py:1
>     41        src/sage/crypto/mq/sr.py:1
>     42        src/sage/databases/findstat.py:2
>     43        src/sage/data_structures/bounded_integer_sequences.pyx:1
>     44        src/sage/doctest/control.py:1
>     45        src/sage/doctest/parsing.py:1
>     46        src/sage/doctest/sources.py:1
>     47        src/sage/doctest/util.py:2
>     48        src/sage/dynamics/flat_surfaces/strata.py:2
>     49        src/sage/dynamics/interval_exchanges/labelled.py:2
>     50        src/sage/dynamics/interval_exchanges/reduced.py:2
>     51        src/sage/ext/fast_eval.pyx:1
>     52        src/sage/finance/markov_multifractal.py:1
>     53        src/sage/finance/stock.py:1
>     54        src/sage/finance/time_series.pyx:1
>     55        src/sage/games/sudoku.py:1
>     56        src/sage/geometry/cone.py:2
>     57        src/sage/geometry/fan.py:1
>     58        src/sage/geometry/hyperplane_arrangement/arrangement.py:1
>     59        src/sage/geometry/linear_expression.py:1
>     60        src/sage/geometry/point_collection.pyx:1
>     61        src/sage/geometry/polyhedron/base.py:1
>     62        src/sage/geometry/polyhedron/face.py:1
>     63        src/sage/geometry/polyhedron/representation.py:1
>     64        src/sage/geometry/toric_lattice_element.pyx:1
>     65        src/sage/geometry/toric_lattice.py:1
>     66        src/sage/geometry/triangulation/element.py:1
>     67        src/sage/groups/abelian_gps/element_base.py:1
>     68        src/sage/groups/affine_gps/group_element.py:1
>     69        src/sage/groups/class_function.py:2
>     70        src/sage/groups/conjugacy_classes.py:1
>     71        src/sage/groups/matrix_gps/finitely_generated.py:2
>     72        src/sage/groups/matrix_gps/matrix_group.py:1
>     73        src/sage/groups/pari_group.py:1
>     74        src/sage/groups/perm_gps/cubegroup.py:1
>     75        src/sage/groups/perm_gps/permgroup_named.py:1
>     76        src/sage/groups/perm_gps/permgroup.py:2
>     77        src/sage/groups/perm_gps/symgp_conjugacy_class.py:1
>     78        src/sage/interfaces/axiom.py:1
>     79        src/sage/interfaces/giac.py:1
>     80        src/sage/interfaces/interface.py:2
>     81        src/sage/interfaces/lisp.py:1
>     82        src/sage/interfaces/maple.py:1
>     83        src/sage/interfaces/mathematica.py:1
>     84        src/sage/interfaces/maxima_abstract.py:1
>     85        src/sage/interfaces/r.py:2
>     86        src/sage/libs/coxeter3/coxeter_group.py:1
>     87        src/sage/libs/singular/function.pyx:1
>     88        src/sage/libs/singular/groebner_strategy.pyx:2
>     89        src/sage/libs/singular/ring.pyx:1
>     90        src/sage/misc/constant_function.pyx:1
>     91        src/sage/misc/fast_methods.pyx:3
>     92        src/sage/misc/lazy_import.pyx:1
>     93        src/sage/misc/unknown.py:1
>     94        src/sage/misc/weak_dict.pyx:7
>     95        src/sage/modular/abvar/abvar.py:1
>     96        src/sage/modular/abvar/finite_subgroup.py:1
>     97        src/sage/modular/abvar/homology.py:2
>     98        src/sage/modular/abvar/lseries.py:2
>     99        src/sage/modular/abvar/torsion_point.py:1
>    100        src/sage/modular/abvar/torsion_subgroup.py:1
>    101        src/sage/modular/arithgroup/arithgroup_generic.py:1
>    102        src/sage/modular/arithgroup/arithgroup_perm.py:1
>    103        src/sage/modular/arithgroup/congroup_gammaH.py:1
>    104        src/sage/modular/arithgroup/congroup_gamma.py:1
>    105        src/sage/modular/arithgroup/congroup_generic.py:1
>    106        src/sage/modular/arithgroup/farey_symbol.pyx:1
>    107        src/sage/modular/btquotients/btquotient.py:3
>    108        src/sage/modular/btquotients/pautomorphicform.py:4
>    109        src/sage/modular/cusps_nf.py:2
>    110        src/sage/modular/cusps.py:2
>    111        src/sage/modular/etaproducts.py:2
>    112        src/sage/modular/hecke/algebra.py:2
>    113        src/sage/modular/hecke/hecke_operator.py:2
>    114        src/sage/modular/hecke/module.py:2
>    115        src/sage/modular/hecke/submodule.py:1
>    116        src/sage/modular/local_comp/smoothchar.py:2
>    117        src/sage/modular/modform/find_generators.py:1
>    118        src/sage/modular/modform/numerical.py:1
>    119        src/sage/modular/modform/space.py:1
>    120        src/sage/modular/modsym/ambient.py:1
>    121        src/sage/modular/modsym/boundary.py:1
>    122        src/sage/modular/modsym/element.py:1
>    123        src/sage/modular/modsym/g1list.py:1
>    124        src/sage/modular/modsym/ghlist.py:1
>    125        src/sage/modular/modsym/manin_symbol_list.py:1
>    126        src/sage/modular/modsym/modular_symbols.py:1
>    127        src/sage/modular/modsym/p1list_nf.py:2
>    128        src/sage/modular/modsym/p1list.pyx:1
>    129        src/sage/modular/modsym/space.py:1
>    130        src/sage/modular/overconvergent/genus0.py:2
>    131        src/sage/modular/overconvergent/weightspace.py:1
>    132        src/sage/modular/pollack_stevens/modsym.py:1
>    133        src/sage/modular/pollack_stevens/padic_lseries.py:1
>    134        src/sage/modular/pollack_stevens/sigma0.py:1
>    135        src/sage/modular/quatalg/brandt.py:2
>    136        src/sage/modular/ssmod/ssmod.py:1
>    137        src/sage/modules/fg_pid/fgp_element.py:1
>    138        src/sage/modules/filtered_vector_space.py:1
>    139        src/sage/modules/free_module.py:2
>    140        src/sage/modules/free_quadratic_module.py:2
>    141        src/sage/modules/module.pyx:2
>    142        src/sage/modules/multi_filtered_vector_space.py:1
>    143        src/sage/modules/quotient_module.py:1
>    144        src/sage/monoids/free_monoid_element.py:2
>    145        src/sage/monoids/free_monoid.py:1
>    146        src/sage/monoids/string_monoid_element.py:1
>    147        src/sage/monoids/string_monoid.py:5
>    148        src/sage/numerical/knapsack.py:1
>    149        src/sage/numerical/linear_functions.pyx:1
>    150        src/sage/numerical/linear_tensor_element.pyx:1
>    151        src/sage/quadratic_forms/binary_qf.py:1
>    152        src/sage/quadratic_forms/quadratic_form.py:1
>    153        src/sage/rings/algebraic_closure_finite_field.py:2
>    154
> src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py:1
>    155        src/sage/rings/complex_field.py:1
>    156        src/sage/rings/complex_interval_field.py:1
>    157        src/sage/rings/continued_fraction.py:3
>    158        src/sage/rings/finite_rings/element_ext_pari.py:1
>    159        src/sage/rings/finite_rings/integer_mod_ring.py:1
>    160        src/sage/rings/finite_rings/residue_field.pyx:1
>    161        src/sage/rings/fraction_field.py:1
>    162        src/sage/rings/function_field/function_field_ideal.py:1
>    163        src/sage/rings/ideal_monoid.py:1
>    164        src/sage/rings/ideal.py:2
>    165        src/sage/rings/infinity.py:3
>    166        src/sage/rings/invariant_theory.py:2
>    167        src/sage/rings/laurent_series_ring.py:1
>    168        src/sage/rings/morphism.pyx:4
>    169        src/sage/rings/multi_power_series_ring.py:1
>    170        src/sage/rings/noncommutative_ideals.pyx:1
>    171        src/sage/rings/number_field/galois_group.py:1
>    172        src/sage/rings/number_field/number_field_element.pyx:1
>    173        src/sage/rings/number_field/number_field_ideal.py:1
>    174        src/sage/rings/number_field/number_field_ideal_rel.py:1
>    175        src/sage/rings/number_field/number_field.py:1
>    176        src/sage/rings/number_field/order.py:1
>    177        src/sage/rings/padics/padic_extension_generic.py:1
>    178        src/sage/rings/padics/padic_generic.py:1
>    179        src/sage/rings/padics/padic_printing.pyx:1
>    180        src/sage/rings/padics/pow_computer_flint.pyx:1
>    181        src/sage/rings/padics/pow_computer.pyx:1
>    182        src/sage/rings/pari_ring.py:1
>    183        src/sage/rings/polynomial/infinite_polynomial_element.py:2
>    184        src/sage/rings/polynomial/infinite_polynomial_ring.py:2
>    185        src/sage/rings/polynomial/laurent_polynomial_ring.py:1
>    186        src/sage/rings/polynomial/multi_polynomial_element.py:1
>    187        src/sage/rings/polynomial/multi_polynomial_ideal.py:1
>    188        src/sage/rings/polynomial/multi_polynomial_ring.py:1
>    189        src/sage/rings/polynomial/pbori.pyx:1
>    190        src/sage/rings/polynomial/polydict.pyx:1
>    191        src/sage/rings/polynomial/polynomial_quotient_ring_element.py:1
>    192        src/sage/rings/polynomial/polynomial_quotient_ring.py:1
>    193        src/sage/rings/polynomial/polynomial_ring.py:1
>    194        src/sage/rings/polynomial/symmetric_reduction.pyx:1
>    195        src/sage/rings/power_series_ring.py:1
>    196        src/sage/rings/qqbar.py:3
>    197        src/sage/rings/quotient_ring_element.py:1
>    198        src/sage/rings/quotient_ring.py:1
>    199        src/sage/rings/real_double.pyx:1
>    200        src/sage/rings/real_mpfi.pyx:1
>    201        src/sage/rings/real_mpfr.pyx:1
>    202        src/sage/schemes/affine/affine_space.py:1
>    203        src/sage/schemes/elliptic_curves/ell_point.py:2
>    204        src/sage/schemes/elliptic_curves/ell_tate_curve.py:1
>    205        src/sage/schemes/elliptic_curves/ell_torsion.py:1
>    206        src/sage/schemes/elliptic_curves/formal_group.py:1
>    207        src/sage/schemes/elliptic_curves/heegner.py:3
>    208        src/sage/schemes/elliptic_curves/isogeny_class.py:1
>    209        src/sage/schemes/elliptic_curves/kodaira_symbol.py:1
>    210        src/sage/schemes/elliptic_curves/modular_parametrization.py:1
>    211        src/sage/schemes/elliptic_curves/padic_lseries.py:1
>    212        src/sage/schemes/elliptic_curves/period_lattice.py:1
>    213        src/sage/schemes/elliptic_curves/period_lattice_region.pyx:1
>    214        src/sage/schemes/elliptic_curves/sha_tate.py:1
>    215        src/sage/schemes/elliptic_curves/weierstrass_morphism.py:1
>    216        src/sage/schemes/generic/algebraic_scheme.py:1
>    217        src/sage/schemes/generic/ambient_space.py:1
>    218        src/sage/schemes/generic/divisor_group.py:1
>    219        src/sage/schemes/generic/point.py:1
>    220        src/sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py:1
>    221        src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py:1
>    222        src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py:2
>    223        src/sage/schemes/jacobians/abstract_jacobian.py:1
>    224        src/sage/schemes/product_projective/point.py:1
>    225        src/sage/schemes/product_projective/space.py:1
>    226        src/sage/schemes/projective/projective_space.py:1
>    227        src/sage/schemes/toric/sheaf/klyachko.py:1
>    228        src/sage/schemes/toric/variety.py:1
>    229        src/sage/sets/disjoint_set.pyx:1
>    230        src/sage/sets/real_set.py:2
>    231        src/sage/sets/set.py:6
>    232        src/sage/sets/totally_ordered_finite_set.py:1
>    233        src/sage/stats/hmm/chmm.pyx:2
>    234        src/sage/stats/hmm/distributions.pyx:1
>    235        src/sage/stats/hmm/hmm.pyx:1
>    236        src/sage/stats/intlist.pyx:1
>    237        src/sage/structure/element.pyx:1
>    238        src/sage/structure/factorization.py:1
>    239        src/sage/structure/formal_sum.py:1
>    240        src/sage/structure/generators.pyx:2
>    241        src/sage/structure/unique_representation.py:2
>    242        src/sage/symbolic/assumptions.py:1
>    243        src/sage/symbolic/callable.py:1
>    244        src/sage/symbolic/function.pyx:1
>    245        src/sage/symbolic/ring.pyx:1
>    246        src/sage/symbolic/subring.py:1
>    247        src/sage/symbolic/units.py:1
>    248        src/sage/tensor/modules/free_module_morphism.py:1
>    249        src/sage/tests/stl_vector.pyx:1
> 
> 
> -leif
> 
> 
> >> * leif <not.rea...@online.de> [2016-08-14 15:41:51]:
> >>
> >>> leif wrote:
> >>>> VulK wrote:
> >>>>> Getting rid of __cmp__ would be the cleaner way but a simple grep on
> >>>>> $SAGE_ROOT/src gives 915 occurrences of __cmp__, 624 of which are
> >>>>> definitions.
> >>>
> >>> ?  I'm getting 339 definitions in 249 files.  (That's for 7.3.beta9, but
> >>> shouldn't differ that much.)
> >>>
> >>>
> >>> -leif
> >>>
> >>>>> Is there any way we can automate the process?
> >>>>> S.
> >>>>
> >>>> I have to admit I fail to see the problem (perhaps Frédéric could
> >>>> elaborate a bit more).
> >>>>
> >>>> Deprecate cmp() and all __cmp__ methods (probably step by step), and
> >>>> temporarily (re)implement cmp() in Python3.  Am I missing something?
> >>>>
> >>>>
> >>>> Deprecating the methods could certainly be automated, but I doubt it's
> >>>> worth the effort (at least to /fully/ automate that).
> >>>>
> >>>>
> >>>> -leif
> >>>>
> >>>>
> >>>>> * Frédéric Chapoton <fchapot...@gmail.com> [2016-08-14 05:41:01]:
> >>>>>
> >>>>>>    As an intermediate step in our long way to python3, I would like to 
> >>>>>> be
> >>>>>>    able to compile all the .pyx files in py3.
> >>>>>>    Except for #21246 (please review), the big remaining problem 
> >>>>>> preventing
> >>>>>>    to reach this goal is the removal of the builtin "cmp" in py3.
> >>>>>>    One solution would be to have our own "cmp" that would boil down to 
> >>>>>> py2
> >>>>>>    cmp in py2 and to something (but what ?) in py3.
> >>>>>>    Otherwise, one will have to get rid by hand of all the `__cmp__`
> >>>>>>    methods everywhere, that will become obsolete in python3.
> >>>>>>    Please step in and talk out loud if you have a good strategy for 
> >>>>>> this
> >>>>>>    problem.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to