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
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
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
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
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
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
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
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
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-
Changes by Stefan Krah :
--
versions: +Python 3.6 -Python 3.3
___
Python tracker
<http://bugs.python.org/issue3132>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
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
<
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
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
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
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
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
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
Stefan Krah added the comment:
I think all locale includes are unguarded now.
--
___
Python tracker
<http://bugs.python.org/issue17905>
___
___
Python-bugs-list m
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
Changes by Stefan Krah :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue26846>
___
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
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://
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
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
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
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
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
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
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
Stefan Krah added the comment:
Thanks, fixed.
--
assignee: -> skrah
nosy: +skrah
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python
Stefan Krah added the comment:
Thanks!
--
assignee: -> skrah
nosy: +skrah
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python
Stefan Krah added the comment:
Thanks again!
--
assignee: -> skrah
nosy: +skrah
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python
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
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
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
Stefan Krah added the comment:
IOW, on Linux tinfo should work fine in combination with ncursesw.
--
___
Python tracker
<http://bugs.python.org/issue26
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
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
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
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue26871>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
New submission from Stefan Forstenlechner:
If input is called right away after applying a single job to
multiprocessing.Pool or submitting concurrent.futures.ProcessPoolExecutor then
the processes are not started. If multiple jobs are submitted everything works
fine.
This only seems to be a
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
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
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
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
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue26839>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: +skrah
versions: +Python 3.5, Python 3.6 -Python 3.4
___
Python tracker
<http://bugs.python.org/issue1222585>
___
___
Python-bug
Stefan Krah added the comment:
Thanks, Georg! The decimal parts look good to me. I understand that
people wonder about the relaxed rules for Decimal -- we have discussed
that here:
https://mail.python.org/pipermail/python-dev/2016-March/143557.html
I don't think that it will be a pr
Stefan Krah added the comment:
I can only comment on the Windows 10 issue: I think I did the install
with "Right-click -> Run as administrator" and then installed for
all users. Encodings, pip and everything else works here.
--
Stefan Krah added the comment:
Okay thanks, let's assume api-level >= 21 for now. I've moved the include into
pyport.h in order to save a little space everywhere. Could you check if that
works?
--
Added file: http://bugs.python.org/file42944/is
Stefan Krah added the comment:
Thanks! Closing again.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Stefan Krah added the comment:
I've also opened a feature request here:
https://code.google.com/p/android/issues/detail?id=210812
--
___
Python tracker
<http://bugs.python.org/is
Changes by Stefan Behnel :
--
nosy: +scoder
___
Python tracker
<http://bugs.python.org/issue23507>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
> c) constantly working at making the latest and greatest Android-friendly
But that is precisely what "Android support", should it be added, means:
It does take constant work (and build slaves) to support a platform.
Unrelatedly, regarding the local
Stefan Krah added the comment:
But NDK bugs are reported to the same bug tracker, aren't they?
--
___
Python tracker
<http://bugs.python.org/issue23496>
___
___
Stefan Krah added the comment:
BTW, PEP 11 now demands a stable buildbot for official platform support
(IMO a very sane policy).
--
___
Python tracker
<http://bugs.python.org/issue23
Stefan Krah added the comment:
> I wouldn't know if they're reported to the same bug tracker...it's possible
> they aren't.
Well, why don't you try? :)
> Additionally it's possible that the lack of locale support in libc isn't
> considered a
Stefan Krah added the comment:
Fine, I'm also optimizing and the "fix" isn't going into libmpdec.
Android can use the Python version of decimal.
--
___
Python tracker
<http://bug
Stefan Krah added the comment:
+1. I think the flags should go into CFLAGS_NODIST.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue23545>
___
___
Stefan Krah added the comment:
Consider the libmpdec part rejected. It is too much work given that
external libmpdecs need to be compatible and Android can use the Python
version of decimal.
--
nosy: +skrah
___
Python tracker
<h
Stefan Krah added the comment:
I agree that "obj" would be nicer. On the other hand we explicitly
test for "object" in the tests, help(memoryview) says "object" and pypy
accepts "object".
Also, I think there may be other instances in the tree wher
Stefan Krah added the comment:
> ImportError: cannot import name 'module_from_spec'
The command line uses the system python3, which is "too old"
and does not have 'module_from_spec' yet.
Try running ...
python3 -S -m sysconfig --generate-posix-vars
... an
Stefan Krah added the comment:
Cross compiling worked for a while in 3.4. It broke again
because we don't have a buildbot for that.
You should not need 20 args for ./configure. At least on
Ubuntu the script from #5404 generally works, but indeed
pgen, importlib and the above issue are curr
Stefan Krah added the comment:
On Ubuntu, when I uploaded the script to #5404, I only needed:
./configure --prefix=/tmp/arm-install --without-ensurepip
--host=arm-linux-gnueabi --build=x86_64 --disable-ipv6
(And config.site of course.)
We just have to fix the pgen etc. issues and someone
Stefan Krah added the comment:
Technically we could use the Android buildbot to test both
(cross-compiling and Android breakage), but it would be nice
to have a separate buildbot that just tests cross-compiling
with an easier target (e.g. arm-linux-gnueabi
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue23496>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Multi-dimensional slicing is explicitly mentioned in PEP-3118, so
I guess the intention was to cover this use case as well.
--
___
Python tracker
<http://bugs.python.org/issue23
Stefan Krah added the comment:
To be sure, the PEP contains some odd proposals like "Unpacking a long-double
will return a decimal object", but the one in this issue seems reasonable.
--
___
Python tracker
<http://bugs.python.o
Stefan Krah added the comment:
sub-views and multi-dimensional slicing are not that bad: They're already
implemented in _testbuffer (indeed with intermediate objects though).
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
Yes, to be clear I'm +1 on this specific feature -- and separate issues. :)
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
It turns out that msg237933 was too simplistic: There are some
intricacies of numpy array indexing that *are* very complex:
http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html
In particular, x[::2, 1, ::2] is not necessarily equal to
x[::2][1][::2
Changes by Stefan Krah :
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue23699>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Hmm, at least for the version at
https://mail.python.org/pipermail/python-ideas/2015-March/032564.html
I'm not sure if the optimizer will produce the same
code as for the switch statement. Did you look at
th
Stefan Behnel added the comment:
The problem is, even if the chance is excessively small, it's not zero.
Meaning, someone's data set somewhere will break somehow. And with hash
randomisation, it'll mean that the problem spotted in some life system will be
entirely unrepro
Changes by Stefan Behnel :
--
nosy: +scoder
___
Python tracker
<http://bugs.python.org/issue23642>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
I think there's a behavior change: Before you could gzip non-contiguous
views directly, now that operation raises BufferError.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
Sure:
import gzip
x = memoryview(b'x' * 10)
y = x[::-1]
with gzip.GzipFile("x", 'w') as f:
f.write(y)
--
___
Python tracker
<
Stefan Krah added the comment:
> In a sense, the old behavior was an artefact of silently copying the
> memoryview to bytes.
It likely wasn't intentional, but tobytes() *is* used to serialize
weird arrays to their C-contiguous representation (following the
logical structure of the a
Stefan Krah added the comment:
I just see that non-contiguous arrays didn't work in 2.7 either,
so that was probably the original intention.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Behnel added the comment:
Absolutely. Fractions are all about exact calculations, much more so than
Decimals. So the formatting output should be as accurate as requested or
possible (well, excluding infinity).
--
nosy: +scoder
___
Python
Stefan Krah added the comment:
Decimal formatting intentionally differs from float formatting, see #23460.
--
___
Python tracker
<http://bugs.python.org/issue23
Stefan Krah added the comment:
The zero isn't missing. :) We are following
http://speleotrove.com/decimal/decarith.html, with thousands of test cases.
We could decide to do something special for "g", but there are good reasons
Stefan Behnel added the comment:
But these parameters could also be partly delegated to normal string (not
number) formatting, right?
One of the advantages of not depending on Decimal is, well, to not depend on
Decimal, which is a rather uncommon dependency when using Fractions in an
Stefan Behnel added the comment:
Meaning, something like this should work:
x = (nom * 10**(prec+1)) // den
if x % 10 < 5:
x = x // 10
else:
x = x // 10 + 1
print('%s.%s' % (x[:-prec], x[-prec:]))
--
___
P
Stefan Behnel added the comment:
Or, speaking of "division with remainder":
n, r = divmod(nom * 10**prec, den)
if r * 5 >= den:
n += 1
x = str(n)
print('%s.%s' % (x[:-prec], x[-prec:]))
... minus the usual off-by-one that the t
Stefan Krah added the comment:
Regarding Decimal:
1) The context precision isn't used for formatting. If you have
another reason for proposing the optional context argument for
dec_format(), please open another issue.
2) There's another problem: The mythical Defa
Stefan Krah added the comment:
I just looked at this very briefly: Is the patch context insensitive?
IOW, do things still work if you change the thread-local context:
from decimal import *
c = getcontext()
c.prec = 1
c.Emax = 1
c.Emin = -1
--
nosy: +skrah
Stefan Krah added the comment:
I think we should try to avoid depending on global state in
the stdlib, at least in new code. Also, if something is not
really a decimal computation, Decimal itself tries to ignore
the context (like Decimal.__repr__).
At least I would expect this datetime
Stefan Krah added the comment:
> It wouldn't be too bad if Py and C version of Decimal.__format__ had
> same interface. What do you think?
Let's discuss that in a separate issue.
[DefaultContext]
> I don't understand what do you mean with this. Is this something that
Stefan Behnel added the comment:
> do not add a C-API
what speaks against it?
--
nosy: +scoder
___
Python tracker
<http://bugs.python.org/issue16991>
___
_
Stefan Krah added the comment:
I have a somewhat general concern: In the last year or so, issues seem
to expand far beyond the scope that's indicated by the issue title.
For example, I don't particularly care about the definition of
"bytes-like", but the patch contains ch
Stefan Behnel added the comment:
duplicate of issue 14465
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue23847>
___
___
Python-bugs-list m
Changes by Stefan Krah :
--
assignee: docs@python -> skrah
___
Python tracker
<http://bugs.python.org/issue23756>
___
___
Python-bugs-list mailing list
Un
Changes by Stefan Krah :
--
assignee: -> skrah
___
Python tracker
<http://bugs.python.org/issue23376>
___
___
Python-bugs-list mailing list
Unsubscrib
Stefan Krah added the comment:
If you think that the previous version was "incorrect and misleading",
the bar for changes to be accepted seems pretty high for me.
"grep -r" doesn't seem to find "flattened length" in Doc/*.
"An object that supports the
4701 - 4800 of 4955 matches
Mail list logo