Mark Dickinson dicki...@gmail.com added the comment:
Two things that haven't come up so far:
(1) What about parentheses? The current complex repr and str have
parentheses in them, for reasons that I still don't really understand.
I'd suggest leaving them out altogether; except that I have
the
Eric Smith e...@trueblade.com added the comment:
Mark Dickinson wrote:
(1) What about parentheses? The current complex repr and str have
parentheses in them, for reasons that I still don't really understand.
I'd suggest leaving them out altogether; except that I have
the impression
Mark Dickinson dicki...@gmail.com added the comment:
Complex would be the first one. But that doesn't really bother me.
It bothers me a little. I see '' as a special case of the empty
presentation type, even if that's not what a strict reading of
PEP 3101 says, so I expect '', '' '20' all to
Mark Dickinson dicki...@gmail.com added the comment:
I'm still flip-flopping on this one. On the minus side, this change
risks breaking doctests without any enormous gain to show for it.
On the plus side, Eric Smith is currently working on implementing
sensible formatting for complex numbers
Eric Smith e...@trueblade.com added the comment:
See the attached patch. Comments welcome.
I'm not sure I'm doing the right thing with 'g' and appending zeros:
format(3+4j, '.2')
'(3+4j)'
format(3+4j, '.2g')
'3.0+4.0j'
format(3+0j, '.2')
'(3+0j)'
format(3+0j, '.2g')
'3.0+0.0j'
format(1j,
Mark Dickinson dicki...@gmail.com added the comment:
I'll take a look.
The trailing zeros thing is heavily bound up with issue 5858, of course;
I think we need a decision on that, one way or the other. One problem
is that I'm only proposing the issue 5858 change for py3k, not trunk.
Eric Smith e...@trueblade.com added the comment:
Mark Dickinson wrote:
The trailing zeros thing is heavily bound up with issue 5858, of course;
I think we need a decision on that, one way or the other. One problem
is that I'm only proposing the issue 5858 change for py3k, not trunk.
I don't
Mark Dickinson dicki...@gmail.com added the comment:
I'm also going to disallow the '%' format code.
Sounds good to me.
I don't think it makes any sense to convert a complex number to a
percentage.
Well, I think it's clear what the numbers would be (just scale both real
and imaginary parts
Eric Smith e...@trueblade.com added the comment:
Here's a patch against py3k, with one slight change with non-empty
presentation types.
--
Added file: http://bugs.python.org/file13802/issue-1588-1-py3k.patch
___
Python tracker rep...@bugs.python.org
New submission from Mark Dickinson dicki...@gmail.com:
In all versions of Python from 2.6 up, I get the following behaviour:
format(123.456, '.4')
'123.5'
format(1234.56, '.4')
'1235.0'
format(12345.6, '.4')
'1.235e+04'
The first and third results are as I expect, but the second is somewhat
Santiago Peresón y...@yaco.net added the comment:
the attached file triggers the bug.
--
Added file: http://bugs.python.org/file13803/Sine-1000Hz-300ms.aif.zip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2245
Eric Smith e...@trueblade.com added the comment:
Mark Dickinson wrote:
Although I guess if we wanted to, we could say that the empty
presentation type is equivalent to 'g', but gives you parens.
This works for me.
Me, too.
[about suppressing real zeros...]
Again, we could say that the
Eric Smith e...@trueblade.com added the comment:
I'm also going to disallow the '%' format code. I don't think it makes
any sense to convert a complex number to a percentage.
--
___
Python tracker rep...@bugs.python.org
Jesse Noller jnol...@gmail.com added the comment:
Ugh, I do think this is a doc bug; I think there was an amount of shear
when we performed the merge into core and subsequent bug fixes. I'll take
a look when I get a chance.
--
___
Python tracker
Mark Dickinson dicki...@gmail.com added the comment:
With your patch, I'm getting quite strange results when using alignment
specifiers:
z = 123+4j
format(z, '=20')
'( 123+ 4j)'
format(z, '^20')
'(123 +4 j)'
format(z, '20')
Eric Smith e...@trueblade.com added the comment:
...
Is this intentional? I was expecting to get strings of length 20,
with the substring '(123+4j)' positioned either in the middle
or on the left or right.
No, not intentional. I'll fix it and add some tests. Thanks.
--
New submission from Alan Hourihane al...@fairlite.co.uk:
mathmodule.c fails to compile because math_log1p() is missing in
mathmodule.c...
gcc -fno-strict-aliasing -DNDEBUG -O2 -pipe -fomit-frame-pointer -I.
-IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/mathmodule.c -o
Daniel Diniz aja...@gmail.com added the comment:
Duplicate of #1514420.
--
nosy: +ajaksu2
resolution: - duplicate
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5668
Zbyszek Szmek zbys...@in.waw.pl added the comment:
The bug is certainly not catastrophic, but creates
a slight security risk:
ln -s /etc/shadow 'stdin'
some-suid-program -with-error
or whatever.
--
nosy: +zbysz
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
We could fix it for 3.1, and perhaps leave 2.7 unchanged if some people
rely on this (for whatever reason).
--
nosy: +pitrou
priority: - high
stage: - test needed
versions: +Python 3.1
___
Python
Changes by Ronald Oussoren ronaldousso...@mac.com:
--
nosy: -ronaldoussoren
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1514420
___
___
Daniel Diniz aja...@gmail.com added the comment:
Changing into a RFE: automatically set use_rawinput when 'stdin' is
not None. Will be closed unless someone voices interest.
--
components: +Library (Lib) -Extension Modules
keywords: +easy
priority: - low
stage: - test needed
status:
Mark Dickinson dicki...@gmail.com added the comment:
Thanks for the report.
Could you please tell me what platform you're on?
And does the configure script detect that log1p is available? (There
should be a line in the (stdout) output of the configure script that
looks something like:
Alan Hourihane al...@fairlite.co.uk added the comment:
I do have log1p() available...
checking for log1p... yes
And it's in math.h and libm.a on my system.
I still can't see any reference to math_log1p() in mathmodule.c which is
why it's barfing.
--
Mark Dickinson dicki...@gmail.com added the comment:
math_log1p should be produced by the line
FUNC1(log1p, log1p, 1, ...
FUNC1 is a macro that (in this instance) creates the math_log1p function.
The original error message that you posted seems to say that it's log1p
that's undeclared, not
New submission from Jelle jelleroozenb...@gmail.com:
Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
[GCC 4.3.2] on linux2
print cPickle.dumps(('a','b')) == cPickle.dumps(('a', str('b')))
False
print pickle.dumps(('a','b')) == pickle.dumps(('a', str('b')))
True
print
Eric Smith e...@trueblade.com added the comment:
I agree this should be changed.
This:
format(1234.56, '.4')
'1235.0'
is definitely a problem.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5864
Changes by Jelle jelleroozenb...@gmail.com:
--
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5866
___
___
Python-bugs-list
Mark Dickinson dicki...@gmail.com added the comment:
It might also be helpful if you could tell me how you're building
Python (what configure options, etc.), and which version of the
source you have---is this the 2.6.2 tarball from python.org, or
a recent svn; if the latter, which revision?
New submission from Matteo Dell'Amico de...@linux.it:
Is there a way to define an abstract classmethod? The two obvious ways
don't seem to work properly.
Python 3.0.1+ (r301:69556, Apr 15 2009, 17:25:52)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
Alan Hourihane al...@fairlite.co.uk added the comment:
Ah. right. I see what you mean about the macro expansion.
So I'm on an Atari FreeMiNT platform which is an m68k box which has no
shared libraries so I'm setting up for static only via Setup.dist.
Note that cmathmodule.c compiles fine and
Mark Dickinson dicki...@gmail.com added the comment:
Note that cmathmodule.c compiles fine and that does reference
log1p() too.
Now that's *really* peculiar. I can't imagine why one would work and
the other not. Some ideas about how to proceed from here:
- try doing a debug build
New submission from Alain Poirier alain.poir...@net-ng.com:
In Python 2.6.2, the fix for the issue 5401 changed the way the
mimetypes module is initialized.
But now the initialization is not thread-safe : a thread can set
``inited`` to ``True`` and then be preempted before to overwrite the
Antoine Pitrou pit...@free.fr added the comment:
Already fixed in r72048.
If you try the fix and find out it has some problems, please reopen the bug.
--
nosy: +pitrou
resolution: - duplicate
status: open - closed
superseder: - mimetypes.guess_type() hits recursion limit
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I think the change should be deemed a bug and backported. Nothing good
can come from having version differences persist or from having the odd
looking output.
--
nosy: +rhettinger
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +Merwok
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3143
___
___
Python-bugs-list mailing
Alan Hourihane al...@fairlite.co.uk added the comment:
It's ok, I see what the problem is. It's GCC's headers that are causing
trouble.
Closing.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5865
R. David Murray rdmur...@bitdance.com added the comment:
OK, so I made the obvious changes to the second remote client example
and tried running the three. They all run now, but the output is not as
expected. I've attached a composite debug log of what happened for your
reference. (I think I
Mark Dickinson dicki...@gmail.com added the comment:
I'm glad you sorted it out. :)
Any chance you could tell us what the fix was, in case anyone else runs
into something similar? Or is that unlikely to happen?
Also, while you're there, I have a favour to ask: could you tell me
what the
Alan Hourihane al...@fairlite.co.uk added the comment:
GCC was munging math.h when it did fixincludes. I'm fixing the GCC port now.
Result of 1e16+2.9 is...
10002.00
--
___
Python tracker rep...@bugs.python.org
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +lemburg, loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3672
___
___
Python-bugs-list
Daniel Diniz aja...@gmail.com added the comment:
Mark: it was just my cluelessness showing :)
--
dependencies: -long int bitwise ops speedup (patch included)
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1492860
Eric Smith e...@trueblade.com added the comment:
This is a patch against py3k, including tests in test_complex.py. It
should deal with the padding, but let me know.
--
stage: test needed - patch review
Added file: http://bugs.python.org/file13805/issue-1588-2-py3k.patch
Georg Brandl ge...@python.org added the comment:
As long as the different pickle outputs unpickle to the same objects
(which they do, since they only differ in pushing objects to the memo),
I can't see why this would be a bug.
--
nosy: +georg.brandl
resolution: - wont fix
status: open
Georg Brandl ge...@python.org added the comment:
May I add that the given example is flawed:
1. it shares the data dictionary between all instances
2. just delegating all container interfaces to a dictionary does not
really show how to customize your own container.
--
Mark Dickinson dicki...@gmail.com added the comment:
Many thanks. Looks like no double rounding then; that's good news.
(32-bit Linux on x86 typically produces 10...0004.0 for this example).
--
___
Python tracker rep...@bugs.python.org
Changes by Benjamin Peterson benja...@python.org:
--
priority: - normal
type: behavior - feature request
versions: +Python 3.1 -Python 3.0
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5867
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5850
___
New submission from Neville Bagnall neville.bagn...@propylon.com:
When tarinfo.name is exactly 100 characters long, the last character is
truncated in the tarfile
Attached patch contains the extremely simple fix.
--
components: Library (Lib)
files: tarfile.patch
keywords: patch
Neville Bagnall neville.bagn...@propylon.com added the comment:
Lars, for information. I'm closing as 2.4 isn't being maintained I
presume, and while I believe it also affects 2.5, I don't think its a
security issue, just data loss
--
nosy: +lars.gustaebel
status: open - closed
New submission from Jean Brouwers mrje...@gmail.com:
The subprocess module exposes the PIPE and STDOUT constants to be used
for the stdin, stdout or stderr keyword arguments.
Often, stderr needs to be redirected to /dev/null (on posix). It would
nice if another constant was available for
Thomas Heller thel...@ctypes.org added the comment:
I've applied py-issue-4305.patch and reran configure 2.61. Committed as
rev 72081 (trunk), 72082 (py3k branch), 72083 (release26-maint branch),
72084 (release30-maint branch).
Can someone please confirm that it works now, so that I can close
Thomas Heller thel...@ctypes.org added the comment:
Seems ronald takes care of this issue.
--
assignee: theller - ronaldoussoren
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5413
___
Thomas Heller thel...@ctypes.org added the comment:
Duplicate of issue 4305.
--
resolution: - duplicate
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5507
___
Thomas Heller thel...@ctypes.org added the comment:
Isn't is easy to find these limits by using ctypes?
Something like ctypes.sizeof(ctypes.c_uint32)...
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Changes by Thomas Heller thel...@ctypes.org:
--
versions: +Python 2.7, Python 3.0, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4875
___
Eric Smith e...@trueblade.com added the comment:
I also propose to disallow the '=' alignment flag. It means put the
padding between the sign and the digits, and since there are 2 signs,
it's not clear what this would mean.
Remember, by using .real and .imag, you can achieve this level of
Changes by Lino Mastrodomenico l.mastrodomen...@gmail.com:
--
nosy: +l.mastrodomenico
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3297
___
___
New submission from Jakub Wilk uba...@users.sf.net:
from email.mime.text import MIMEText
from email.header import Header
msg = MIMEText('dummy')
h = Header('dummy\nX-Injected-Header: yes')
msg['Subject'] = h
print msg.as_string()
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Changes by Benjamin Peterson benja...@python.org:
--
assignee: - barry
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5871
___
___
Antoine Pitrou pit...@free.fr added the comment:
I don't think it's a good thing to special-case bitwise operations in
the ceval loop. It will make the whole thing less instruction
cache-friendly, just for the purpose of speeding up some very uncommon
operations.
--
nosy: +pitrou
Antoine Pitrou pit...@free.fr added the comment:
Lowering priority since, as Martin said, it shouldn't be needed in
real-life situations.
--
nosy: +pitrou
priority: high - low
stage: - needs patch
type: feature request - resource usage
___
Python
Roumen Petrov bugtr...@roumenpetrov.info added the comment:
Or another workaround is to change line path = '///' + drive + '|'
from file ./Lib/nturl2path.py, i.e. '|' - ':' .
--
nosy: +rpetrov
___
Python tracker rep...@bugs.python.org
Eric Smith e...@trueblade.com added the comment:
I think these patches are complete. One for py3k, one for trunk. If no
complaints, I'll apply them before this weekend's py3k beta.
--
Added file: http://bugs.python.org/file13807/issue-1588-trunk.patch
Changes by Eric Smith e...@trueblade.com:
Added file: http://bugs.python.org/file13808/issue-1588-py3k.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1588
___
Changes by Eric Smith e...@trueblade.com:
Removed file: http://bugs.python.org/file13801/issue-1588-0.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1588
___
Changes by Eric Smith e...@trueblade.com:
Removed file: http://bugs.python.org/file13802/issue-1588-1-py3k.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1588
___
Changes by Eric Smith e...@trueblade.com:
Removed file: http://bugs.python.org/file13805/issue-1588-2-py3k.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1588
___
Changes by Glyph Lefkowitz gl...@divmod.com:
--
nosy: +glyph
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5753
___
___
Python-bugs-list mailing
Georg Brandl ge...@python.org added the comment:
Note that in tokenize.diff, TokenInfo should be in __all__ instead of
Token. I agree with Raymond on the inner tuples.
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Committed in r72086.
Needs backporting to 2.7.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5857
New submission from Larry Hastings la...@hastings.org:
EXECUTIVE SUMMARY
I've written a patch against py3k trunk creating a new function-based
API for creating extension types in C. This allows PyTypeObject to
become a (mostly) private structure.
THE PROBLEM
Here's how you create an
Changes by Brett Cannon br...@python.org:
--
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5872
___
___
Python-bugs-list
New submission from Nicolas Frantzen n.frant...@gmail.com:
Hi,
I'm pretty new to the community but I get an error using the minidom
parseString() method. Here is my code (ulta simple!):
import xml.dom.minidom
xml = taghello/tag
doc = xml.dom.minidom.parsString(xml)
And here is my error trace:
74 matches
Mail list logo