Stefan Behnel added the comment:
Works for me in 3.2 and 3.4, fails in 2.7, as reported.
I'll leave it to Eli to decide if this should get fixed in 2.7. In Py2, ET and
cET were different modules, so this could also be considered a missing feature
in cET. Given that it leads to a serialisation
Stefan Behnel added the comment:
Ah, sorry, actually, it does not work in Py3.2:
import xml.etree.cElementTree as cET
root = cET.Element('root', attrib={'Name':'Root'})
child = cET.SubElement(root, 'child', attrib={'Name':'Child'})
cET.tostring(root)
b'root attrib={\'Name\': \'Root\'}child
Stefan Behnel added the comment:
According to issue 1572710, this is not a bug. The attrib argument is
supposed to be a positional argument, not a keyword argument. This makes sense,
given that arbitrary keyword arguments are accepted for additional XML
attributes.
--
New submission from Roman Inflianskas:
It's really useful that python 3 allows me to use some Unicode symbols (as
specified in
https://docs.python.org/3.4/reference/lexical_analysis.html#identifiers),
especially Greek symbols for mathematical programs. But when I write
mathematical program
STINNER Victor added the comment:
Never rely on the GC. Avoid cycles by using the weakref module.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21351
___
akira added the comment:
I've changed test_newlines to work also with Python io implementation.
I've updated the patch.
Note: tests use 10 seconds timeouts: I don't know how long it should take to
read back a line from a subprocess so that the timeout would indicate a
deadlock.
--
akira added the comment:
I've uploaded the patch that makes C implementation behave according
to the docs like Python implementation with the corresponding tests.
Issue #21332 is a dependency for this issue: subprocess'
test_universal_newlines needs to be updated to work with Python version.
Jesús Cea Avión added the comment:
OK, you did your homework.
I checked PyObject_Is_True() function and I agree. This actually looks like a
leak when True/False were added to Python. Python3 is inheriting it :-).
OK.
I see three issues in the code:
a) You are getting a key from the
Yinon Ehrlich added the comment:
Use the 'abspath' shortcut instead of 'os.path.abspath'
See the attached patch (sorry, forgot to attach before)
--
keywords: +patch
Added file: http://bugs.python.org/file35126/shutil.patch
___
Python tracker
Steven D'Aprano added the comment:
3.1, 3.2, 3.3 and 3.4 are all in feature-freeze, so this is only an option for
3.5.
A very tentative +1 on this feature. But I fear it may need to be discussed on
python-ideas first.
--
nosy: +steven.daprano
type: - enhancement
versions: -Python
Eric V. Smith added the comment:
Wouldn't it be better to switch uses of abspath to be os.path.abspath? os.path
is used elsewhere in the file, after all.
Brett added from os.path import abspath in
http://hg.python.org/cpython/rev/686e5d38be42 but I think that import should be
deleted and
Changes by Eric V. Smith e...@trueblade.com:
--
stage: - patch review
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21391
___
Antoine Pitrou added the comment:
Actually, the test hangs after one of the threads crashes:
test__all__ (test.test_poplib.TestPOP3_SSLClass) ... Exception in thread
Thread-23:
Traceback (most recent call last):
File /home/antoine/cpython/default/Lib/threading.py, line 920, in
Lars Gustäbel added the comment:
Let me present for discussion a proposal (and a patch with documentation) with
an approach that is a little different, but in my opinion the most effective. I
hope that it will appeal to all involved.
My proposal consists of a new class SafeTarFile, that is a
New submission from Antoine Pitrou:
Many constants in the socket module, are not int enums. Examples are
socket.CAN_BCM, socket.BTPROTO_RFCOMM, etc.
For example when creating a bluetooth socket, you may get the following repr():
socket.socket(socket.AF_BLUETOOTH, socket.SOCK_STREAM,
Antoine Pitrou added the comment:
I think python-dev or python-ideas should indeed be consulted before.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21405
___
Lars Gustäbel added the comment:
tarfile.open() actually supports a compress_level argument for gzip and bzip2
and a preset argument for lzma compression.
--
nosy: +lars.gustaebel
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Thanks! The latest patch looks fine to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21377
___
___
Roundup Robot added the comment:
New changeset 4ed1b6c7e2f3 by Antoine Pitrou in branch 'default':
Issue #21377: PyBytes_Concat() now tries to concatenate in-place when the first
argument has a reference count of 1.
http://hg.python.org/cpython/rev/4ed1b6c7e2f3
--
nosy: +python-dev
Changes by Antoine Pitrou pit...@free.fr:
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21377
___
Roman Inflianskas added the comment:
I'm sorry, I didn't now that bugtracker is not for features discussing. I'll
wrote the letter to the python-ideas:
https://groups.google.com/forum/#!topic/python-ideas/yjR7j9TSFeE
--
___
Python tracker
Changes by Stefan Krah stefan-use...@bytereef.org:
--
assignee: skrah
components: Extension Modules
nosy: skrah
priority: normal
severity: normal
status: open
title: Add function signatures to _decimal
type: enhancement
versions: Python 3.5
___
New submission from Roundup Robot:
New changeset 40b06a75d1c6 by Stefan Krah in branch 'default':
Issue #21407: _decimal now supports function signatures.
http://hg.python.org/cpython/rev/40b06a75d1c6
--
nosy: +python-dev
___
Python tracker
Stefan Krah added the comment:
Okay, thanks. I've used $cls for Decimal.from_float in 40b06a75d1c6,
and it appears to work already.
Feel free to close the issue (I don't know whether AC emits $cls or
if it should).
--
___
Python tracker
Changes by Stefan Krah stefan-use...@bytereef.org:
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21407
___
New submission from Jean-Paul Calderone:
$ ~/Projects/cpython/3.4/python -c '
class Foo(object):
def __ne__(self, other):
return yup
def __eq__(self, other):
return nope
class Bar(object):
pass
print(object() != Foo(), object() == Foo())
print(Bar() !=
Benjamin Peterson added the comment:
That's because the implicit default __ne__ on Bar returns the opposite of
__eq__.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21408
Changes by Brett Cannon br...@python.org:
--
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21400
___
___
Python-bugs-list
Brett Cannon added the comment:
Unfortunately it's impossible to warn against this in Python 2 since the bytes
type is just another name for the str type:
str == bytes
True
type(b'1')
type 'str'
What we could potentially do, though, is change things such that -3 does what
you are after
Sworddragon added the comment:
Could it be that compress_level is not documented?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21404
___
___
Lars Gustäbel added the comment:
That's right. But it is there.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21404
___
___
Python-bugs-list
Sworddragon added the comment:
Then this one is easy: The documentation needs just an update. But then there
is still zipfile that doesn't provide (or at least document) a compression
level.
--
___
Python tracker rep...@bugs.python.org
Joshua J Cogliati added the comment:
Hm. That is a good point. Possibly it could only be done when
from __future__ import unicode_literals
has been used. For example:
python2 -3
Python 2.7.5 snip
Type help, copyright, credits or license for more information.
type(ba) == type(a)
True
from
Santoso Wijaya added the comment:
There is still a matter of inconsistency between the two implementations and
between 2.7 and 3.x. IMO, the Python-based ElementTree implementation is more
graceful at handling the attrib argument.
The signature of the factory function Element (and SubElement)
Santoso Wijaya added the comment:
Quoting dabrahams in issue 1572710:
On second thought, I see what effbot is trying to say... but it's still a bug.
Given the way the interface is declared and the behavior of regular python
functions:
Element(tag, attrib={}, **extra)
indicates that I can
Stefan Behnel added the comment:
Note that this has been fixed in Py3 already (Py3.3, I guess). The only
question is whether the behaviour will be changed in Py2.7.
--
components: -XML
___
Python tracker rep...@bugs.python.org
Eli Bendersky added the comment:
Note that this has been fixed in Py3 already (Py3.3, I guess). The only
question is whether the behaviour will be changed in Py2.7.
I don't think this issue is acute enough to warrant fixes in 2.7; however,
a documentation patch would be welcome.
--
Changes by Antoine Pitrou pit...@free.fr:
--
components: +Devguide
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21400
___
___
Charles-François Natali added the comment:
Enum are for, well, enumerated values, so for values within a finite
and known range (like days, cards, etc).
OTOH, I'm not sure all socket constants could be categorized like this.
It makes sense for address families, especially since they're used so
David Watson added the comment:
On Mon 28 Apr 2014, Jim Jewett wrote:
pinging David Watson: What is the status? If I understand correctly, (and I
may well not), you have already opened other issues for parts of this, and
(only) the final patch is ready for patch (and hopefully) commit
R. David Murray added the comment:
This is why we should have had named constants and not Enums :)
But no, nothing in the python Enum implementation restricts it to a value
*range*. It is really a collection of named constants.
--
nosy: +r.david.murray
Charles-François Natali added the comment:
But no, nothing in the python Enum implementation restricts it to a value
*range*. It is really a collection of named constants.
I didn't say in the implementation, I said in spirit.
Would you describe all possible Unix PIDs are a Enum?
Also, the
Antoine Pitrou added the comment:
It makes sense for address families, especially since they're used so
much, but when it comes to e.g. SO_REUSEADDR or BTPROTO_RFCOMM,
Hmm, I was thinking mostly about protocol numbers. All the BTPROTO_* constants
should be part of a given enum
Charles-François Natali added the comment:
To put it slightly differently:
AF_XXX constant actually whome belong to the same namespace, the
socket address family namespace.
So we put them all in AddressFamily Enum.
Now, for many constants defined in system header files, it's not so
clear, e.g.
Antoine Pitrou added the comment:
Ah, I missed the fact that the family and type properties are re-computed
on the fly; I thought the enum values where stored on the socket object.
Then it makes it harder to do the same for proto, since there are
family-specific namespaces with colliding
New submission from Jeff Hinrichs:
python setup.py check
python setup.py check --restructuredtext
both incorrectly warn and don't Fail for things that will cause a failure
when uploading to pypi. This is wrong.
Additionally, they should return a non 0 exit code so they can be used as part
Jeff Hinrichs added the comment:
example:
(dhp)jlh@jlh-d520:~/Projects/dhp/src$ python setup.py check
running check
(dhp)jlh@jlh-d520:~/Projects/dhp/src$ python setup.py check --restructuredtext
running check
warning: check: Title underline too short. (line 2)
warning: check: Could not finish
New submission from Jeff Hinrichs:
if you run
setup.py check --restructuredtext
without docutils installed, it will appear to pass
if you add the -s flag, it will error and inform you that docutils is not
installed.
So nothing is reported and return results are the same as a passing
New submission from Zachary Ware:
Python 3.4 and 3.5 both compile without warnings on 32-bit Windows, so we
should turn on Treat Warning as Error (/WX option to cl.exe). Setting that
property in pyproject.props sets it for all projects, and the setting does not
affect Makefile projects so
New submission from John Beck:
I am porting Python 3.4.0 to Solaris 12. The Makefile I inherited from my
predecessor had --without-pymalloc as an option to be passed to configure.
Curious why, I removed this line, only to find that after python was built, it
core dumped:
Stefan Krah added the comment:
On SPARC/suncc the flags in http://bugs.python.org/issue15963#msg170661
appear to work.
Also, we have several Solaris build slaves that don't core dump.
Some are offline, but you can click through to the ./configure
steps of past builds to see the build flags.
Stefan Krah added the comment:
Hmm... perhaps Stefan would like to set something up?
Being a correctness tool hipster, of course I already have the latest toy. :)
The patch works on Debian 64-bit + clang.
I can set up a VM. We may have to react quickly to some of the issues.
Then again,
Yury Selivanov added the comment:
Yeah, I'm closing this issue.
--
resolution: - not a bug
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21399
___
Josh Rosenberg added the comment:
Why would an subclass of object that doesn't redefine either __eq__ or __ne__
have a different behavior for inequality than object itself? Bar never defined
__eq__, so it shouldn't have an implicit __ne__ any more than object itself
does...
Saying that Bar
Charles-François Natali added the comment:
Being a correctness tool hipster, of course I already have the latest toy. :)
The patch works on Debian 64-bit + clang.
Thanks for testing it.
I'll leave a few days more in case anyone has a comment, and I'll commit.
I can set up a VM.
That
Benjamin Peterson added the comment:
The reason ``object() != Foo()`` works is that Foo is a subtype of object(),
so the specialized __ne__ of Foo is called immediately without trying
object.__ne__.
I don't know whether it's a bug.
--
___
Python
R. David Murray added the comment:
I don't think it's a bug. The subclass-goes-first behavior is very
intentional. The implicit __ne__ returning the boolean inverse of __eq__ is
what fooled me when I looked at it.
Or did you mean that following the subclass rule in the case where object is
Benjamin Peterson added the comment:
The subclass behavior is a red herring.
I meant maybe object.__ne__ should check if the other object has a __ne__
method before falling back on ``not object.__eq__()``.
--
___
Python tracker
Changes by Shawn binarycrusa...@gmail.com:
--
nosy: +swalker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21412
___
___
Python-bugs-list mailing
R. David Murray added the comment:
Oh, I see. Yes, that would seem more consistent.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21408
___
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21412
___
___
Python-bugs-list mailing list
Jesús Cea Avión added the comment:
What compiler are you using?.
I compile fine on Solaris with GCC.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21412
___
New submission from Samwyse:
In Python 2.x, this opens an NTLM protected URL:
opener = urllib2.build_opener(proxy_handler, auth_NTLM, auth_digest,
auth_basic)
urllib2.install_opener(opener)
response = urllib2.urlopen(url)
In Python 3.x, this raises an error:
opener =
John Beck added the comment:
Using Oracle Studio 12.3, same as mentioned in
http://bugs.python.org/issue15963#msg170661 (as Stefan pointed out). I am
using some of those flags but not all of them. I will try the others when I
have a chance, then report back.
--
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21408
___
___
Python-bugs-list
Larry Hastings added the comment:
By default AC emits $type for class methods, see dict_fromkeys in
Objects/dictobject.c.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21399
___
R. David Murray added the comment:
Since you say the bug is fixed, what do you intend the purpose of this issue to
be?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21267
___
R. David Murray added the comment:
Oh, I missed the fact that you had closed it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21267
___
___
Martin Panter added the comment:
Perhaps you can avoid the 10 s deadlock timeout and threading in your test by
closing the underlying input pipe file descriptor (or raw file object), without
flushing it.
Also, it seems to me that “line_buffering=True” is redundant with
“write_through=True”.
Martin Panter added the comment:
Sorry, it seems I was wrong on the second point. Looking closer, it seems
write-through mode only flushes the TextIOWrapper layer, not the underlying
binary file object, whereas line-buffering mode flushes everything to the OS,
so the extra line_buffering=True
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21396
___
___
Python-bugs-list
Changes by paul j3 ajipa...@gmail.com:
Added file: http://bugs.python.org/file35128/notes.txt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9625
___
___
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21363
___
___
Python-bugs-list
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21368
___
___
Python-bugs-list
Martin Panter added the comment:
That particular revision isn’t sound so bad; I think the next revision,
78fb7f8cd349, which adds the make_streams_binary() function that replaces the
variables is a worry though.
This is the kind of code I use when I want to write binary data to stdout:
akira added the comment:
yes, line_buffering=(bufsize == 1) is necessary to support the current
Python io implementation or if C implementation is fixed to avoid
buffer.flush() on every write with write_through=True -- otherwise
bufsize is not respected in text mode (it would always mean
Adam Polkosnik added the comment:
Jim,
The problems documented here are related to two cases (both apparently arriving
from world of windows):
1. two relative paths with inverted slash in one of them (test\test2.txt vs
test/test2.txt)
2. relative path vs absolute path (windows\temp\test.txt
77 matches
Mail list logo