Opened 5 years ago

Closed 5 years ago

#21553 closed enhancement (fixed)

Blacklist PARI's allocatemem method in auto_gen

Reported by: defeo Owned by:
Priority: minor Milestone: sage-7.4
Component: interfaces Keywords: pari
Cc: jdemeyer Merged in:
Authors: Luca De Feo Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: 7175800 (Commits, GitHub, GitLab) Commit: 71758002ba61458c8c7b5dd38985d3a113d1d91e
Dependencies: Stopgaps:

Status badges

Description (last modified by defeo)

The gp function allocatemem is automatically attached to the gen type in the PARI interface. This permits the following code

sage: pari('10^8').allocatemem()

However, there is also hand-written support for it in PariInstance, which has saner syntax and better messaging:

sage: pari.allocatemem(10^8)
PARI stack size set to 100000000 bytes, maximum size set to 2598215680

As suggested in #20241, this ticket forbids the first syntax, only leaving the second option.

Change History (8)

comment:1 Changed 5 years ago by defeo

  • Branch set to u/defeo/blacklist_pari_s_allocatemem_method_in_auto_gen

comment:2 Changed 5 years ago by defeo

  • Authors set to Luca De Feo
  • Branch u/defeo/blacklist_pari_s_allocatemem_method_in_auto_gen deleted
  • Cc jdemeyer added
  • Component changed from PLEASE CHANGE to interfaces
  • Description modified (diff)
  • Keywords pari added
  • Priority changed from major to minor
  • Status changed from new to needs_review
  • Type changed from PLEASE CHANGE to enhancement

comment:3 Changed 5 years ago by defeo

  • Branch set to u/defeo/blacklist_pari_s_allocatemem_method_in_auto_gen

comment:4 follow-up: Changed 5 years ago by jdemeyer

  • Commit set to 388c3b7715d9e3d10738d957b29f1ed237568e9c
  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to needs_work

Hmm, I think we should add a deprecation instead...


New commits:

388c3b7Blacklisted PARI/gp allocatemem function.

comment:5 Changed 5 years ago by git

  • Commit changed from 388c3b7715d9e3d10738d957b29f1ed237568e9c to 71758002ba61458c8c7b5dd38985d3a113d1d91e

Branch pushed to git repo; I updated commit sha1. New commits:

7175800Added deprecation for allocatemem

comment:6 in reply to: ↑ 4 Changed 5 years ago by defeo

  • Status changed from needs_work to needs_review

Replying to jdemeyer:

Hmm, I think we should add a deprecation instead...

Sure.

comment:7 Changed 5 years ago by jdemeyer

  • Status changed from needs_review to positive_review

comment:8 Changed 5 years ago by vbraun

  • Branch changed from u/defeo/blacklist_pari_s_allocatemem_method_in_auto_gen to 71758002ba61458c8c7b5dd38985d3a113d1d91e
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.