Re: [PATCH] lang/python27 -- Fix namespace collision
On 26/02/2019 12:35 am, dimpase+free...@gmail.com wrote: On 6/20/17 Kubilay Kosak wrote: On 6/19/17 4:31 AM, Steve Kargl wrote: On Sun, Jun 18, 2017 at 11:29:05AM -0700, Steve Kargl wrote: Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle trignometric functions cospi, sinpi, and tanpi. When libm (aka math.h) grows support for sinpi(x), lang/python27 has a namespace collision. The attached patch fixes the problem. Is this issue relevant only for particular (and/or future) FreeBSD versions ('where libm grows supports for x, y') or independent of base entirely? Also, could you open an upstream issue regarding this please, as a long-term target for all local (Python port) patches is that they are included upstream. I've created a Python PR to fix this: https://github.com/python/cpython/pull/12027 Dima This also ensures we can document all patches with their relevant upstream issue/commit references for our future selves and others. ./koobs ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org" Thank you Dima! :) I've added the upstream PR to #232792 [1] and will track upstream progress. [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232792 ./koobs ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: [PATCH] lang/python27 -- Fix namespace collision
On 6/20/17 Kubilay Kosak wrote: > On 6/19/17 4:31 AM, Steve Kargl wrote: > On Sun, Jun 18, 2017 at 11:29:05AM -0700, Steve Kargl wrote: >> Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle >> trignometric functions cospi, sinpi, and tanpi. When libm (aka >> math.h) grows support for sinpi(x), lang/python27 has a namespace >> collision. The attached patch fixes the problem. >> > Is this issue relevant only for particular (and/or future) FreeBSD > versions ('where libm grows supports for x, y') or independent of base > entirely? > Also, could you open an upstream issue regarding this please, as a > long-term target for all local (Python port) patches is that they are > included upstream. I've created a Python PR to fix this: https://github.com/python/cpython/pull/12027 Dima > This also ensures we can document all patches with their relevant > upstream issue/commit references for our future selves and others. > ./koobs ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: [PATCH] lang/python27 -- Fix namespace collision
Le 01/08/2017 à 00:36, Steve Kargl a écrit : > Any chance that the patch will be added to lang/python27? > Is there a PR so that it does not get lost ? -- Mathieu Arnold signature.asc Description: OpenPGP digital signature
Re: [PATCH] lang/python27 -- Fix namespace collision
Any chance that the patch will be added to lang/python27? -- steve On Sun, Jun 18, 2017 at 11:31:12AM -0700, Steve Kargl wrote: > On Sun, Jun 18, 2017 at 11:29:05AM -0700, Steve Kargl wrote: > > Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle > > trignometric functions cospi, sinpi, and tanpi. When libm (aka > > math.h) grows support for sinpi(x), lang/python27 has a namespace > > collision. The attached patch fixes the problem. > > > > Well, that's inconvenient. Seems attachments are stripped. > > --- Modules/mathmodule.c.orig 2017-06-18 11:09:05.938222000 -0700 > +++ Modules/mathmodule.c 2017-06-18 11:09:56.248307000 -0700 > @@ -71,7 +71,7 @@ > static const double sqrtpi = 1.772453850905516027298167483341145182798; > > static double > -sinpi(double x) > +my_sinpi(double x) > { > double y, r; > int n; > @@ -270,7 +270,7 @@ > integer. */ > if (absx > 200.0) { > if (x < 0.0) { > -return 0.0/sinpi(x); > +return 0.0/my_sinpi(x); > } > else { > errno = ERANGE; > @@ -294,7 +294,7 @@ > } > z = z * lanczos_g / y; > if (x < 0.0) { > -r = -pi / sinpi(absx) / absx * exp(y) / lanczos_sum(absx); > +r = -pi / my_sinpi(absx) / absx * exp(y) / lanczos_sum(absx); > r -= z * r; > if (absx < 140.0) { > r /= pow(y, absx - 0.5); > @@ -366,7 +366,7 @@ > (x-0.5)*(log(x+lanczos_g-0.5)-1); > } > else { > -r = log(pi) - log(fabs(sinpi(absx))) - log(absx) - > +r = log(pi) - log(fabs(my_sinpi(absx))) - log(absx) - > (log(lanczos_sum(absx)) - lanczos_g + > (absx-0.5)*(log(absx+lanczos_g-0.5)-1)); > } > > -- > Steve > 20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4 > 20161221 https://www.youtube.com/watch?v=IbCHE-hONow > ___ > freebsd-ports@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org" -- Steve 20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4 20161221 https://www.youtube.com/watch?v=IbCHE-hONow ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: [PATCH] lang/python27 -- Fix namespace collision
On Tue, Jun 20, 2017 at 01:06:28PM +1000, Kubilay Kocak wrote: > On 6/19/17 4:31 AM, Steve Kargl wrote: > > On Sun, Jun 18, 2017 at 11:29:05AM -0700, Steve Kargl wrote: > >> Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle > >> trignometric functions cospi, sinpi, and tanpi. When libm (aka > >> math.h) grows support for sinpi(x), lang/python27 has a namespace > >> collision. The attached patch fixes the problem. > >> > > Is this issue relevant only for particular (and/or future) FreeBSD > versions ('where libm grows supports for x, y') or independent of base > entirely? It will be an issue with a future BSD. It seems to take a long time before any of my libm improvements are committed. At the moment, bde and I are probably the only people with sinpi(x) in our libm. I do, however, anticipate that glibc will get these functions in the future as portions of ISO/IEC TS 18661-4 have already been implemented. > Also, could you open an upstream issue regarding this please, as a > long-term target for all local (Python port) patches is that they are > included upstream. In the 5 minutes that I've searched, I've found https://bugs.python.org/ but there are no instructions on how to submit a bug report. -- Steve 20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4 20161221 https://www.youtube.com/watch?v=IbCHE-hONow ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: [PATCH] lang/python27 -- Fix namespace collision
On 6/19/17 4:31 AM, Steve Kargl wrote: > On Sun, Jun 18, 2017 at 11:29:05AM -0700, Steve Kargl wrote: >> Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle >> trignometric functions cospi, sinpi, and tanpi. When libm (aka >> math.h) grows support for sinpi(x), lang/python27 has a namespace >> collision. The attached patch fixes the problem. >> Hi Steve, Is this issue relevant only for particular (and/or future) FreeBSD versions ('where libm grows supports for x, y') or independent of base entirely? Also, could you open an upstream issue regarding this please, as a long-term target for all local (Python port) patches is that they are included upstream. This also ensures we can document all patches with their relevant upstream issue/commit references for our future selves and others. ./koobs > Well, that's inconvenient. Seems attachments are stripped. > > --- Modules/mathmodule.c.orig 2017-06-18 11:09:05.938222000 -0700 > +++ Modules/mathmodule.c 2017-06-18 11:09:56.248307000 -0700 > @@ -71,7 +71,7 @@ > static const double sqrtpi = 1.772453850905516027298167483341145182798; > > static double > -sinpi(double x) > +my_sinpi(double x) > { > double y, r; > int n; > @@ -270,7 +270,7 @@ > integer. */ > if (absx > 200.0) { > if (x < 0.0) { > -return 0.0/sinpi(x); > +return 0.0/my_sinpi(x); > } > else { > errno = ERANGE; > @@ -294,7 +294,7 @@ > } > z = z * lanczos_g / y; > if (x < 0.0) { > -r = -pi / sinpi(absx) / absx * exp(y) / lanczos_sum(absx); > +r = -pi / my_sinpi(absx) / absx * exp(y) / lanczos_sum(absx); > r -= z * r; > if (absx < 140.0) { > r /= pow(y, absx - 0.5); > @@ -366,7 +366,7 @@ > (x-0.5)*(log(x+lanczos_g-0.5)-1); > } > else { > -r = log(pi) - log(fabs(sinpi(absx))) - log(absx) - > +r = log(pi) - log(fabs(my_sinpi(absx))) - log(absx) - > (log(lanczos_sum(absx)) - lanczos_g + > (absx-0.5)*(log(absx+lanczos_g-0.5)-1)); > } > ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: [PATCH] lang/python27 -- Fix namespace collision
On Sun, Jun 18, 2017 at 11:29:05AM -0700, Steve Kargl wrote: > Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle > trignometric functions cospi, sinpi, and tanpi. When libm (aka > math.h) grows support for sinpi(x), lang/python27 has a namespace > collision. The attached patch fixes the problem. > Well, that's inconvenient. Seems attachments are stripped. --- Modules/mathmodule.c.orig 2017-06-18 11:09:05.938222000 -0700 +++ Modules/mathmodule.c2017-06-18 11:09:56.248307000 -0700 @@ -71,7 +71,7 @@ static const double sqrtpi = 1.772453850905516027298167483341145182798; static double -sinpi(double x) +my_sinpi(double x) { double y, r; int n; @@ -270,7 +270,7 @@ integer. */ if (absx > 200.0) { if (x < 0.0) { -return 0.0/sinpi(x); +return 0.0/my_sinpi(x); } else { errno = ERANGE; @@ -294,7 +294,7 @@ } z = z * lanczos_g / y; if (x < 0.0) { -r = -pi / sinpi(absx) / absx * exp(y) / lanczos_sum(absx); +r = -pi / my_sinpi(absx) / absx * exp(y) / lanczos_sum(absx); r -= z * r; if (absx < 140.0) { r /= pow(y, absx - 0.5); @@ -366,7 +366,7 @@ (x-0.5)*(log(x+lanczos_g-0.5)-1); } else { -r = log(pi) - log(fabs(sinpi(absx))) - log(absx) - +r = log(pi) - log(fabs(my_sinpi(absx))) - log(absx) - (log(lanczos_sum(absx)) - lanczos_g + (absx-0.5)*(log(absx+lanczos_g-0.5)-1)); } -- Steve 20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4 20161221 https://www.youtube.com/watch?v=IbCHE-hONow ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
[PATCH] lang/python27 -- Fix namespace collision
Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle trignometric functions cospi, sinpi, and tanpi. When libm (aka math.h) grows support for sinpi(x), lang/python27 has a namespace collision. The attached patch fixes the problem. -- Steve 20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4 20161221 https://www.youtube.com/watch?v=IbCHE-hONow ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"