Stefan Krah added the comment:
Jeff Robbins wrote:
> I'm happy to try another build of apsw, but am not up-to-speed with how to
> get development copies of Python. As a user, I typically download the
> latest Windows .msi file and install it. If you can point me to a documen
Stefan Krah added the comment:
> The fix solved my apsw build problem.
Thanks for testing. As for the test failure, that could be really
anything. Often these kinds of failures turn out to be overly strict
assumptions in the test suite. Best ask the maintainer of the
package.
So 3.3
Stefan Krah added the comment:
This occurs quite frequently now. In the latest build four bots
show this error.
http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%20Shared%203.x/builds/5605/steps/test/logs/stdio
http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%209.0
Stefan Krah added the comment:
I agree that caching the hash would be useful for 3.2, but the
request comes at a unfortunate time: 3.2.3 is about to be released,
and there's no way that the change would go into it.
So let's focus on the C version in 3.3. These are the timings o
Stefan Krah added the comment:
> but hashing will be faster.
I retract that. The exponent actually makes things worse.
--
___
Python tracker
<http://bugs.python.org/issu
Stefan Krah added the comment:
Just in case you missed it: The Windows buildbots fail to compile
14abfa27ff19:
http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%203.x
--
nosy: +skrah
___
Python tracker
<http://bugs.python.
Stefan Krah added the comment:
On 64-bit Linux with gcc-4.4 I get:
Unpatched:
$ ./python -m timeit -s 'import codecs; d = codecs.utf_16_be_decode; x = (" " *
1000).encode("utf-16be")' 'd(x)'
10 loops, best of 3: 4.1 usec per loop
$
Stefan Krah added the comment:
Running test_http_cookiejar and test_urllib2 in succession always
fails here. The same thing occurs when running test_urllib2
twice:
$ ./python -m test test_http_cookiejar test_urllib2
[1/2] test_http_cookiejar
[2/2] test_urllib2
test test_urllib2 failed
Stefan Krah added the comment:
It isn't implemented at all. The Python version also always returns 96,
irrespective of the coefficient length. Well, arguably the coefficient
is a separate object in the Python version:
96
>>> sys.getsizeof(d._int)
212
For the C version I'l
Stefan Krah added the comment:
In full:
>>> d =
>>> Decimal(1)
>>>
>>> sys.getsizeof(d)
Stefan Behnel added the comment:
FWIW, Cython keeps the exception state in the generator struct and that works
nicely.
Note that Amaury is right in that extensions use tstate->exc_value and friends.
Cython does so quite extensively, for example. I don't see any use in changing
t
Stefan Krah added the comment:
Mark Dickinson wrote:
> In the C version of decimal, do distinct Decimal objects ever share
> coefficients?
The coefficients are members of the mpd_t struct (libmpdec data type),
and they are not exposed as Python objects or shared.
Cache local
Stefan Behnel added the comment:
I can't speak for much outside of Cython, and Cython generated modules would
best be regenerated with a newer Cython version anyway in order to work with
Py3.3. I'm not sure that's currently required, though.
As long as there is a way to acce
Stefan Krah added the comment:
Thanks for the explanations. The new __sizeof__() method should now
report the exact memory usage.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python track
Stefan Krah added the comment:
I think it would be a good idea to fix this in the Python version
for the other implementations.
--
___
Python tracker
<http://bugs.python.org/issue14
Stefan Krah added the comment:
I changed the C version to cache the hash as well: For the submitted
test case the speedup is only 5x, but hashing times vary greatly
depending of the size of the coefficient and the exponent.
BTW, the tests already call both hash() and __hash__() on the same
Stefan Krah added the comment:
The patch for the Python version looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue14478>
___
___
Python-bug
Stefan Behnel added the comment:
Done.
--
___
Python tracker
<http://bugs.python.org/issue14098>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
How about silencing the AssertionError until a better solution
is found? The patch works here.
--
keywords: +patch
Added file: http://bugs.python.org/file25173/issue14341.diff
___
Python tracker
<h
Stefan Behnel added the comment:
>> As long as there is a way to access these fields directly from the
>> struct (with the usual preprocessor conditional), I don't think Cython
>> will actually start to use the PyErr_[GS]etExcInfo() functions in
>> CPython - s
New submission from Stefan Krah :
In the build --without-threads, catching an ImportError in support.py
fails. Fedora buildbot:
http://www.python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/1986/steps/test/logs/stdio
./python ./Tools/scripts/run_tests.py -j 1
Stefan Krah added the comment:
The SystemError has changed to a KeyError:
http://www.python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/2004/steps/test/logs/stdio
At least that makes it easy to spot the location in import.c. The
shortest way to reproduce
New submission from Stefan Behnel :
Up to the early Py3.3 developer versions, calling __import__() with a level of
-1 worked as in Python 2, i.e. it tried a relative import first and then a
global import.
This no longer seems to be available after the importlib rewrite (e.g. as of
rev
New submission from Stefan Behnel :
The imp.load_dynamic() function is used by third party code (e.g. Cython's
pyximport) but is not currently documented.
http://docs.python.org/dev/library/imp.html
The latest changes to the import mechanism suggest that it should better be
document
Stefan Behnel added the comment:
It turns out that it wasn't all that hard to work around. Calling __import__
twice seems to do the trick. It's more overhead, but if people want speed, they
can just be explicit about what kind of import they actually mean.
So I wouldn't mind c
Stefan Behnel added the comment:
> Yeah, the fix is dead-simple, import with level=1 and if that fails import
> with level=0.
With one caveat: relative imports don't work outside of packages, so the
importing code has to know when it's in a package or not. Otherwise, the
relat
Stefan Behnel added the comment:
Hmm, interesting - it stripped the command from my e-mail. I was doing this:
>>> __import__("sys", level=1)
Traceback (most recent call last):
File "", line 1, in
SystemError: error
Stefan Krah added the comment:
Sorry for the bikeshedding here, but I'll read those function names a
lot. Is it possible to rename Vectorcall, which looks good on its own
but not inside _PyObject_VectorcallDict()?
_PyObject_FastCallDict is much easier to read.
Has the PEP been accepte
Stefan Krah added the comment:
> You think that "_PyObject_FastCallDict" is easier to read than
> "_PyObject_VectorcallDict"? I don't think that there is much difference.
Marvellous. How much do you work with the C-API?
--
___
Stefan Krah added the comment:
It is one thing to name something __vectorcall, and quite another to mix camel
and normal case.
When I'm scanning the code very quickly, I initially parse
_PyObject_VectorcallDict as PyObject_VectorallDict or_PyObject_Vector_callDict.
>From the per
Change by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<https://bugs.python.org/issue36970>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<https://bugs.python.org/issue36970>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Only people with very much time on their hands have the luxury to discuss
changes like this on python-dev.
--
___
Python tracker
<https://bugs.python.org/issue36
Stefan Krah added the comment:
Also, thank you for lecturing a core dev again.
--
nosy: +skrah
___
Python tracker
<https://bugs.python.org/issue36970>
___
___
Stefan Behnel added the comment:
Asking users unconditionally to use the "xmlcharrefreplace" replacement method
seems wrong for UTF-8. It should not be necessary.
We should, however, document explicitly that the file will receive text and not
bytes, i.e. that users are
Stefan Behnel added the comment:
New changeset 5ac0b988fd5f1428efe35329c531c7b5c74d37f6 by Stefan Behnel
(Windson yang) in branch 'master':
bpo-18911: clarify that the minidom XML writer receives texts but not bytes
(GH-13352)
https://github.com/python/cpyt
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6
___
Python tracker
<https://bugs.python.or
Change by Stefan Behnel :
--
resolution: fixed ->
stage: resolved -> backport needed
status: closed -> open
versions: +Python 3.7
___
Python tracker
<https://bugs.python.or
Stefan Behnel added the comment:
New changeset 18e23f227be59241cbb1eeb6d6669771dd7275fb by Stefan Behnel (Miss
Islington (bot)) in branch '3.7':
bpo-18911: clarify that the minidom XML writer receives texts but not bytes
(GH-13718)
https://github.com/python/cpyt
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Stefan Krah added the comment:
The managed buffer can be shared:
>>> b = b'12345'
>>> m1 = memoryview(b)
>>> m2 = memoryview(m1)
>>> gc.get_referents(m1)[0]
>>> gc.get_referents(m2)[0]
And I understood that Dino proposed to sh
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Stefan Krah added the comment:
On Sun, Jun 02, 2019 at 02:38:21AM +, Inada Naoki wrote:
> What instance means? code object? co_code?
> Anyway, Dino didn't propose such thing. He only proposed accepting buffer
> object for code constructor.
> He didn't describe ho
Stefan Krah added the comment:
720MB <= "3-4 dozen" * 20 MB <= 960MB. Per server.
It has all been said. :-)
I don't understand the objections about alignment. malloc() and obmalloc()
are at least 8-byte aligned, mmap() with NULL as the first para
Stefan Krah added the comment:
There's no point discussing unless people develop reading skills.
--
___
Python tracker
<https://bugs.python.org/is
Change by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<https://bugs.python.org/issue36839>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Thank you for the detailed report. So, in an attempt to summarize,
this is the crucial passage:
>>> ideal_exp = -1
>>> exp = -29
>>> coeff = 15
>>> division_counter = 0
>>> while exp &
Stefan Krah added the comment:
There are lots of ideas still. :)
As I said, on a Linux other than RedHat or Debian or such I'd first try
to blame the shipped Python, then the libc (I had a glibc memmove issue
once with similar inexplicable results).
Alpine Linux apparently uses musl
Stefan Krah added the comment:
Yes, I'd try Debian first, then potential libc issues can also be eliminated in
a single experiment.
--
___
Python tracker
<https://bugs.python.org/is
Stefan Krah added the comment:
New changeset 0690c79c419b8d2bdfe7c5b6dca57b018f5a5a54 by Stefan Krah (Eric
Wieser) in branch 'master':
bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13881)
https://github.com/python/cpython/commit/0690c79c419b8d2bdfe7c5b6dca57b
Stefan Krah added the comment:
New changeset 8f0bbbdcae73f275faff90cc4559f616f001 by Stefan Krah (Miss
Islington (bot)) in branch '3.7':
bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (GH-13881) (#13882)
https://github.com/python/cpyt
Stefan Krah added the comment:
Thanks for the fix!
3.7/3.8 are done, 2.7 still needs a manual backport.
--
versions: -Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue37
Change by Stefan Krah :
--
stage: patch review -> backport needed
___
Python tracker
<https://bugs.python.org/issue37188>
___
___
Python-bugs-list mai
Stefan Krah added the comment:
New changeset 48f190f79cd89f7ad4409b3c782e462368583309 by Stefan Krah (Eric
Wieser) in branch '2.7':
[2.7] bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13906)
https://github.com/python/cpython/commit/48f190f79cd89f7ad4409b3c782e46
Stefan Krah added the comment:
New changeset 3d03a35ba0f162a350898100efc95fdf392070a2 by Stefan Krah (Miss
Islington (bot)) in branch '3.8':
[3.8] bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13911)
https://github.com/python/cpyt
Change by Stefan Krah :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Stefan Behnel added the comment:
Note that PyCode_New() is not the only change in 3.8 beta1 that breaks Cython
generated code. The renaming of "tp_print" to "tp_vectorcall" is equally
disruptive, because Cython has (or had) a work-around for CPython
(mis-)behaviour
Stefan Behnel added the comment:
> they can equally easily zero out the entire structure and ignore it without
> changing behavior on any Python 3.x.
Any solution that we apply in Cython will require users to regenerate their .c
sources with a new Cython version in order to make it c
Stefan Behnel added the comment:
(I forgot to state the obvious third option, which is: don't do anything and
leave everything as it is now in beta-1.)
--
___
Python tracker
<https://bugs.python.org/is
Stefan Behnel added the comment:
I agree with Steve that broadly redefining a global name in a widely used
header file is not a good idea. You never know what names users have in their
code. Yes, you can work around it by undef-ing it again, but honestly, in that
case, both sides are hacks
Stefan Behnel added the comment:
Thank you, Petr, for bringing this discussion back on a solid basis, actually
twice already.
And sorry for causing this problem in the first place. The "tp_print = 0" was
necessary to fix misbehaviour in Py2, and we should have restricted it to
Stefan Behnel added the comment:
I'm really only waiting for bpo-37250 to be resolved, then I can prepare a new
point release of Cython, preferably this week.
--
___
Python tracker
<https://bugs.python.org/is
Stefan Behnel added the comment:
I think it might be this call that strikes here:
https://github.com/python/cpython/commit/43851a202c#diff-f3b827d6e1d5c270ab42bc2c0523c1d2R2842
treebuilder_flush_data() is not made for concatenating text, it simply replaces
it. If both text parts come
Stefan Behnel added the comment:
I'm working on a patch. It's not entirely trivial, so it might take a couple of
days.
--
assignee: -> scoder
___
Python tracker
<https://bugs.pytho
Stefan Behnel added the comment:
> Is it part of Cython 0.29.11 released yesterday?
Yes.
--
___
Python tracker
<https://bugs.python.org/issue37221>
___
_
Stefan Krah added the comment:
The motivation for this PR is "it would be convenient to have this function".
This is probably true, but generally I would not change 47 files at once.
Most of the locations are probably not performance sensitive.
--
no
Stefan Krah added the comment:
It adds yet another special case underscore function that one cannot use in
external projects. So I would not say that is simpler.
Has there been any performance measurement at all?
--
___
Python tracker
<ht
Stefan Krah added the comment:
> Or do you care about *using* API with underscore? If so, I'm OK to stop
> changing some callers which are not tightly coupled with Python.
I care about this one. Indeed I think underscore functions should be used in
strategic places insi
Stefan Behnel added the comment:
> it should not be rely upon
IMHO, the correct behaviour under coverage analysis is to keep the code and not
discard it. After all, it is code that exists, and that is not being executed,
so it should count as uncovered code. The fact that some Pyt
Stefan Behnel added the comment:
No need to keep this bug open on CPython side. The backwards compatibility has
been restored (and I'll release Cython 0.29.12 today to resolve the issue on
that side.)
--
resolution: -> fixed
status: open -
Change by Stefan Behnel :
--
keywords: +patch
pull_requests: +14646
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14856
___
Python tracker
<https://bugs.python.org/issu
Change by Stefan Behnel :
--
pull_requests: +14654
pull_request: https://github.com/python/cpython/pull/14867
___
Python tracker
<https://bugs.python.org/issue34
Stefan Behnel added the comment:
I created a PR that adds a couple of paragraphs to the documentation. Comments
welcome.
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue34
Stefan Behnel added the comment:
> Changing the major version number itself is a breaking change
So is the proposed change, in a way. At some point, there will be a 4.0
release, which may or may not break the code in question. So, testing for
"version_info[0] == 3" is already w
Stefan Krah added the comment:
Is it available with -std=c11? It is a bit strange that we use -std=c99. I
thought that header is C11:
https://en.cppreference.com/w/c/atomic
--
nosy: +skrah
___
Python tracker
<https://bugs.python.org/issue37
Stefan Behnel added the comment:
New changeset c6cb4cdd21c0c3a09b0617dbfaa7053d3bfa6def by Stefan Behnel in
branch 'master':
bpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856)
https://github.com/python/cpython/commit/c6cb4cdd21c0c3a09b0617dbfaa705
Stefan Behnel added the comment:
New changeset a3697db0102b9b6747fe36009e42f9b08f0c1ea8 by Stefan Behnel in
branch 'master':
bpo-34160: explain how to deal with attribute order in ElementTree (GH-14867)
https://github.com/python/cpython/commit/a3697db0102b9b6747fe36009e42f9
Change by Stefan Behnel :
--
pull_requests: +14709
pull_request: https://github.com/python/cpython/pull/14936
___
Python tracker
<https://bugs.python.org/issue37
Stefan Behnel added the comment:
New changeset 63673916464bace8e2147357395fdf3497967ecb by Stefan Behnel (Miss
Islington (bot)) in branch '3.8':
[3.8] bpo-34160: explain how to deal with attribute order in ElementTree
(GH-14867) (GH-14935)
https://github.com/python/cpyt
Stefan Behnel added the comment:
New changeset bb697899aa65d90488af1950ac7cceeb3877d409 by Stefan Behnel in
branch '3.8':
[3.8] bpo-37399: Correctly attach tail text to the last element/comment/pi
(GH-14856) (GH-14936)
https://github.com/python/cpyt
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Stefan Sullivan added the comment:
This seems like it directly contradicts the documentation for the discover
method:
"If a package (a directory containing a file named __init__.py) is found, the
package will be checked for a load_tests function. If this exists then it will
be c
Stefan Krah added the comment:
Why would one not abort() in release mode? If the cast is inexact, the results
will usually be so wrong that even on a web server a hard exit is preferable.
I don't think the check costs much time with branch prediction.
--
nosy: +
Change by Stefan Behnel :
--
pull_requests: +14929
pull_request: https://github.com/python/cpython/pull/15200
___
Python tracker
<https://bugs.python.org/issue14
Stefan Behnel added the comment:
The spec section that Raymond quoted makes it clear that pretty printing is not
for everyone. But there are many use cases where it is 1) helpful, 2) leads to
correct results, and 3) does not grow the file size excessively. Whoever wants
to make use of it is
Stefan Behnel added the comment:
FWIW, deep traversing an XML tree on an operation as simple as "==" seems
excessive. To me, object identity comparison seems the most sensible behaviour
of "==" on Element objects.
(It's not "complicated to implement",
Stefan Behnel added the comment:
Right. If you want to compare XML trees for equality, either write your own
deep-tree comparison function, or use something like doctestcompare, or use a
C14N serialisation (which is now part of Py3.8). Whichever suits your needs.
https://github.com/lxml
Stefan Behnel added the comment:
FWIW, makes total sense to me to have it there. Question is more if we can
still get it into Py3.8, since it's a new feature for fractions.
--
nosy: +lukasz.langa, scoder
___
Python tracker
&
Stefan Krah added the comment:
Out of curiosity:
Is the 3.2 documentation clearer?
https://docs.python.org/3.2/c-api/arg.html#strings-and-buffers
Lately we have a lot of churn in the docs, not necessarily written by subject
experts
Stefan Krah added the comment:
Okay thanks, it's good to hear what others think about the docs.
> So I have no clue why "y#" is refusing such an object.
"y#" is refusing memoryview(bytes) because "y#" only allows objects without a
releasebufferproc and
Stefan Behnel added the comment:
Can the PR be applied then? It looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue29464>
___
___
Python-bug
Stefan Behnel added the comment:
Sorry for not responding, missed the message, it seems.
Cython has to support old-style relative imports also in Py3 because that's how
the user code was originally written, using Py2-style syntax and semantics.
Most Cython code has not been converted t
Stefan Krah added the comment:
icc on Linux has always worked exactly as gcc, except that -fp-model=strict
needs to be specified.
I can't test on Windows -- I don't seem to get MSVC licences any more.
--
___
Python tracker
<http://bu
Stefan Krah added the comment:
I think I'll wait until #29464 is committed and the API is considered frozen
(see msg295176?).
--
___
Python tracker
<http://bugs.python.org/is
Changes by Stefan Krah :
--
nosy: +lemburg
priority: normal -> low
type: -> enhancement
versions: +Python 3.7
___
Python tracker
<http://bugs.python.org/i
Stefan Behnel added the comment:
For future reference, this change is supported by Cython 0.26 (which is
currently close to release).
--
___
Python tracker
<http://bugs.python.org/issue29
Stefan Behnel added the comment:
> Are all uses of internal CPython details optional?
Well, what classifies as a "CPython detail" sometimes just becomes clear when
other implementations don't have it. ;-)
But yes, the C code that Cython generates selects alternative impleme
Stefan Krah added the comment:
It's a useful warning, but I find it annoying to add 20 "fall through"
comments. I may add a pragma at some point.
--
___
Python tracker
<http://bugs.pyt
Changes by Stefan Krah :
--
pull_requests: +2764
___
Python tracker
<http://bugs.python.org/issue30923>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
New changeset 72b543308ee3087e3fa247981f5cb4be1138c515 by Stefan Krah in branch
'master':
bpo-30923: Suppress fall-through warnings in libmpdec. (#2698)
https://github.com/python/cpython/commit/72b543308ee3087e3fa247981f5cb4
1501 - 1600 of 4949 matches
Mail list logo