Martin v. Löwis mar...@v.loewis.de added the comment:
This is expected behavior. The power operator binds with higher precedence than
the unary minus:
http://docs.python.org/reference/expressions.html#unary-arithmetic-and-bitwise-operations
Therefore, your term is interpreted as
-(4 ** 2)
Shashwat Anand anand.shash...@gmail.com added the comment:
Tested on trunk.
11:46:02 l0nwlf-MBP:python-svn $ ./python.exe
Python 2.7a4+ (trunk:79888M, Apr 9 2010, 11:41:22)
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type help, copyright, credits or license for more information.
Chris Ward cward...@gmail.com added the comment:
Thanks for clearing that up and pointing me in the right direction. I should
have tested print first. The assumption was based on the evaluation of (-4) **
2 within an expression, which does return correctly. I hadn't made the
distinction that
Tim Golden m...@timgolden.me.uk added the comment:
This is basically a rerun of this discussion a couple of years ago:
http://mail.python.org/pipermail/python-dev/2008-April/078333.html
The problem certainly still happens against trunk -- I have a semi-aggressive
test-harness which can
Shashwat Anand anand.shash...@gmail.com added the comment:
skip.montanaro forgot to attached the patch obviously, however the issue is
trivial but there i.e. the presence of libpython.a file.
--
nosy: +l0nwlf
___
Python tracker
Shashwat Anand anand.shash...@gmail.com added the comment:
quotemkdir bla.py; python -c 'import imp; imp.find_module(bla, [.])'
This causes bpython to crash after the first input char if such a
directory exist./quote
I am sure you do not mean 'bpython intepretor' here.
--
nosy:
New submission from Andrew Bennetts s...@users.sourceforge.net:
The effect of signal.siginterrupt(somesig, False) is reset the first time a
that signal is received. This is not the documented behaviour, and I do not
think this is a desireable behaviour. It renders siginterrupt effectively
Darryl Miles darryl.mi...@darrylmiles.org added the comment:
In order to build Python with a specific version of OpenSSL followed the CYGWIN
instructions and edited Modules/Setup to make it read (note - I added
-L$(SSL) into the linker options too, since by default on CentOS 5.4 i386
OpenSSL
Andrew Bennetts s...@users.sourceforge.net added the comment:
Note that a trivial untilConcludes isn't correct for select if a timeout was
passed. If a select(..., 60) was interrupted after 59 seconds, you probably
want to restart it with a timeout of 1 second, not 60.
The
Senthil Kumaran orsent...@gmail.com added the comment:
No, that is not bpython interpreter. The a crash report on python interpreter
observed with imp module when a directory ends with .py.
--
nosy: +orsenthil
___
Python tracker
Tarek Ziadé ziade.ta...@gmail.com added the comment:
Distutils is now frozen. Moving it to Distutils2
--
components: +Distutils2 -Distutils
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3985
Changes by Tarek Ziadé ziade.ta...@gmail.com:
--
components: +Distutils2 -Distutils
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5411
___
___
Changes by Tarek Ziadé ziade.ta...@gmail.com:
--
components: +Distutils2 -Distutils
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue870479
___
___
Changes by Tarek Ziadé ziade.ta...@gmail.com:
--
components: +Distutils2 -Distutils
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue976869
___
___
Florent Xicluna florent.xicl...@gmail.com added the comment:
It looks like a duplicate of #7732.
--
nosy: +flox
resolution: - duplicate
status: open - closed
superseder: - imp.find_module crashes Python if there exists a directory
named __init__.py
Florent Xicluna florent.xicl...@gmail.com added the comment:
see also http://bugs.python.org/issue8352#msg102662
--
nosy: +doko, l0nwlf, ncoghlan, orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7732
Changes by Nicolas Dumazet nicd...@gmail.com:
--
nosy: +nicdumz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6715
___
___
Python-bugs-list
Nick Coghlan ncogh...@gmail.com added the comment:
I can reproduce this locally. I believe it is relevant that a simple import
crash (with crash.py as the directory) doesn't cause a problem - there must be
something higher in the import machinery which avoids the issue.
--
assignee:
anatoly techtonik techto...@gmail.com added the comment:
It is unlikely that it will go further then discussion unless this bug can be
reliably reproduced to be debugged. If not testcase when at least Process
Monitor log would be helpful.
--
___
Tarek Ziadé ziade.ta...@gmail.com added the comment:
Work done in pkgutil, in the Distutils2 project, see PEP 376 for API names.
--
components: +Distutils2 -Distutils
title: adding a get_metadata in distutils - Implement PEP 376
___
Python tracker
Tim Golden m...@timgolden.me.uk added the comment:
In one window run the attached script (assumes you have pywin32 installed) with
a parameter of the directory the TESTFN file will end up in. Then run, eg,
test_zipfile in another window. For me:
c:\temp watch_dir.py
Nick Coghlan ncogh...@gmail.com added the comment:
Ah, OK - the problem is confined solely to the wrapper for the Python imp
module function. The normal import machinery doesn't go through the wrapper and
hence doesn't have the problem.
The PyFile_FromFile logic is a little convoluted, but
anatoly techtonik techto...@gmail.com added the comment:
Atom spec -
http://www.atomenabled.org/developers/syndication/atom-format-spec.php#date.constructs
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7584
New submission from anatoly techtonik techto...@gmail.com:
Script/diff.py default context diff format is outdated. It makes sense to
produce unified diff by default.
--
components: Demos and Tools
messages: 102701
nosy: techtonik
severity: normal
status: open
title: diff.py produce
Nick Coghlan ncogh...@gmail.com added the comment:
An interesting part of this story is *why* it doesn't crash in Py3k (despite
explicitly closing the file descriptor in the same way as 2.x closes the C file
pointer).
The reason is that PyFile_FromFd (the closest Py3k equivalent to
Ray.Allen ysj@gmail.com added the comment:
Yes, I agree with you, this may be a bug?
Seemingly, the sysconfig.get_python_lib() should act just like the
get_python_inc() function, return [prefix]/lib/python[version] in case of
python_build flag is False, and [prefix]/Lib in case of
Changes by Ray.Allen ysj@gmail.com:
--
versions: +Python 2.7 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6087
___
___
Changes by Ray.Allen ysj@gmail.com:
--
versions: +Python 2.6, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6087
___
___
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7732
___
___
Python-bugs-list
Changes by anatoly techtonik techto...@gmail.com:
--
keywords: +patch
Added file:
http://bugs.python.org/file16840/8355.diff-py-unified-by-default.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8355
Yaniv Aknin yaniv.ak...@gmail.com added the comment:
pitrou, re. test code: I actually started with the test code, so that part is
done.
I opted to use a forked SocketServer rather than threads. I'm not an expert on
the low-level details of a multi-threaded process receiving threads, but it
Torne Wuff torne-pythonb...@wolfpuppy.org.uk added the comment:
I suspect a better message could be invented, but I'm not sure what :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6650
New submission from Martin Zimmermann i...@posativ.org:
try this:
x = (05, 06, 07)
y = (08, 09, 019)
you will get SyntaxError: invalid token.
(also in python 2.5.2)
--
components: Interpreter Core
messages: 102706
nosy: posativ
severity: normal
status: open
title: SyntaxError: integer
Ezio Melotti ezio.melo...@gmail.com added the comment:
The leading 0 is used to indicate octal numbers, and 8 and 9 are not valid
octal digits.
--
nosy: +ezio.melotti
resolution: - invalid
stage: - committed/rejected
status: open - closed
___
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Thanks for your suggestions on the test code. I will do that.
It seems like the hard-coded approach would be more brittle. For example, if
someone wants to replace __import__ with their own, e.g.
old__import__ =
Éric Araujo mer...@netwok.org added the comment:
Duly documented here:
http://docs.python.org/reference/lexical_analysis.html#numeric-literals
Regards
--
nosy: +merwok
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8356
Pascal Chambon chambon.pas...@gmail.com added the comment:
Well, it would break code which currently ignores that it fails, so it's more a
benefit than a loss for programmers imo.
I doubt the impact will be important though, because the io module is still
quite recent, and furthermore errors
Skip Montanaro s...@pobox.com added the comment:
Martin If it did eat the patch, we would have lost it by now: there is
Martin nothing in the history that shows that a file was attached at
Martin some point. More likely, Skip forgot to attach it when
Martin submitting this report.
Stefan Krah stefan-use...@bytereef.org added the comment:
5. uuid.getnode() can fall back to creating a random 48 bit number and
so can _windll_getnode() (by using UuidCreateSequential). Therefore,
in unlucky cases 0x can be generated and the assert in
check_node() will
Antoine Pitrou pit...@free.fr added the comment:
The docstring looks right to me. mode=0777 doesn't mean it takes a keyword
argument, only that this argument has a default value.
You might want to fix posixmodule to accept keyword arguments, but it should
probably be done for all functions
Éric Araujo mer...@netwok.org added the comment:
Hello
This is a recurrent problem with Python functions implemented in C. Since
introspection is not possible, developers have to use the first line of the
docstring to write the signature, including default arguments. With your patch,
people
Antoine Pitrou pit...@free.fr added the comment:
You're right that silencing IO errors is bad. Patch welcome.
--
nosy: +amaury.forgeotdarc, pitrou
priority: low - normal
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7865
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8354
___
___
Python-bugs-list mailing
Shashwat Anand anand.shash...@gmail.com added the comment:
The ideal right fix would be for C functions to support introspection - Agreed,
but then it will be needed to do so in quite a number of C codes.
--
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
A more attainable fix would be a way to mark up positional-only arguments that
have a default value.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8350
Stefan Krah stefan-use...@bytereef.org added the comment:
I do not understand the semantics of uuid.getnode(). Per the docs
it's supposed to return a hardware address. This would reasonably
make it a UUID version 1.
But then the random fallback should be a 47 bit number as per
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
I think you can simplify them a bit. For example, you can use assertRaises.
Actually, assertRaises doesn't seem to permit checking error text. That may be
one reason why try-except-else is being used instead throughout.
--
R. David Murray rdmur...@bitdance.com added the comment:
If the problem with the fix is that lots of tests use test_support.unlink, then
I don't see why the rename dance can't be implemented in test_support.unlink.
(Possibly conditioned on whether or not the tests are running on a windows
Changes by Nikolaus Rath nikol...@rath.org:
--
nosy: +Nikratio
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6715
___
___
Python-bugs-list mailing
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +nnorwitz, tim_one
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3581
___
___
Python-bugs-list
Yaniv Aknin yaniv.ak...@gmail.com added the comment:
Attached is the addition of the 'low_level' parameter to ZipFile. Included are
the parameter, a global switch controlling whether the parameter will raise an
Exception or trigger a DeprecationWarning (the latter, for now), updated tests
and
Éric Araujo mer...@netwok.org added the comment:
Hello
Comma-separated values are a Good Thing™, because you can have one notion
expressed with more than one “word”, e.g. “text processing”.
Could we edit a PEP to reflect this or is it too late? Should someone start a
discussion on a mailing
Éric Araujo mer...@netwok.org added the comment:
Forgot to add I suggest that someone with admin rights move this bug to
Distutils2.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1294032
New submission from Tim Kersten tim.kers...@lincor.com:
$ python setup.py install --root=/tmp/ --prefix=/usr
running install
error: must supply either home or prefix/exec-prefix -- not both
I believe that this should work. --root and --prefix are, from what I can tell,
two unrelated options.
Charles-Francois Natali neolo...@free.fr added the comment:
The effect of signal.siginterrupt(somesig, False) is reset the first time a
that signal is received. This is not the documented behaviour, and I do not
think this is a desireable behaviour. It renders siginterrupt effectively
Tarek Ziadé ziade.ta...@gmail.com added the comment:
Those are mutually exclusive:
--prefix : installation prefix
--root: install everything relative to this alternate root directory
root will install things into a completely alternate root and will use the
existing installation scheme
Stefan Krah stefan-use...@bytereef.org added the comment:
I reread http://www.ietf.org/rfc/rfc4122.txt and I'm pretty sure that
if getnode() is supposed to return a hardware address, one of the
following should be used:
1) If ifconfig etc. returns successfully, we are fine.
2) If
Tim Kersten tim.kers...@lincor.com added the comment:
I fail to see how these are, or at least should be mutually exclusive. Upon
reading your reply I would think that if one was to specify both a --prefix and
--root that the prefix would be relative to the --root.
i.e. --prefix changes the
Eric Smith e...@trueblade.com added the comment:
This would be easier to review if the patch were generated with 'svn diff'.
That said, it looks okay in concept to me, although I couldn't apply it and
test without manually mucking with the patch.
2.6 is in bugfix mode, so it can't be changed
Tarek Ziadé ziade.ta...@gmail.com added the comment:
== prefix ==
With prefix, you need to make sure the target site-packages is in your
PYTHONPATH:
PYTHONPATH=/tmp/foo/lib/python2.6/site-packages/ python setup.py install
--prefix=/tmp/foo
And here, prefix is used as the base location,
Darryl Miles darryl.mi...@darrylmiles.org added the comment:
I've updated my attachment to the bug, if you read the old one please re-read
the updated version (since some points in there were not accurate).
With regards to the OpenSSL error return -1/ERROR_SYSCALL with errno==0 being
Changes by Darryl Miles darryl.mi...@darrylmiles.org:
Removed file: http://bugs.python.org/file16838/python_ssl.c.txt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8108
___
Tim Kersten tim.kers...@lincor.com added the comment:
Ok, this is embarrassing. :-/
$ python setup.py install --root=/tmp/ --prefix=/usr
running install
error: must supply either home or prefix/exec-prefix -- not both
The above is not caused by specifying both --root and --prefix as I had
New submission from Jason R. Coombs jar...@jaraco.com:
I'm using Python 3.1.2 64-bit on Windows.
I've found that even if absolute_import is imported from __future__, 2to3
will convert imports to be treated as relative.
To demonstrate this behavior, I created a small package abs_imp_test
Jason R. Coombs jar...@jaraco.com added the comment:
More importantly, is there a workaround for main.py that will work in Python 2,
and in Python 3 after 2to3, that doesn't require any module renaming?
--
___
Python tracker rep...@bugs.python.org
Jason R. Coombs jar...@jaraco.com added the comment:
I found a workaround by excluding the import fixer that seems to work.
For the example,
2to3 -x import abs_imp_test
The command still modifies main, but it only removes the __future__ directive
and doesn't modify the imports.
For my
R. David Murray rdmur...@bitdance.com added the comment:
For what it is worth, the unix 'diff' command does not produce unified format
by default. It doesn't produce the format diff.py does by default either,
though.
Our normal policy is not to change an interface unless there's a strong
Changes by R. David Murray rdmur...@bitdance.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8357
___
___
Senthil Kumaran orsent...@gmail.com added the comment:
Hello Michael,
Looking a bit deeper into this issue, I don't see that 'x://' and 'x:///y'
qualifies as valid URLS as per RFC 3986. (Well, urlparse has been not strictly
conforming to it, but that is a different issue)
If you look at the
Tarek Ziadé ziade.ta...@gmail.com added the comment:
Ooops you are right, I messed up too in my explanation, I mischecked the code.
root and home are mutually exclusive, not root and prefix.
In any case, all those options are making it really hard to understand.
I'd like to make this story
Senthil Kumaran orsent...@gmail.com added the comment:
What is referred to as URL-encoded or URL encoded is technically
'percent-encoding'. Consistency would desirable and I think 'URL encoded' is
okay. It involves a minor change in removing '-' in some places. Once trunk
opens, I shall make
Fernando Perez fdo.pe...@gmail.com added the comment:
Hey Yarick,
On Thu, Apr 8, 2010 at 18:53, Yaroslav Halchenko rep...@bugs.python.org w=
rote:
In PyMVPA we have our little decorator as an alternative to Fernando's ge=
nerators, =A0and which is closer, I think, to what Michael was wishing
Yaroslav Halchenko yarikop...@gmail.com added the comment:
Fernando, I agree... somewhat ;-)
At some point (whenever everything works fine and no unittests fail) I wanted
to merry sweepargs to nose and make it spit out a dot (or animate a spinning
wheel ;)) for every passed unittest, so
Tim Kersten tim.kers...@lincor.com added the comment:
Such an option would be useful indeed.
An idea, though perhaps it's overkill, would be to show the current values of
the options causing problems, specifically if they come from a config file or
environment variable.
i.e. when setup.cfg
Charles-Francois Natali neolo...@free.fr added the comment:
Attached are two patches:
- test_signal_siginterrupt.diff is a patch for Lib/test/test_signal.py to check
for this problem (more than one signal received after calling
signal.siginterrupt())
before:
$ ./python Lib/test/regrtest.py
Éric Araujo mer...@netwok.org added the comment:
Hello.
I’m not a native speaker, but I know that you need hyphens inside adjectives:
URI-encoded, percent-encoded, built-in 0.2 wink, etc.
I’m willing to produce a patch that changes “URL-encoded” to “percent-encoded”.
Regards
--
Changes by Charles-Francois Natali neolo...@free.fr:
Added file: http://bugs.python.org/file16848/signal_noreinstall.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8354
___
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +merwok
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8357
___
___
Python-bugs-list mailing
Changes by Antoine Pitrou pit...@free.fr:
--
assignee: - janssen
nosy: +janssen
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7927
___
___
Changes by Antoine Pitrou pit...@free.fr:
--
assignee: - janssen
nosy: +janssen
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7943
___
___
Antoine Pitrou pit...@free.fr added the comment:
Is it a dup of issue1785?
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7425
___
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8358
___
___
Antoine Pitrou pit...@free.fr added the comment:
Wouldn't it be nicer if mode was a property?
Good point. I guess it would indeed...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8240
anatoly techtonik techto...@gmail.com added the comment:
Attached is 'svn diff'. Previous one was taken directly from Mercurial Queue,
which is a pretty awesome thing to use.
--
Added file:
http://bugs.python.org/file16849/8355.diff-py-unified-by-default.svn.diff
Éric Araujo mer...@netwok.org added the comment:
Some diff-emitting utilities only support unified format, but if diff.py is
supposed to be a diff(1) replacement, changing default options seems bad.
Eric, I think “patch -p1 file” would have done the trick, without manual
mucking.
Regards
Benjamin Peterson benja...@python.org added the comment:
Fixed in r79917.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8358
___
Fernando Perez fdo.pe...@gmail.com added the comment:
Yarick: Yes, I do actually see the value of the summary view. When I have a
parametric test that fails, I tend to just run nose with -x so it stops at the
first error and with the --pdb options to study it, so I simply ignore all the
Eric Smith e...@trueblade.com added the comment:
I tried -p1 and it failed, but no matter. The contents were clear enough, and
exactly how I would have changed the code.
$ patch -p1 8355.diff-py-unified-by-default.diff
patching file Tools/scripts/diff.py
Hunk #1 FAILED at 13.
Hunk #2 FAILED
anatoly techtonik techto...@gmail.com added the comment:
It is not a diff replacement. Its output, as David noted, is not a diff output
format and can not be reliably parsed due to issue7585 and issue7582
combination.
For being a diff replacement it will have to get rid of .py extension and
Éric Araujo mer...@netwok.org added the comment:
Your use case and rationale make sense to me. I’d be +0.5 if I had a voice :)
Regards
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8355
Michael Foord mich...@voidspace.org.uk added the comment:
If we provide builtin support for parameterized tests it will have to report
each test separately otherwise there is no point. You can already add support
for running tests with multiple parameters yourself - the *only* advantage of
Brian Curtin cur...@acm.org added the comment:
I'm with Eric, -0. I don't really think the change is necessary.
--
nosy: +brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8355
___
Yaniv Aknin yaniv.ak...@gmail.com added the comment:
I've updated the sample code to run with Python 3 and tested on Ubuntu 9.10
with and without setting subprocess._has_poll = False.
As expected, when using poll() the sample runs correctly.
When not using poll() the sample breaks (sometimes
Antoine Pitrou pit...@free.fr added the comment:
After some investigation, the error does occur because of the aforementioned
changelog entry (SSLv2 weak ciphers are now disabled by default). To check it I
just added the following line to newPySSLObject():
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
David, yes messing about with processor affinities is certainly not nice.
Especially since the issue is cross-platform.
The pthreads api doesn't offer much. There is pthreadd_setschedparam(), and
pthreads_setconcurrency().
anatoly techtonik techto...@gmail.com added the comment:
If it really improves multicore performance and none of our test fail (even in
memory/resource/time survival tests) then I'd give it a try even after a beta.
2.x is still the best practical version out there.
--
nosy: +techtonik
R. David Murray rdmur...@bitdance.com added the comment:
It doesn't look like it is the same bug to me. This one is more general.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7425
Antoine Pitrou pit...@free.fr added the comment:
The tests don't look good to me. You should use p.communicate() rather than
p.stdout.read(). Also, check the error return code and raise an error if it's
non-zero.
--
nosy: +pitrou
___
Python tracker
Philip Jenvey pjen...@underboss.org added the comment:
Patch with tests (which can only really test it on Windows) here
http://bitbucket.org/pjenvey/et-2009-provolone/changeset/8292a06090a3/
--
___
Python tracker rep...@bugs.python.org
Changes by Brian Curtin cur...@acm.org:
--
nosy: +brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7334
___
___
Python-bugs-list mailing
100 matches
Mail list logo