Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix m prototype #134

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -38,7 +38,8 @@ jobs:
run: |
make install
make check
pip install sphinx
pip install sphinx >=4.0 cython cysignals
make build
(cd docs && make html)

dist:
Expand Down
10 changes: 9 additions & 1 deletion autogen/ret.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ def return_code(self):
s = " return new_gen({name})\n"
return s.format(name=self.name)

class PariReturnmGEN(PariReturn):
def ctype(self):
return "GEN"
def return_code(self):
s = " {name} = gcopy({name})\n"
s += " return new_gen({name})\n"
return s.format(name=self.name)

class PariReturnInt(PariReturn):
def ctype(self):
return "int"
Expand All @@ -78,7 +86,7 @@ def return_code(self):

pari_ret_types = {
'': PariReturnGEN,
'm': PariReturnGEN,
'm': PariReturnmGEN,
'i': PariReturnInt,
'l': PariReturnLong,
'u': PariReturnULong,
Expand Down
2 changes: 1 addition & 1 deletion cypari2/closure.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Convert Python functions to PARI closures

AUTHORS:

- Jeroen Demeyer (2015-04-10): initial version, :trac:`18052`.
- Jeroen Demeyer (2015-04-10): initial version, :sage-gh-issue:`18052`.

Examples:

Expand Down
20 changes: 10 additions & 10 deletions cypari2/gen.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ AUTHORS:
handling.

- Robert Bradshaw, Jeroen Demeyer, William Stein (2010-08-15):
Upgrade to PARI 2.4.3 (:trac:`9343`)
Upgrade to PARI 2.4.3 (:sage-gh-issue:`9343`)

- Jeroen Demeyer (2011-11-12): rewrite various conversion routines
(:trac:`11611`, :trac:`11854`, :trac:`11952`)
(:sage-gh-issue:`11611`, :sage-gh-issue:`11854`, :sage-gh-issue:`11952`)

- Peter Bruin (2013-11-17): move Pari to a separate file
(:trac:`15185`)
(:sage-gh-issue:`15185`)

- Jeroen Demeyer (2014-02-09): upgrade to PARI 2.7 (:trac:`15767`)
- Jeroen Demeyer (2014-02-09): upgrade to PARI 2.7 (:sage-gh-issue:`15767`)

- Martin von Gagern (2014-12-17): Added some Galois functions (:trac:`17519`)
- Martin von Gagern (2014-12-17): Added some Galois functions (:sage-gh-issue:`17519`)

- Jeroen Demeyer (2015-01-12): upgrade to PARI 2.8 (:trac:`16997`)
- Jeroen Demeyer (2015-01-12): upgrade to PARI 2.8 (:sage-gh-issue:`16997`)

- Jeroen Demeyer (2015-03-17): automatically generate methods from
``pari.desc`` (:trac:`17631` and :trac:`17860`)
``pari.desc`` (:sage-gh-issue:`17631` and :sage-gh-issue:`17860`)

- Kiran Kedlaya (2016-03-23): implement infinity type

- Luca De Feo (2016-09-06): Separate Sage-specific components from
generic C-interface in ``Pari`` (:trac:`20241`)
generic C-interface in ``Pari`` (:sage-gh-issue:`20241`)

- Vincent Delecroix (2017-04-29): Python 3 support and doctest
conversion
Expand Down Expand Up @@ -1618,7 +1618,7 @@ cdef class Gen(Gen_base):

Tests:

Check that :trac:`16127` has been fixed:
Check that :sage-gh-issue:`16127` has been fixed:

>>> pari('1/2') < pari('1/3')
False
Expand Down Expand Up @@ -4041,7 +4041,7 @@ cdef class Gen(Gen_base):
>>> f()
[0, 0, 1.00000000000000]

Variadic closures are supported as well (:trac:`18623`):
Variadic closures are supported as well (:sage-gh-issue:`18623`):

>>> f = pari("(v[..])->length(v)")
>>> f('a', f)
Expand Down
4 changes: 2 additions & 2 deletions cypari2/handle_error.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Handling PARI errors

AUTHORS:

- Peter Bruin (September 2013): initial version (:trac:`9640`)
- Peter Bruin (September 2013): initial version (:sage-gh-issue:`9640`)

- Jeroen Demeyer (January 2015): use ``cb_pari_err_handle`` (:trac:`14894`)
- Jeroen Demeyer (January 2015): use ``cb_pari_err_handle`` (:sage-gh-issue:`14894`)

"""

Expand Down
18 changes: 9 additions & 9 deletions cypari2/pari_instance.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ AUTHORS:
handling.

- Robert Bradshaw, Jeroen Demeyer, William Stein (2010-08-15):
Upgrade to PARI 2.4.3 (:trac:`9343`)
Upgrade to PARI 2.4.3 (:sage-gh-issue:`9343`)

- Jeroen Demeyer (2011-11-12): rewrite various conversion routines
(:trac:`11611`, :trac:`11854`, :trac:`11952`)
(:sage-gh-issue:`11611`, :sage-gh-issue:`11854`, :sage-gh-issue:`11952`)

- Peter Bruin (2013-11-17): split off this file from gen.pyx
(:trac:`15185`)
(:sage-gh-issue:`15185`)

- Jeroen Demeyer (2014-02-09): upgrade to PARI 2.7 (:trac:`15767`)
- Jeroen Demeyer (2014-02-09): upgrade to PARI 2.7 (:sage-gh-issue:`15767`)

- Jeroen Demeyer (2014-09-19): upgrade to PARI 2.8 (:trac:`16997`)
- Jeroen Demeyer (2014-09-19): upgrade to PARI 2.8 (:sage-gh-issue:`16997`)

- Jeroen Demeyer (2015-03-17): automatically generate methods from
``pari.desc`` (:trac:`17631` and :trac:`17860`)
``pari.desc`` (:sage-gh-issue:`17631` and :sage-gh-issue:`17860`)

- Luca De Feo (2016-09-06): Separate Sage-specific components from
generic C-interface in ``Pari`` (:trac:`20241`)
generic C-interface in ``Pari`` (:sage-gh-issue:`20241`)

Examples:

Expand Down Expand Up @@ -226,7 +226,7 @@ Check that the documentation is generated correctly:
'The constant :math:`\\pi` ...'

Check that output from PARI's print command is actually seen by
Python (:trac:`9636`):
Python (:sage-gh-issue:`9636`):

>>> pari('print("test")')
test
Expand Down Expand Up @@ -1049,7 +1049,7 @@ cdef class Pari(Pari_auto):
>>> pari = cypari2.Pari()
>>> pari.init_primes(200000)

We make sure that ticket :trac:`11741` has been fixed:
We make sure that ticket :sage-gh-issue:`11741` has been fixed:

>>> pari.init_primes(2**30)
Traceback (most recent call last):
Expand Down
8 changes: 4 additions & 4 deletions cypari2/paridecl.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ AUTHORS:
- (unknown authors before 2010)

- Robert Bradshaw, Jeroen Demeyer, William Stein (2010-08-15):
Upgrade to PARI 2.4.3 (:trac:`9343`)
Upgrade to PARI 2.4.3 (:sage-gh-issue:`9343`)

- Jeroen Demeyer (2010-08-15): big clean up (:trac:`9898`)
- Jeroen Demeyer (2010-08-15): big clean up (:sage-gh-issue:`9898`)

- Jeroen Demeyer (2014-02-09): upgrade to PARI 2.7 (:trac:`15767`)
- Jeroen Demeyer (2014-02-09): upgrade to PARI 2.7 (:sage-gh-issue:`15767`)

- Jeroen Demeyer (2014-09-19): upgrade to PARI 2.8 (:trac:`16997`)
- Jeroen Demeyer (2014-09-19): upgrade to PARI 2.8 (:sage-gh-issue:`16997`)
"""

#*****************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# If your documentation needs a minimal Sphinx version, state it here.
#
needs_sphinx = '1.6'
needs_sphinx = '4.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down Expand Up @@ -160,6 +160,7 @@

# Links to external resources (copied from Sage)
extlinks = {
'sage-gh-issue': ('https://github.com/sagemath/sage/issues/%s', 'sage github issue #%s'),
'trac': ('https://github.com/sagemath/sage/issues/%s', 'github issue #%s'), # support :trac: for backward compatibility
'issue': ('https://github.com/sagemath/sage/issues/%s', 'github issue #%s'),
'wikipedia': ('https://en.wikipedia.org/wiki/%s', 'Wikipedia article %s'),
Expand All @@ -170,7 +171,6 @@
'mathscinet': ('https://www.ams.org/mathscinet-getitem?mr=%s', 'MathSciNet %s')
}


# Monkey-patch inspect with Cython support
def isfunction(obj):
return hasattr(type(obj), "__code__")
Expand Down
Loading