Stefan Krah added the comment:
I agree, it would be strange to backport now.
--
stage: backport needed ->
versions: +Python 3.7 -Python 3.6
___
Python tracker
<https://bugs.python.org/issu
Stefan Behnel added the comment:
You misunderstood what the code is doing, and the response that you got
indicates that the bug tracker is not the right place to discuss this
misunderstanding. If you want to discuss this further, please ask on the Python
mailing list (python-l...@python.org
New submission from Stefan Vasilev :
import csv
csv.writer(open('./file.csv', 'a', newline='')).writerow(['ID', 0])
If you try to open file.csv with Excel on Windows 10 it says:
The file format and extension of 'file.csv' don't match. T
Stefan Vasilev added the comment:
Ah, I see now. What a coincidence :)
Thank you for explaining that!
--
resolution: not a bug -> works for me
___
Python tracker
<https://bugs.python.org/issu
Stefan Behnel added the comment:
I added this assertion exactly for the purpose of finding this kind of bug. It
means that some code tried to look up an attribute with a live exception set,
which previously could swallow the exception in certain situations, and even if
not, it is always the
Stefan Behnel added the comment:
Nice! Patch looks good to me, minus the usual naming nit-pick.
--
nosy: +scoder
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issue34
Stefan Behnel added the comment:
At least for lxml, attributes were never specified to have a sorted order
(although attribute dicts are sorted on *input*, to give a *predictable* order
as in ET), and the tutorial says: "Attributes are just unordered name-value
pairs".
Howeve
Stefan Krah added the comment:
New changeset 938045f335b52ddb47076e9fbe4229a33b4bd9be by Stefan Krah (Bo
Bayles) in branch 'master':
bpo-34179: Make sure decimal context doesn't affect other tests. (#8376)
https://github.com/python/cpython/commit/938045f335b52ddb47076e9fb
Stefan Krah added the comment:
New changeset 92ce6a64afcebd414def3b80b18b56448792a587 by Stefan Krah (Miss
Islington (bot)) in branch '3.7':
bpo-34179: Make sure decimal context doesn't affect other tests. (GH-8376)
(#8383)
https://github.com/python
Stefan Krah added the comment:
New changeset 9c136700aa1f755fa2ea64594688a0930b716597 by Stefan Krah (Miss
Islington (bot)) in branch '3.6':
bpo-34179: Make sure decimal context doesn't affect other tests. (GH-8376)
(#8384)
https://github.com/python
Stefan Krah added the comment:
Ok, looks fixed to me.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Stefan Behnel added the comment:
>> Commutativity guarantees can be delivered by sorting arguments before
>> summation.
> No thanks -- that's too expensive for such a small payoff.
Since I don't really see people use this on vectors with hundreds of
dimensions, l
Stefan Behnel added the comment:
Agree with Raymond. If the goal is to pass something else, then functions that
want to make use of that "something else" have to be modified anyway, in which
case also changing the call type wouldn't hurt (assuming the new value still
fit
Change by Stefan Behnel :
--
nosy: +scoder
___
Python tracker
<https://bugs.python.org/issue34309>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Behnel added the comment:
a) Probably not something to fix in released versions any more, so increasing
version from 3.5 to 3.8.
b) Regarding shared library unloading and the problems mentioned, I'm also not
sure if there is a way to safely unload transitively imported libraries
New submission from Stefan Otte :
Hello folks!
I didn't realize that you can remove a suffix with the `with_suffix` function
of the `Path` class of `pathlib` and I always used a little utility function
that I wrote.
I wanted to add that functionality (removing of a suffix) and submit
Change by Stefan Otte :
--
keywords: +patch
pull_requests: +8150
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34329>
___
___
Py
Stefan Otte added the comment:
I'm waiting for the CLA to be accepted. I'll get back to you ASAP.
--
___
Python tracker
<https://bugs.python.o
Stefan Otte added the comment:
No problem, I'm just excited to contribute to python (as small as the
contribution might be) :)
--
___
Python tracker
<https://bugs.python.org/is
Change by Stefan Krah :
--
nosy: +skrah
___
Python tracker
<https://bugs.python.org/issue33731>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Behnel added the comment:
FWIW, I can see that Cython is a special case because it can control the source
line mapping and reporting through the C-API. Other code generators might not
be able to do that, e.g. for a DSL or template language that gets translated to
Python code, for
Stefan Behnel added the comment:
> SageMath is the only project that I know which actually installs .pyx sources.
Ah, right. I wrongly remembered that they are automatically included in binary
packages, but that only applies to .py source of Cython compiled Python modules
(which
Stefan Behnel added the comment:
Or, define a new "get_sourcemap()" method that could return additional
metadata, e.g. a line number mapping.
--
___
Python tracker
<https://bugs.python.o
Stefan Behnel added the comment:
Could we maybe make an educated guess based on absmin and absmax whether
scaling is needed or not?
--
nosy: +scoder
___
Python tracker
<https://bugs.python.org/issue34
Stefan Behnel added the comment:
FWIW, a PGO build of Py3.7 is now about 20% *faster* here than my Ubuntu 16/04
system Python 2.7, and for some (probably unrelated) reason, the system Python
3.5 is another 2% faster on my side.
IMHO, the only other thing that seems obvious to try would be
Stefan Behnel added the comment:
FWIW, the C implementation of the sequence encoder uses PySequence_Fast(), so
adding a lower priority instance check that calls the same encoding function
would solve this.
https://github.com/python/cpython/blob/cfa797c0681b7fef47cf93955fd06b54ddd09a7f
Stefan Behnel added the comment:
> Serialization of ElementTree in the stdlib is much slower than in lxml (see
> issue25881). Perhaps it should be implemented in C. But it should be kept
> simple for this.
Should I say it? That's a first class use case for Cython.
> Prett
New submission from Stefan Tjarks :
When writing a docstring for an async function I wrote a doctest for it.
```
async def hello_world():
"""
Will great the world with a friendly hello.
>>> await hello_world()
"hello world"
"&qu
Change by Stefan Behnel :
--
versions: +Python 3.4, Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue33187>
___
___
Python-bug
Stefan Krah added the comment:
PyBUF_RECORDS pulls in PyBUF_STRIDES, which should IMO not be done in a stable
release.
Maybe (PyBUF_CONTIG_RO|PyBUF_FORMAT), but I'm uneasy even about that. The
potential for breakage is huge.
--
___
P
Stefan Behnel added the comment:
The normal way to use ElementTree is to import the ElementTree module from the
xml.etree package. Why do you think that needs to change? And why do you want
to enforce an import of all modules before you even know which of them the
users actually wants
Stefan Behnel added the comment:
I think the best work-around for now is to implement a bit of PEP 489,
including a module create function that always returns the same static module
reference instead of creating a new one after the first call, and a module exec
function that simply returns
Stefan Behnel added the comment:
Well, first of all, it's better than a crash. :)
Secondly, I'm sure NumPy doesn't currently support subinterpreters, just like
most other extension modules. If I'm not mistaken, an interpreter switch can be
detected through the interpre
Stefan Behnel added the comment:
FYI, I've updated Cython's module import checks to include an interpreter
check. This (multi-file) test shows the new behaviour, which is to raise an
ImportError on module creation when it detects a different interpreter than
during the init
Stefan Tjarks added the comment:
Thanks Grant! I expected that I am missing something.
You are right that I could have posted in many places to get help about this.
Before posting I tried to find a doctest for asyncio but my google magic failed
me. At the end I just felt that, at the very
Stefan Behnel added the comment:
Thanks for the report.
Is the place where it crashes always the same?
Could it be that your system is running out of resources, e.g. RAM?
--
nosy: +scoder
___
Python tracker
<https://bugs.python.org/issue34
Stefan Krah added the comment:
The thing is that Python explicitly supports any object as the "message".
I was quite pleased when I discovered that because it provides a way
to include both signals and the condition list in the "message", which can be
used in programs fo
Stefan Krah added the comment:
pypy3 actually took over the terse exceptions, but without the conditions.
They'd also need error codes from libmpdec now.
>>>> huge = Decimal('9' * 99)
>>>> huge.quantize(Decimal('0.1'))
Traceback (most recent
Stefan Krah added the comment:
I'm using "master" in memoryview because of the audio connotation ("the
source from which all copies will be produced"):
https://en.wikipedia.org/wiki/Audio_mastering
The ManagedBufferObject is literally the source from whic
Stefan Behnel added the comment:
There are dedicated handler methods that you can implement: "def comment(self,
comment)" and "def pi(self, target, data)". Both (c)ElementTree and lxml
support those.
I think the "target" argument to the parser is a bit unde
Change by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<https://bugs.python.org/issue34605>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
I commented here to explain the master <-> view terminology of memoryview.
If anyone wants to change that, please open a separate issue and add me as
the author to the nosy list.
--
___
Python tracker
Stefan Krah added the comment:
Trying to remove myself from the nosy list again (I know that the interface
sometimes surprisingly adds/removes persons).
--
___
Python tracker
<https://bugs.python.org/issue34
Change by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<https://bugs.python.org/issue34605>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Behnel added the comment:
lxml supports "comment" and "pi" as event types in iterparse (or, more
specifically, in the XMLPullParser). If someone wants to implement this for
(c)ElementTree, I'd be happy to review the PR.
https://lxml.de/api/lxml.etree
Stefan Behnel added the comment:
Nice. Looks good to me.
--
___
Python tracker
<https://bugs.python.org/issue34739>
___
___
Python-bugs-list mailing list
Unsub
Stefan Behnel added the comment:
> because Py_buffer isn't a PyObject at all :)
It owns a PyObject reference to the buffer owner, though.
--
nosy: +scoder
___
Python tracker
<https://bugs.python.org
Change by Stefan Krah :
--
nosy: +skrah
___
Python tracker
<https://bugs.python.org/issue34778>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Stefan Behnel :
--
nosy: +scoder
___
Python tracker
<https://bugs.python.org/issue34776>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
>>> mview.format
'B'
>>> mview[:] = array.array('B', b'hello')
Bytes have format 'B', so this works as expected.
--
assignee: -> skrah
nosy: +skrah
resolut
New submission from Stefan Rink :
When trying to run dask distributed on ARM you will end with a segmentation
fault on multiple in multiple tests;
Works on AMD64 but does not work on ARM or AARCH64 and results in a Signal 11.
Example;
# python
Python 3.6.6 (default, Sep 29 2018, 05:50:41
Stefan Rink added the comment:
* (re)installed libffi but it was already version 3.2.1.
* Currently compiling python3.7 on both ARM and AARCH64 to test them.
This may take a while because I need to install dask again for 3.7 to test..
Didn't try this on Linux ARM yet so I'll als
Stefan Rink added the comment:
On ARM32 it still crashed but on the ARM64 upgrade to 3.7 helped!
Need to do some more testing but it looks like it's working now.
# python3.7
Python 3.7.0 (default, Sep 29 2018, 05:58:20)
[Clang 6.0.1 (tags/RELEASE_601/final 335540)] on freebsd12
Type
Stefan Rink added the comment:
Upgrade to 3.7 fixed the main problem for me, or at least on the hardware/arch
I use.
-- On ARM32 it still failed but I don't have debugging symbols there so not so
easy to troubleshoot further --
--
resolution: -> work
Stefan Behnel added the comment:
If I understand the code right, "PY_SSIZE_T_MAX/sizeof(Py_UCS4)" would not be
correct since it would unnecessarily limit the length of ASCII-only unicode
strings.
I think the initial check avoids the risk of integer overflow in the
calculations
Stefan Behnel added the comment:
Well, if that's what it takes, then that's what it takes. I'm fine with the
change. The (unaccelerated) ET doesn't strictly require it, but a) I can't
really see a use case for non-Element classes in the tree, b) pretty much
no
New submission from Stefan Behnel :
I see reports from Cython users on Windows-64 that extension modules that use
"longintrepr.h" get miscompiled by MinGW. A failing setup looks as follows:
Stock 64 bit CPython on Windows, e.g.
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [
Stefan Behnel added the comment:
Some more information. CPython uses this code snippet to decide on the PyLong
digit size:
#ifndef PYLONG_BITS_IN_DIGIT
#if SIZEOF_VOID_P >= 8
#define PYLONG_BITS_IN_DIGIT 30
#else
#define PYLONG_BITS_IN_DIGIT 15
#endif
#endif
In MinGW, "SIZEOF_VOID
Stefan Behnel added the comment:
> There's PyLong_GetInfo ...
Thanks, I understand that this information can be found at runtime. However, in
order to correctly compile C code against a given CPython runtime, there needs
to be a guarantee that extension module builds use
Stefan Behnel added the comment:
The relevant macro seems to be "__MINGW64__". I have neither a Windows
environment nor MinGW-64 for testing, but the logic should be the same as for
the "_WIN64" macro, i.e.
#if defined(_WIN64) || defined(__MINGW64__)
#define MS_WI
Stefan Krah added the comment:
I just want to add one more voice for allowing the status quo:
C, OCaml, SML, Haskell allow the assignment, Ruby disallows it.
The ML family must allow it, since "let (x) = 10" is pattern matching
under the hood, and (10) = 10.
In C (gcc, clang a
Stefan Behnel added the comment:
> Maybe some people prefer sorting to get a more deterministic output
Note that those people are much better off with C14N. It is the one tool
designed for all of these use cases, even usable for cryptographic signatures.
And it's trivial to use, it&
Stefan Behnel added the comment:
Making _PyGC_FINALIZED() internal broke Cython
(https://github.com/cython/cython/issues/2721). It's used in the finaliser
implementation
(https://github.com/cython/cython/blob/da657c8e326a419cde8ae6ea91be9661b9622504/Cython/Compiler/ModuleNode.py#L1442-
Stefan Krah added the comment:
> We do not want to change it to 64-bit because it’s not supported in all
> environments.
Does this also apply to changing the precision temporarily? Because
that is what happens for other platforms, see Include/pyport.h:
HAVE_PY_SET_53BIT_PRE
Stefan Krah added the comment:
I forgot to comment on this:
> fixing this in general would allow keeping the FPUCW on i387 unchanged too.
Actually dtoa.c (which is used on i387) explicitly requires to change
the control word.
Looking at the test results, it seems to me that a couple of te
Stefan Krah added the comment:
Here's a baroque patch for _decimal. It's complicated by the fact
that there's no way of knowing what kind of UTF-8 fragments might
be hidden in multi-byte separators or decimal points.
--
Added file: http://bugs.python.org/file30407/
Changes by Stefan Krah :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue17768>
___
___
Python-bugs-list
Changes by Stefan Drees :
--
nosy: +dilettant
___
Python tracker
<http://bugs.python.org/issue18093>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
With this patch float and int should behave like Decimal. It may
break existing code that (accidentally) uses both legacy zero padding
and explicit alignment.
--
keywords: +patch
stage: needs patch -> patch review
versions: -Python 3.3
Added file: h
Stefan Krah added the comment:
Hi, I think this broke the tiger buildbot:
http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/6368/steps/test/logs/stdio
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue17
Stefan Krah added the comment:
+1 for removing all occurrences of "register".
Regarding the grammar, we have:
function-definition:
declaration-specifiers-opt declarator declaration-list-opt
compound-statement
So I think that "part of an external declaration" ref
Stefan Krah added the comment:
I'd use foldl() in functional languages, where the default is part
of foldl() and not of max().
Translated to Python, I'm thinking of:
it = iter([328, 28, 2989, 22])
functools.reduce(max, it, next(it, None))
2989
I agree with Raymond that a default
Stefan Mihaila added the comment:
On 6/3/2013 9:33 PM, Alexandre Vassalotti wrote:
> Alexandre Vassalotti added the comment:
>
> Stefan, could you address my review comments soon? The improved support for
> globals is the only big piece missing from the implementation of PEP, whic
Stefan Krah added the comment:
The docs say:
"Native size and alignment are determined using the C compiler’s sizeof
expression. This is always combined with native byte order."
sizeof(long) is 8 on your platform, so I don't see anything wrong here.
Or is another part of th
Changes by Stefan Drees :
--
nosy: +dilettant
___
Python tracker
<http://bugs.python.org/issue17941>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Building the external packages isn't fixed yet, but I don't know if it's
worth the trouble.
--
___
Python tracker
<http://bugs.pyt
Stefan Krah added the comment:
Basically someone has to review the patch and commit it. I'm not really
using ctypes, so for me a decent review would take a while.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
With gcc I cannot reproduce this either. For icc perhaps we should
just set "-fp-model strict" in ./configure.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.o
Stefan Behnel added the comment:
This test from lxml's ElementTree test suite crashes for me now when run
against (c)ElementTree:
def test_parser_target_error_in_start(self):
assertEqual = self.assertEqual
events = []
class Target(object):
def
Stefan Behnel added the comment:
@Victor: yes, the Cython project has CI tests running against debug builds of
all CPython branches since 2.4, updated daily. lxml is part of an extended set
of tests for Cython, and the test suite of lxml includes several compatibility
tests for ElementTree
Changes by Stefan Behnel :
--
nosy: -scoder
___
Python tracker
<http://bugs.python.org/issue18408>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Stefan Behnel:
The C accelerator for the collections.Counter class (_count_elements() in
_collections.c) is slower than the pure Python versions for data that has many
unique entries. This is because the fast path for dicts is not taken (Counter
is a subtype of dict) and
Stefan Behnel added the comment:
Here is a patch that cleans up the current implementation to avoid making the
result of iterparse() an IncrementalParser (with all of its new API).
Please note that the tulip mailing list is not an appropriate place to discuss
additions to the XML libraries
Changes by Stefan Behnel :
--
components: +XML
___
Python tracker
<http://bugs.python.org/issue17741>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Behnel added the comment:
Copying the discussion between Antoine and me from python-dev:
>> IMO it should mimic the interface of the TreeBuilder, which
>> calls the data reception method "feed()" and the termination method
>> "close()". There
Stefan Behnel added the comment:
Actually, let me take that last paragraph back. There is an Obvious Way to do
it, and that's the feed() and close() methods. They are the existing and
established ElementTree interface for incremental parsing. The fact that
close() doesn't clean up
Changes by Stefan Behnel :
Added file: http://bugs.python.org/file31206/iterparse_api_cleanup.patch
___
Python tracker
<http://bugs.python.org/issue17741>
___
___
Pytho
Stefan Behnel added the comment:
Thinking about the original patch some more - I wonder why it doesn't use a
wrapper for TreeBuilder to process the events. Antoine, is there a reason why
you had to add this _setevents() method to the XMLParser, instead of making the
IncrementalPars
Stefan Behnel added the comment:
Oh, and could we reopen this ticket, please?
--
___
Python tracker
<http://bugs.python.org/issue17741>
___
___
Python-bugs-list m
Stefan Behnel added the comment:
> The point is not to build a tree of potentially unbounded size (think
> XMPP). The point is to yield events in a non-blocking way (iterparse()
> is blocking, which makes it useless for non-blocking applications).
Ok, but that's the only differen
Stefan Behnel added the comment:
> About the patch: I think changing the API names now that alpha1 has been
> released is a bit gratuitous.
Sorry for being late, but I can't see it being my fault.
A change in an alpha release is still way better than a change after a final
release.
Stefan Behnel added the comment:
> But worse than no change at all. Arguing about API naming is a bit
> futile, *especially* when the ship has sailed.
It's easy to say that as a core developer with commit rights who can
simply hide changes in a low frequented bug tracker withou
Stefan Behnel added the comment:
But IncrementalParser uses an XMLParser internally, which in turn uses a
TreeBuilder internally. So what exactly is your point?
--
___
Python tracker
<http://bugs.python.org/issue17
Stefan Behnel added the comment:
> Well, I would rather like to understand yours.
My point is that the IncrementalParser uses a TreeBuilder that builds an XML
tree in the back. So I'm wondering why you are saying that it doesn't build a
tree.
> Whatever IncrementalParser
Stefan Behnel added the comment:
> TreeBuilder doesn't do parsing, it takes already parsed data: it has a
> start() method to open a tag, and a data() method to add raw text
> inside that tag.
That is correct. However, the XMLParser has a feed() method that sends new data
into t
Stefan Behnel added the comment:
> Unless I'm reading it wrong, when _setevents() is called, the internal
> hooks are rewired to populate the events list, rather than call the
> corresponding TreeBuilder methods. So, yes, there's a TreeBuilder
> somewhere, but it stands
Stefan Behnel added the comment:
> ask to be added to the experts list for ET
Already done, see the corresponding python-dev thread.
> Now back to a productive discussion please...
I think we already are. Keep reading through the rest of the
Stefan Behnel added the comment:
Ok, finally. ;)
Can we agree on discarding the current implementation for now and then
rewriting it based on a tree builder instead of a parser wrapper?
"Because we'd need to change internal code" is not a good argument for adding a
Stefan Behnel added the comment:
What about this idea: instead of changing the internal C implementation, we
could provide a simple parser target wrapper class (say, "EventBuilder") that
the parser would simply recognise with isinstance(). Then it would unpack the
wrapped target and
Stefan Behnel added the comment:
> I agree, but this assumes there is a "better API". I would like to see
> an API proposal and a patch before I give an opinion :-)
Well, I have already proposed an API throughout this thread, and then given a
usage example and an almost comple
2201 - 2300 of 4951 matches
Mail list logo