[issue26091] decimal.Decimal(0)**0 throws decimal.InvalidOperation

2016-01-12 Thread Stefan Krah
New submission from Stefan Krah: http://speleotrove.com/decimal/daops.html#refpower -- nosy: +skrah resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue25878] CPython on Windows builds with /W3, not /W4

2016-01-16 Thread Stefan Krah
Stefan Krah added the comment: Could you explain warning #4232 in the case of libmpdec? I thought all files are compiled and linked together. Why is the function imported? -- nosy: +skrah ___ Python tracker <http://bugs.python.org/issue25

[issue25878] CPython on Windows builds with /W3, not /W4

2016-01-16 Thread Stefan Krah
Stefan Krah added the comment: Ah, thanks! I guess this Visual Studio behavior is not compatible with the C-standard, but indeed there are no function pointer comparisons in libmpdec. -- ___ Python tracker <http://bugs.python.org/issue25

[issue25878] CPython on Windows builds with /W3, not /W4

2016-01-17 Thread Stefan Krah
Stefan Krah added the comment: I would expect linking to behave "as if" the abstract machine defined by the standard were executing the code. We already had one function pointer equality issue due to COMDAT folding, so I agree that we should leave the

[issue26138] Disable /W4 warning (non-standard dllimport behavior)

2016-01-17 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: skrah priority: normal severity: normal status: open title: Disable /W4 warning (non-standard dllimport behavior) ___ Python tracker <http://bugs.python.org/issue26

[issue26139] libmpdec: disable /W4 warning (non-standard dllimport behavior)

2016-01-17 Thread Stefan Krah
New submission from Stefan Krah: See: #25878 -- assignee: skrah components: Extension Modules messages: 258461 nosy: skrah priority: normal severity: normal status: open title: libmpdec: disable /W4 warning (non-standard dllimport behavior) type: compile error versions: Python 3.6

[issue26138] Disable /W4 warning (non-standard dllimport behavior)

2016-01-17 Thread Stefan Krah
Changes by Stefan Krah : -- resolution: -> duplicate stage: -> resolved status: open -> closed type: -> compile error ___ Python tracker <http://bugs.python

[issue26139] libmpdec: disable /W4 warning (non-standard dllimport behavior)

2016-01-17 Thread Stefan Krah
Changes by Stefan Krah : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue26139> ___

[issue25878] CPython on Windows builds with /W3, not /W4

2016-01-17 Thread Stefan Krah
Stefan Krah added the comment: Pragma added for libmpdec in #26139. -- ___ Python tracker <http://bugs.python.org/issue25878> ___ ___ Python-bugs-list mailin

[issue26139] libmpdec: disable /W4 warning (non-standard dllimport behavior)

2016-01-18 Thread Stefan Krah
Stefan Krah added the comment: This is *exactly* what I want. As the sole author of libmpdec I *know* that the broken dllimport behavior cannot affect anything in memory.c, since there are no function pointer comparisons. Please stop educating us

[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-20 Thread Stefan Krah
Stefan Krah added the comment: 1) Feedback whether the compiler used on FreeBSD recognizes FENV_ACCESS. 2) If not, an indication why the man page mentions it. -- ___ Python tracker <http://bugs.python.org/issue24

