paul j3 added the comment:
Correction: The patch I gave in the last message produces:
parser.parse_known_args(['-ku'])
(Namespace(known=False), ['u'])
It doesn't take action on the '-k', and puts 'u' in extras, not '-u'.
This new patch gets it right:
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
versions: -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16631
___
Serhiy Storchaka added the comment:
I can't reproduce this on 2.7.4. Could you please test 2.7.4?
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17865
___
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17865
___
___
Mark Dickinson added the comment:
Hmm: it's not an obvious Python bug, either: both math.exp and math.ceil are
simple wrappers around the libm functions, so there's little room for things to
go wrong between Python and the OS.
Are you in a position to compile Python from source on your
Ben Read added the comment:
I've tried this and it looks like write access is already enabled, but I
entered the commands you listed all the same - here's the output:
Bens-iMac:~ ben$ cd
Bens-iMac:~ ben$ ls -lde
drwxr-xr-x 28 temp staff 952 28 Apr 18:46 .
Bens-iMac:~ ben$ mkdir /.idlerc
Serhiy Storchaka added the comment:
Oh, sorry, I missed PowerPC. Please ignore my previous comment.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17865
___
Miguel Latorre added the comment:
This bug is still present in python 2.7.4 and python 3.3.1.
I attach another example, the result differs depending on number of lines to
process (see test.py).
--
nosy: +mal
versions: +Python 2.7, Python 3.3
Added file:
Ellen Wang added the comment:
OK. My bad. I should have been tipped off that the program didn't need -lm to
link. Output from C code:
0.135335
1
0.239022
Feel free to close. I'll have to look into this on my own. Thanks and sorry.
--
___
New submission from Ronald Oussoren:
assertItemsEqual was added to unittest.TestCase in Python 2.7 (according to the
documentation), but is not present in Python 3.3.
I'd expect it to be present in 3.3 as well, or for it to be mentioned in
documentation as not being present (either in the 2.7
Ezio Melotti added the comment:
I don't remember how it went exactly, but there were a few similar methods
(assertItemsEqual, assertSameElements, assertCountEqual). In 3.x we eventually
decide to remove the first 2 because it wasn't clear what they were doing, and
only assertCountEqual
Ronald Oussoren added the comment:
I do think this should be mentioned in the 2.7 docs, assertDictContainsSubset
is mentioned as deprecated since 3.2 in the 2.7 docs. The only problem with
that is that there doesn't seem to be a versionremoved directive in sphinx,
the best alternative seems
Mark Dickinson added the comment:
No problem; thanks for the update. By the way, if you do file an OS bug report
of some form, it would be great if you could add a link to this issue. That
might help anyone who encounters this in Python in the future.
Closing.
--
resolution: -
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17866
___
___
Python-bugs-list
Ezio Melotti added the comment:
I think they might actually be the same (i.e. the name changed but not the
implementation). See #10242.
If this is true the new name could be mentioned in 2.7.
--
___
Python tracker rep...@bugs.python.org
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10242
___
___
Python-bugs-list
Miroslav Stampar added the comment:
This trivial patch solved the issue (reported back by user):
def _(self, *args):
return self._readline()
httplib.LineAndFileWrapper._readline = httplib.LineAndFileWrapper.readline
httplib.LineAndFileWrapper.readline = _
--
Ronald Oussoren added the comment:
You're right, according to #10242 the method was renamed in 3.2.
Something like the attached patch?
I'm somewhat flabbergasted that #10242 came to the conclusion that it would be
a good idea to rename this method, given the folks that contributed the
Ezio Melotti added the comment:
Apparently assertItemsEqual was added to 2.7 and 3.2 and, after the release of
2.7 but before the release of 3.2, assertItemsEqual has been renamed
assertCountEqual (596239da3db7) and initially the assertItemsEqual was
available too. However, since the method
Ezio Melotti added the comment:
Looks like we wrote a similar patch at the same time :)
We don't usually use versionchanged in the 2.x docs for things that changed in
3.x. Using named instead of renamed is better, since in 3.x the name was
assertCountEqual since the beginning, however saying
Ronald Oussoren added the comment:
Your patch looks good.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17866
___
___
Python-bugs-list mailing
Roundup Robot added the comment:
New changeset d9921cb6e3cd by Ezio Melotti in branch '2.7':
#17866: mention that in Python 3, assertItemsEqual is named assertCountEqual.
http://hg.python.org/cpython/rev/d9921cb6e3cd
--
nosy: +python-dev
___
Python
Ezio Melotti added the comment:
Applied.
--
assignee: docs@python - ezio.melotti
components: -Library (Lib)
resolution: - fixed
stage: - committed/rejected
status: open - closed
versions: +Python 2.7 -Python 3.3, Python 3.4
___
Python tracker
Ned Deily added the comment:
The ls shows that, for some reason, your home directory is owned by user
temp, not by user ben. That's not good. Try doing this:
sudo chown ben /Users/ben/
But we're way past an IDLE or Python problem here. This is a basic Unix system
administration issue.
Ramchandra Apte added the comment:
I'm saying that they aren't valid grammar mistakes (there is no grammar
mistake). I agree with Georg Brandl's comment.
On 27 April 2013 20:18, Andriy Mysyk rep...@bugs.python.org wrote:
Andriy Mysyk added the comment:
Ramachandra, if I understand you
New submission from Dmi Baranov:
Simple case - let's delete __import__ and try to import anything
$ python3.3
Python 3.3.0 (default, Oct 7 2012, 11:03:52)
[GCC 4.4.3] on linux
Type help, copyright, credits or license for more information.
del __builtins__.__dict__['__import__']
import os
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +brett.cannon, ezio.melotti
stage: - test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17867
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17834
___
___
Raymond Hettinger added the comment:
Daniel, I've already been in the process of adding a class to the heapq module
and have done substantial work on it over the last few months. I'll look at
your code to see if there are any ideas that should be merged with it before I
finish it up.
Am
Raymond Hettinger added the comment:
See also http://bugs.python.org/issue17794
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17834
___
___
Raymond Hettinger added the comment:
Daniel, I'm going to close this one so we can continue work in just a single
tracker item: http://bugs.python.org/issue17794
I'll see if anything in your code should be merged in to mine and will list you
as a co-contributor when it all goes in.
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
Removed message: http://bugs.python.org/msg188061
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17834
___
Raymond Hettinger added the comment:
[Antoine]
I would like to call this a critical regression.
I concur.
I will post the suggested fix with tests.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15535
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
priority: low - normal
Added file: http://bugs.python.org/file30062/heap2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
Raymond Hettinger added the comment:
Amaury, please go ahead and apply your patch.
--
assignee: rhettinger - amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15535
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
Removed message: http://bugs.python.org/msg188063
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15535
___
Raymond Hettinger added the comment:
Daniel, I'm going to close this one so we can continue work in just a single
tracker item: http://bugs.python.org/issue13742
I'll see if anything in your code should be merged in to mine and will list you
as a co-contributor when it all goes in.
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
Removed message: http://bugs.python.org/msg188062
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17834
___
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17867
___
___
Python-bugs-list
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15535
___
___
Python-bugs-list
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Added file: http://bugs.python.org/file30063/heap2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Removed file: http://bugs.python.org/file30062/heap2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Mark Dickinson added the comment:
heap2.diff contains only a single line's change. Wrong file attached?
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Mark Dickinson added the comment:
Ah, I see the new file now (I'd failed to refresh my browser); sorry for the
noise.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Dmi Baranov added the comment:
Another example of post-effects:
del __builtins__.__dict__['__import__']
1/0
Traceback (most recent call last):
File stdin, line 1, in module
Fatal Python error: __import__ missing
Current thread 0x7f3db64fd700:
Aborted
--
Benjamin Peterson added the comment:
Technically its not a crash but a fatal error. That's not to say its desirable,
of course. :)
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17867
Roundup Robot added the comment:
New changeset 08ce30768003 by Benjamin Peterson in branch '3.3':
raise an ImportError (rather than fatal) when __import__ is not found in
__builtins__ (closes #17867)
http://hg.python.org/cpython/rev/08ce30768003
--
nosy: +python-dev
resolution: -
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
title: Bad sys.stdin assignment hands interpreter. - Bad sys.stdin assignment
hangs interpreter.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17863
Roundup Robot added the comment:
New changeset 68d1ac152b5d by Benjamin Peterson in branch '3.3':
ignore errors when trying to fetch sys.stdin.encoding (closes #17863)
http://hg.python.org/cpython/rev/68d1ac152b5d
New changeset 97522b189c79 by Benjamin Peterson in branch 'default':
merge 3.3
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17861
___
___
Python-bugs-list
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17839
___
___
Python-bugs-list
Roger Serwy added the comment:
This looks like a duplicate of issue8231.
--
nosy: +roger.serwy
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17864
___
Kyle Roberts added the comment:
Thanks for the comments Antoine. I didn't have a good reason for using the file
name at the time, although even when using the file name I should have used the
file variable that was already created. I tried using the file descriptor,
but I encountered a [Errno
Changes by Sarah sarahpythoni...@gmail.com:
--
nosy: +Sarah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2704
___
___
Python-bugs-list mailing
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17852
___
___
Python-bugs-list
Kushal Das added the comment:
As we discussed on #python-dev channel this new patch includes the script in
Tools/scripts/generate_opcode_h.py and it also contains the required
Makefile.pre.in change so that it gets auto(re)generated at compile time if
required.
--
keywords: +patch
STINNER Victor added the comment:
In Python 2, a buffered file opened for writing is flushed by the C library
when the process exit.
When you say Python 2, I assume you mean CPython 2, right?
Because - AFAICT - files got flushed only by accident, not by design.
It looks to be a feature of
Ben Harper added the comment:
This issue, like 14572, is also effecting Python 2.7.4 on CentOS 5. I can
confirm the patch fixes this issue on CentOS5.
--
nosy: +bharper
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17857
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17861
___
Charles-François Natali added the comment:
When you say Python 2, I assume you mean CPython 2, right?
Because - AFAICT - files got flushed only by accident, not by design.
It looks to be a feature of the standard C library, at least the GNU libc.
Its libio library installs an exit handler
Ezio Melotti added the comment:
Here's a patch that adds bytes-like object to the glossary, links to the
buffer protocol docs[0] and provides bytes and bytearray as examples.
[0]: http://docs.python.org/dev/c-api/buffer.html#buffer-protocol
--
keywords: +patch
stage: needs patch -
Kushal Das added the comment:
Version 2 of the patchset edited as per review.
--
Added file: http://bugs.python.org/file30066/issue17861_v2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17861
Changes by Ian Cordasco graffatcolmin...@gmail.com:
--
nosy: +icordasc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12458
___
___
Mark Dickinson added the comment:
Looks pretty good to me.
- There's a bonus print call in the diff.
- Should the len(self._data) call be protected by the lock? I can't
immediately think of any reason why that would be necessary (e.g., pushpop nd
poppush never change the size of self._data,
New submission from Serhiy Storchaka:
Here is a patch with which pprint formats long bytes objects which contain
non-ascii or non-printable bytes as a hexdump.
Inspired by Antoine's wish
(http://permalink.gmane.org/gmane.comp.python.ideas/20329).
--
components: Library (Lib)
files:
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17857
Kushal Das added the comment:
In Objects/typeobject.c we have subtype_setdict function, in which at line 1830
we have PyDict_Check() macro call, which checks if it is a subclass of dict or
not.
The definition is in Include/dictobject.h
#define PyDict_Check(op) \
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12458
___
___
Marc-Andre Lemburg added the comment:
Thanks, Serhiy.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17857
___
___
Python-bugs-list mailing list
Ezio Melotti added the comment:
A couple of comments:
1) A separate function might be better. I think this kind of output would be
more useful while inspecting individual byte objects, rather than having it for
arbitrary byte objects (that might be inside other containers).
2) I don't know
Changes by Fred L. Drake, Jr. fdr...@gmail.com:
--
nosy: -fdrake
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17868
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
There is already one heap class in the stdlib: queue.PriorityQueue. Why create
a duplicate instead extend queue.PriorityQueue with desired features?
May be name the maxheap parameter as reverse?
--
nosy: +serhiy.storchaka
Antoine Pitrou added the comment:
Yes, I think a separate function would be better. There's another issue for
pprint() of bytes with line continuations:
http://bugs.python.org/issue17530
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Here is a framing patch on top of Alexandre's work.
There is one thing that framing breaks: pickletools.optimize(). I think it
would be non-trivial to fix it. Perhaps the PREFETCH opcode is a better idea
for this.
Alexandre, I don't understand why you
Antoine Pitrou added the comment:
Ok, so this is a slightly annoying issue, but which isn't critical since
there's a workaround (catch the AttributeError). Therefore I'm inclined not to
change the behaviour in a bugfix release, for fear of regressions for people
who are used to the
Serhiy Storchaka added the comment:
What is wrong with GLOBAL?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17810
___
___
Python-bugs-list
Antoine Pitrou added the comment:
What is wrong with GLOBAL?
It uses the lame text mode that scans for newlines, and is generally
annoying to optimize. This is like C strings vs. Pascal strings.
http://www.python.org/dev/peps/pep-3154/#binary-encoding-for-all-opcodes
--
Dmi Baranov added the comment:
Added a patch
--
keywords: +patch
nosy: +dmi.baranov
Added file: http://bugs.python.org/file30069/issue17714.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17714
New submission from Giampaolo Rodola':
Traceback (most recent call last):
File setup.py, line 221, in module
... and much more ;)
File /home/giampaolo/svn/python/3.4/Lib/distutils/core.py, line 148, in
setup
dist.run_commands()
File
Roundup Robot added the comment:
New changeset 84cef4f1999a by Benjamin Peterson in branch 'default':
refactor traceback.py to reduce code duplication (closes #17646)
http://hg.python.org/cpython/rev/84cef4f1999a
--
nosy: +python-dev
resolution: - fixed
stage: - committed/rejected
Éric Araujo added the comment:
This change may be responsible for #17869
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16754
___
___
STINNER Victor added the comment:
It looks to be a feature of the standard C library, at least the GNU libc.
Yes, it's guaranteed by POSIX/ANSI (see man exit).
Hum, POSIX (2004) is not so strict:
Whether open streams are flushed or closed, or temporary files are
removed is
Serhiy Storchaka added the comment:
With framing it isn't annoying.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17810
___
___
Arfrever Frehtes Taifersar Arahesis added the comment:
Your Python seems to be built incorrectly. Maybe you forgot to re-run
'./configure ...; make' after updating working copy. Could you try in a new
working copy?
(I cannot reproduce this bug.)
--
nosy: +Arfrever
Alexandre Vassalotti added the comment:
Antoine, I removed STACK_GLOBAL when I found performance issues with the
implementation. The changeset that added it had some unrelated changes that
made it harder to debug than necessary. I am planning to re-add it when I
worked out the kinks.
Giampaolo Rodola' added the comment:
I'm sorry, you're right.
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17869
___
Éric Araujo added the comment:
:)
--
stage: - committed/rejected
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17869
___
___
Python-bugs-list
Éric Araujo added the comment:
False alarm, disregard my previous message.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16754
___
___
Antoine Pitrou added the comment:
With framing it isn't annoying.
Slightly less, but you still have to wrap readline() calls in the
unpickler.
I have started experimenting with PREFETCH, but making the opcode
optional is a bit annoying in the C pickler, which means it's simpler to
always emit
New submission from Devin Jeanpierre:
As far as I can tell, the only safe and correct way to convert a (for example)
intptr_t to a python long is something akin to the following:
size_t repsize = sizeof(intmax_t)*8 + 2;
char i_buf[repsize]; // enough to fit base 2 with sign, let alone
New submission from Piotr Dobrogost:
TextTestRunner's init as of 3.3.1 has
(http://hg.python.org/cpython/file/d9893d13c628/Lib/unittest/runner.py#l128)
the following parameters:
stream, descriptions, verbosity, failfast, buffer, resultclass, warnings
whereas docs
STINNER Victor added the comment:
Did you try PyLong_FromVoidPtr()?
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17870
___
___
Devin Jeanpierre added the comment:
PyLong_FromVoidPtr works for uintptr_t, but not intptr_t.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17870
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
keywords: +easy
stage: - needs patch
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17871
___
New submission from Serhiy Storchaka:
There is a buffer overflow in marshal.load() when len(read(n)) n.
Here is a sample.
--
components: Interpreter Core
files: marshal_bad_reader.py
messages: 188107
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status:
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: +Python 3.4 -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11632
___
___
Changes by Dmi Baranov dmi.bara...@gmail.com:
--
nosy: +dmi.baranov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17872
___
___
Python-bugs-list
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17872
___
___
Python-bugs-list mailing
A.M. Kuchling added the comment:
Updated version of the patch, applying many changes suggested by merwok:
* use ~curses.funcname notation for links.
* use 3-hyphen em-dash
* minor fixes to various examples
* rewrap long paragraphs (this makes the diff larger -- sorry!)
--
Added file:
Antoine Pitrou added the comment:
And here is an implementation of PREFETCH over Alexandre's work.
As you can see the code complexity compared to framing is mostly a wash, but I
think fixing pickletools.optimize() will be easier with PREFETCH (still needs
confirmation, of course :-)).
1 - 100 of 121 matches
Mail list logo