[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-20 Thread Stefan Krah
Stefan Krah added the comment: Thanks, then the patch looks good to me. -- ___ Python tracker <http://bugs.python.org/issue24520> ___ ___ Python-bugs-list mailin

[issue26178] Python C-API: __all__ Creator

2016-01-22 Thread Stefan Krah
Stefan Krah added the comment: I agree, and that's pretty much what Guido said here, too: https://mail.python.org/pipermail/python-dev/2001-February/012591.html -- nosy: +skrah ___ Python tracker <http://bugs.python.org/is

[issue26208] decimal C module's exceptions don't match the Python version

2016-01-26 Thread Stefan Krah
Stefan Krah added the comment: Yes, ideally the exceptions should be in sync. I don't find the list of signals entirely uninteresting, but implementing it in _pydecimal would require #8613 to be solved, which is unlikely to happen. In _decimal the exceptions come directly from libmpdec,

[issue26208] decimal C module's exceptions don't match the Python version

2016-01-26 Thread Stefan Krah
Changes by Stefan Krah : -- stage: -> needs patch type: -> enhancement versions: +Python 3.6 ___ Python tracker <http://bugs.python.org/issue26208> ___ ___

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-01-27 Thread Stefan Krah
Stefan Krah added the comment: The spec was the only reasonable choice at the time decimal.py was written. Incidentally, it is basically IEEE-754-2008 with arbitrary precision extensions; this isn't surprising since Mike Cowlishaw was on the IEEE committee and wrote the spec at the same

[issue26256] Fast decimalisation and conversion to other bases

2016-02-02 Thread Stefan Krah
Stefan Krah added the comment: Jurjen, this is very nice! -- Like Mark, I'm not sure if this should be in CPython. Decimal (Python >= 3.3) has sneaked in a couple of fast bignum algorithms, so calculating and converting the latest Mersenne prime takes a couple of seconds: from decima

[issue26256] Fast decimalisation and conversion to other bases

2016-02-03 Thread Stefan Krah
Stefan Krah added the comment: On Wed, Feb 03, 2016 at 09:51:53AM +, STINNER Victor wrote: > Well, nowhere means: > https://docs.python.org/dev/whatsnew/3.3.html#decimal Okay, but hardly anyone reads that, and I can't blame them. :) For example, if I use something like Lua, I w

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: In my experience it is very hard to get stable benchmark results with Python. Even long running benchmarks on an empty machine vary: wget http://www.bytereef.org/software/mpdecimal/benchmarks/telco.py wget http://speleotrove.com/decimal/expon180-1e6b.zip unzip

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: I've cut off the highest result in the previous message: Control totals: Actual ['1004737.58', '57628.30', '25042.17'] Expected ['1004737.58', '57628.30', '25042.17&#x

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: Core 1 fluctuates even more (My machine only has 2 cores): $ taskset -c 1 ./python telco.py full Control totals: Actual ['1004737.58', '57628.30', '25042.17'] Expected ['1004737.58', '57628.30', '2

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: > STINNER Victor added the comment: > I modified Stefan's telco.py to remove all I/O from the hot code: the > benchmark is now really CPU-bound. I also modified telco.py to run the > benchmark 5 times. One run takes around 2.6 seconds. > Nic

[issue26284] FIx telco benchmark

2016-02-04 Thread Stefan Krah
New submission from Stefan Krah: The telco benchmark is unstable. It needs some of Victor's changes from #26275 and probably a larger data set: http://speleotrove.com/decimal/expon180-1e6b.zip is too big for _pydecimal, but the one that is used is probably too small for _de

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: It's instructive to run ./python Modules/_decimal/tests/bench.py (Hit Ctrl-C after the first cdecimal result, 5 repetitions or so). fastint2.patch speeds up floats enormously and slows down decimal by 6%. fastint_alt.patch slows down float *and* decimal (5%

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: I've never seen 20% fluctuation in that benchmark between runs. The benchmark is very stable if you take the average of 10 runs. -- ___ Python tracker <http://bugs.python.org/is

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: I mean, if you run the benchmark 10 times and the unpatched result is always between 11.3 and 12.0 for floats while the patched result is between 12.3 and 12.9, for me the situation is clear. -- ___ Python tracker

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: I thought this was the usual telco benchmark instability, but with the patch _decimal *does* seem to be faster in other areas, too. -- ___ Python tracker <http://bugs.python.org/issue26

[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-06 Thread Stefan Krah
Stefan Krah added the comment: Additionally, "single digit will always fit a double"? -- nosy: +skrah ___ Python tracker <http://bugs.python.o

[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-06 Thread Stefan Krah
Stefan Krah added the comment: Sorry, I was a bit brief: The current comment says "decimal" instead of "double". It should be changed to "double". -- ___ Python tracker <

[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-07 Thread Stefan Krah
Stefan Krah added the comment: The comment looks good to me -- I'll stay out of the benchmarking issue, I didn't check any of that. :) -- ___ Python tracker <http://bugs.python.o

[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-07 Thread Stefan Krah
Stefan Krah added the comment: Well I *did* run the decimal/float milli-benchmark now and it shows at least 15% improvement for floats consistently. Given that the official benchmark suite does not seem to be very stable either (#21955), I actually prefer small and well-understood benchmarks

[issue26284] FIx telco benchmark

2016-02-07 Thread Stefan Krah
Stefan Krah added the comment: Unfortunately, replacing io.BytesIO(data) with indexing does not make the benchmark faster or more stable on my machine. BTW, string conversion of the result is actually a crucial part of the benchmark, it was taken out in http://bugs.python.org/file41802

[issue26284] Fix telco benchmark

2016-02-07 Thread Stefan Krah
Changes by Stefan Krah : -- title: FIx telco benchmark -> Fix telco benchmark ___ Python tracker <http://bugs.python.org/issue26284> ___ ___ Python-bugs-lis

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-07 Thread Stefan Krah
Stefan Krah added the comment: #26288 brought a great speedup for floats. With fastint5_4.patch *on top of #26288* I see no improvement for floats and a big slowdown for _decimal. -- ___ Python tracker <http://bugs.python.org/issue21

[issue26200] SETREF adds unnecessary work in some cases

2016-02-11 Thread Stefan Krah
Stefan Krah added the comment: As Serhiy mentioned, I'm really happy with the Py_SETREF() macro and I understand the reasons why it was applied so broadly. But if a module maintainer prefers not to change existing (and correct) code, then that should have priority (also, the existing ve

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-13 Thread Stefan Krah
Stefan Krah added the comment: I like the feature for literals, but I'm not sure about conversions from string. It slows down the conversion for (IMO) a very small benefit. Other languages allow it, but I've never attempted to use the feature: $ ocaml OCaml vers

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-13 Thread Stefan Krah
Stefan Krah added the comment: If the string conversions stay, may I suggest two functions: 1) PyUnicode_NumericAsAscii() 2) PyUnicode_NumericAsAsciiWS() The first one eliminates only underscores, the second one both underscores and leading/trailing whitespace. Decimal must support both

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-13 Thread Stefan Krah
Stefan Krah added the comment: Correction: The explanation of the functions should be reversed. -- ___ Python tracker <http://bugs.python.org/issue26331> ___ ___

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-13 Thread Stefan Krah
Stefan Krah added the comment: > Georg Brandl added the comment: > > Thanks, I hadn't looked at cdecimal yet - I was planning to ask you to do the > necessary changes there :) Oh, well. :) > But there are a few versions of this (e.g. converting unicode digits to

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-13 Thread Stefan Krah
Stefan Krah added the comment: I still wonder about the complexity of all this for decimal. We now have two grammars on top of each other, this being the actual one for decimal: http://speleotrove.com/decimal/daconvs.html For string conversions I'd prefer a lax way (similar to OCaml)

[issue26416] Deprecate the regex_v8, telco, and spectral_norm benchmarks

2016-02-23 Thread Stefan Krah
Stefan Krah added the comment: Telco is a real world workload devised by Mike Cowlishaw. Some fixes need to me made for the version in the benchmark suite; in particular, the amount of input seems insufficient for _decimal (#26284). I'm not a fan of weeding out real world benchmarks unti

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-23 Thread Stefan Krah
Changes by Stefan Krah : -- dependencies: +Fix telco benchmark ___ Python tracker <http://bugs.python.org/issue26275> ___ ___ Python-bugs-list mailing list Unsub

[issue20305] Android's incomplete locale.h implementation prevents cross-compilation

2016-03-20 Thread Stefan Krah
Stefan Krah added the comment: Thank you, this is excellent! Does that mean that all locale patches are no longer needed? Here is one left (perhaps accidentally): https://github.com/yan12125/python3-android/blob/cpython-hg/mk/ncurses/android-locale-fixes.patch

[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Stefan Krah
Stefan Krah added the comment: Thanks, the test was not needed: It was more of a reminder to sync the version numbers. -- ___ Python tracker <http://bugs.python.org/issue26

[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Stefan Krah
Changes by Stefan Krah : -- assignee: -> skrah resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker <http://bugs.pyt

[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Stefan Krah
Stefan Krah added the comment: I did: Somehow roundup failed to catch it. -- ___ Python tracker <http://bugs.python.org/issue26621> ___ ___ Python-bugs-list mailin

[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Stefan Krah
Stefan Krah added the comment: The roundup timeline is a lie. :) I pushed the 3.5 patch shortly after the 3.6 one and well before msg262302. -- ___ Python tracker <http://bugs.python.org/issue26

[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Stefan Krah
Changes by Stefan Krah : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue26621> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2016-04-01 Thread Stefan Krah
Stefan Krah added the comment: is_integer() is very important for writing new functions. libmpdec has it and it's used a lot inside mpdecimal.c. In this case though I assume Robert needs it for duck typing. -- ___ Python tracker

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2016-04-03 Thread Stefan Krah
Stefan Krah added the comment: I've been thinking about this, and I'm +1 for the change now. These structural typing issues for numbers come up regularly (see also msg257088), and the functions are so simple and self-explanatory that API-complexity does not really increase. In

[issue25974] Fix statistics.py after the Decimal.as_integer_ratio() change

2016-04-03 Thread Stefan Krah
Stefan Krah added the comment: Ping. Just a reminder that it would be nice to get this into 3.6-alpha-1. :) -- ___ Python tracker <http://bugs.python.org/issue25

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2016-04-04 Thread Stefan Krah
Stefan Krah added the comment: I agree that Robert's "absurdity" argument was unfortunate and could be reversed: Many people would consider an (10).is_integer() method absurd. I'm also only moderately interested in OOP or classification in general, but we *do* have a n

[issue25928] Add Decimal.as_integer_ratio()

2016-04-05 Thread Stefan Krah
Stefan Krah added the comment: Raymond, you added your support in msg257097. I'm not very happy to spend my time implementing the feature and then rehashing everything after 3 months. -- nosy: +gvanrossum ___ Python tracker <http://bugs.py

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2016-04-05 Thread Stefan Krah
Stefan Krah added the comment: On Tue, Apr 05, 2016 at 01:10:25PM +, Robert Smallshire wrote: > Were float to inherit from Rational, rather than Real ... This would break the Liskov substitution principle. -- ___ Python tracker &l

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2016-04-05 Thread Stefan Krah
Stefan Krah added the comment: On Tue, Apr 05, 2016 at 02:20:19PM +, Robert Smallshire wrote: > >> Were float to inherit from Rational, rather than Real ... > > > This would break the Liskov substitution principle. > > How so? Rational extends Real with only nu

[issue26723] Add an option to skip _decimal module

2016-04-09 Thread Stefan Krah
Stefan Krah added the comment: I thought you solved the locale problem in #20305. So it still does not build? -- nosy: +skrah ___ Python tracker <http://bugs.python.org/issue26

[issue26723] Add an option to skip _decimal module

2016-04-09 Thread Stefan Krah
Stefan Krah added the comment: In any case: It is not uncommon that some C module does not build. You can disable modules in setup.py: # This global variable is used to hold the list of modules to be disabled. disabled_module_list = [] -- assignee: -> skrah resolut

[issue20210] Provide configure options to enable/disable Python modules and extensions

2016-04-10 Thread Stefan Krah
Stefan Krah added the comment: Normally I hate environment variables, but perhaps in this case PYTHON_DISABLE_MODULES="foo,bar,quux" would be sufficient? Setup.py already has the "disabled_module_list" variable, it's just a matter of setting this variable somehow. Thi

[issue26746] struct.pack(): trailing padding bytes on x64

2016-04-13 Thread Stefan Krah
New submission from Stefan Krah: On the x64 architecture gcc adds trailing padding bytes after the last struct member. NumPy does the same: >>> import numpy as np >>> >>> t = np.dtype([('x', 'u1'), ('y', 'u8'), ('z

[issue3132] implement PEP 3118 struct changes

2016-04-13 Thread Stefan Krah
Stefan Krah added the comment: Here's a grammar that roughly describes the subset that NumPy supports. As for implementing this in the struct module: There is a new data description language on the horizon: http://datashape.readthedocs.org/en/latest/ It does not have all the low-

[issue3132] implement PEP 3118 struct changes

2016-04-13 Thread Stefan Krah
Changes by Stefan Krah : -- versions: +Python 3.6 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue3132> ___ ___ Python-bugs-list mailing list Unsub

[issue26746] struct.pack(): trailing padding bytes on x64

2016-04-13 Thread Stefan Krah
Stefan Krah added the comment: Thank you. So technically, in the above NumPy example the format string generated by NumPy would be considered incomplete if we assume struct syntax: >>> m = memoryview(x) >>> m.format 'T{B:x:xxxL:y:B:z:}' I find this "0L&q

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-04-13 Thread Stefan Krah
Stefan Krah added the comment: LTO is not stable on all platforms (according to doko), and people don't want to wait for PGO to build when they just run ./configure && make. --with-pgo and --with-lto is fine. -- ___ Python t

[issue26359] CPython build options for out-of-the box performance

2016-04-14 Thread Stefan Krah
Stefan Krah added the comment: Not acceptable, I'm afraid. See #25702. I'm not sure why it is considered so bothersome to type --with-pgo and --with-lto for the rare case of a real production build. -- ___ Python tracker <http://bu

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-04-14 Thread Stefan Krah
Stefan Krah added the comment: On Thu, Apr 14, 2016 at 08:39:20AM +, Alecsandru Patrascu wrote: > @Stefan and @Marc, you say that people don't want to wait for PGO to build > when running ./configure && make, but why? Even though many developers use > it, this mo

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-04-14 Thread Stefan Krah
Stefan Krah added the comment: On Thu, Apr 14, 2016 at 08:55:25AM +, Stefan Krah wrote: > I use it all the time in development: ... where "it" refers to "./configure && make", not to PGO. -- ___ Python tracker <

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-15 Thread Stefan Krah
Stefan Krah added the comment: An option would be to use the support of the probably commercial http://www.windriver.com/products/linux/ and ask them why they're still on Python 2.7.3. They'll also have gcc installed and can run the test case proposed in this issue. -- no

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-15 Thread Stefan Krah
Stefan Krah added the comment: Also, I don't understand how the test suite could pass with these kinds of errors. Are you sure this is the Wind-River system Python? Did they run the test suite? -- ___ Python tracker <http://bugs.py

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-15 Thread Stefan Krah
Stefan Krah added the comment: My conclusion is: The error in msg263292 should have been caught by the test suite. I'd ask the WindRiver support if they actually run the test suite before shipping the binaries. -- ___ Python tracker

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-04-22 Thread Stefan Krah
Stefan Krah added the comment: #14757 has an implementation of inline caching, which at least seemed to slow down some use cases. Then again, whenever someone posts a new speedup suggestion, it seems to slow down things I'm working on. At least Case van Horsen independently verifie

[issue20305] Android's incomplete locale.h implementation prevents cross-compilation

2016-04-25 Thread Stefan Krah
Stefan Krah added the comment: Thank you, closing this. -- resolution: -> out of date stage: -> resolved status: open -> closed versions: +Python 3.6 -Python 3.4 ___ Python tracker <http://bugs.python.or

[issue17905] Add check for locale.h

2016-04-25 Thread Stefan Krah
Stefan Krah added the comment: Okay, closing as a duplicate (the second patch here that checks for locale.h seems too broad to me since it's a standard header). -- nosy: +skrah resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Int

[issue17905] Add check for locale.h

2016-04-25 Thread Stefan Krah
Stefan Krah added the comment: I think all locale includes are unguarded now. -- ___ Python tracker <http://bugs.python.org/issue17905> ___ ___ Python-bugs-list m

[issue26846] Workaround for non-standard stdlib.h on Android

2016-04-25 Thread Stefan Krah
New submission from Stefan Krah: Android's stdlib.h pollutes the namespace by including a memory.h header. -- assignee: skrah components: Build messages: 264199 nosy: skrah, xdegaye priority: normal severity: normal status: open title: Workaround for non-standard stdlib.h on An

[issue26846] Workaround for non-standard stdlib.h on Android

2016-04-25 Thread Stefan Krah
Changes by Stefan Krah : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue26846> ___

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2016-04-25 Thread Stefan Krah
Stefan Krah added the comment: We don't support Android officially yet, but I think until #8610 is resolved something must be done here. -- ___ Python tracker <http://bugs.python.org/is

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2016-04-25 Thread Stefan Krah
Changes by Stefan Krah : -- assignee: -> skrah components: +Build -Cross-Build nosy: +skrah resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6 -Python 3.4, Python 3.5 ___ Python tracker <http://

[issue26723] Add an option to skip _decimal module

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: After #26846 _decimal builds on Android. -- resolution: rejected -> fixed superseder: -> Workaround for non-standard stdlib.h on Android ___ Python tracker <http://bugs.python.org/i

[issue26846] Workaround for non-standard stdlib.h on Android

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: > Maybe issue #26723 can be closed now as well ? I think it was already closed, but I added a link to this issue now. -- ___ Python tracker <http://bugs.python.org/issu

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: Okay, for the record: I think that returning "None" would probably be more correct than the empty string, but I don't think users actually care to the point that they will introduce a case split in their applications. Realistically, probably no

[issue26839] python always calls getrandom() at start, causing long hang after boot

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: Hmm. Why does os.urandom(), which should explicitly not block, use a blocking getrandom() function? This is quite unexpected on Linux. -- nosy: +skrah ___ Python tracker <http://bugs.python.org/issue26

[issue26839] python always calls getrandom() at start, causing long hang after boot

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: Wow, it's by design: " os.urandom(n) Return a string of n random bytes suitable for cryptographic use." ``man urandom'': "A read from the /dev/urandom device will not block waiting for more entropy. As a result, if t

[issue26839] Python 3.5 running in a virtual machine with Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: It is clear how /dev/urandom works. I just think that securing enough entropy on startup should be done by the init scripts (if systemd still allows that :) and not by an application. [Unless the application is gpg or similar

[issue26839] Python 3.5 running in a virtual machine with Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: I did not claim that it magically creates entropy. -- Many VMs are throwaway test beds. It would be annoying to setup some entropy gathering mechanism just so that Python starts. -- ___ Python tracker <h

[issue26857] gethostbyname_r() is broken on android

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: Thanks, fixed. -- assignee: -> skrah nosy: +skrah resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python

[issue26854] missing header on android for the ossaudiodev module

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: Thanks! -- assignee: -> skrah nosy: +skrah resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python

[issue26863] android lacks some declarations for the posix module

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: Thanks again! -- assignee: -> skrah nosy: +skrah resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python

[issue26862] SYS_getdents64 does not need to be defined on android API 21

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: @shiz: Can we settle on API level 21 or is there any reason to leave this in? -- nosy: +skrah ___ Python tracker <http://bugs.python.org/issue26

[issue26854] missing header on android for the ossaudiodev module

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: Since Android is the only known system with an odd include path, I prefer the short patch. In general, let's try to keep patches as short as possible (which Xavier is already doing). -- ___ Python tracker

[issue26853] missing symbols in curses and readline modules on android

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: Do you need libtinfow? It seems that it's not supported in setup.py, and getting even libtinfo support into some Linux distributions took quite a while. -- nosy: +skrah ___ Python tracker <http://bugs.py

[issue26853] missing symbols in curses and readline modules on android

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: IOW, on Linux tinfo should work fine in combination with ncursesw. -- ___ Python tracker <http://bugs.python.org/issue26

[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: It seems that Android is the only known platform that deviates from /bin/sh. So perhaps we should simply set a variable to either /bin/sh or /system/bin/sh rather than waiting for #16353 to settle. -- nosy: +skrah versions: +Python 3.6 -Python 3.4

[issue26871] Change weird behavior of PyModule_AddObject()

2016-04-27 Thread Stefan Krah
Stefan Krah added the comment: I think the current behavior is good for error handling by goto, which is common for module initialization. Please don't change this. -- nosy: +skrah ___ Python tracker <http://bugs.python.org/is

[issue26871] Change weird behavior of PyModule_AddObject()

2016-04-27 Thread Stefan Krah
Stefan Krah added the comment: Your definition of correctness is very odd. The "leaks" you are talking about are single references in case of a module initialization failure, in which case you are likely to have much bigger problems. Please take _decimal out of this patch, it's

[issue26871] Change weird behavior of PyModule_AddObject()

2016-04-27 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue26871> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26871] Change weird behavior of PyModule_AddObject()

2016-04-27 Thread Stefan Krah
Stefan Krah added the comment: It seems that the patch also introduces a segfault if PyLong_FromSsize_t() returns NULL. -- nosy: +skrah ___ Python tracker <http://bugs.python.org/issue26

[issue26871] Change weird behavior of PyModule_AddObject()

2016-04-29 Thread Stefan Krah
Stefan Krah added the comment: Serhiy, I'm sorry that I overreacted here. You're doing great work for Python -- we just happen to disagree on this one particular issue. I think there were some proponents on python-dev, perhaps they'll show up and disc

[issue26975] Decimal.from_float works incorrectly for non-binary floats

2016-05-08 Thread Stefan Krah
Stefan Krah added the comment: It seems to work correctly here for non-binary floats: >>> from _pydecimal import Decimal >>> Decimal.from_float(Decimal("1.2")) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python

[issue26975] Decimal.from_float works incorrectly for non-binary floats

2016-05-08 Thread Stefan Krah
Stefan Krah added the comment: As Mark hinted at, many people would say there is no issue at all. Subclassing like that often breaks the Liskov Substitution Principle. For more information, see e.g.: http://okmij.org/ftp/Computation/Subtyping/ "Alas, LSP when considered from an OOP

[issue26857] gethostbyname_r() is broken on android

2016-05-11 Thread Stefan Krah
Stefan Krah added the comment: How about supporting API >= 23 only? Can people upgrade their devices or do they have to buy a new one? -- nosy: +Chi Hsuan Yen ___ Python tracker <http://bugs.python.org/issu

<    28   29   30   31   32   33   34   >