New submission from Trung Doan:
In Python 2.5.4's config-main.cfg file, if [EditorWindow]'s width and height
are left blank or set to zero, then IDLE window won't show. Uninstalling and
re-installing Python didn't help. Problem solved only when the config-main.cfg
file was manually edited to
2012/11/20 Christian Heimes rep...@bugs.python.org
IFF we are going to walk the hard and rocky road of exception handling,
then we are going to need at least four hooks and a register function that
takres four callables as arguments: register(prepare, error, parent,
child). Each prepare()
Kristján Valur Jónsson added the comment:
Antoine, I understand that _you_ may not see any need for object references in
marshal streams. Also, I am not going to try to convince you it is a good
idea, since I have long figured out that you are against any contributions from
me on some sort
Mark Dickinson added the comment:
I have long figured out that you are against any contributions from
me on some sort of principle.
I suspect that Antoine's principles have very little to do with *who* the
contributions originate from, and much more to do with the content of those
Kristján Valur Jónsson added the comment:
Serhiy, to answer your questions:
Can you please measure the time of unmarshalling?
Sure. Normally, I wouldn't consider time to be important here because for code
objects, unmarshaling is done only once per run However, testing it is simple:
I added
New submission from Joril:
imghdr doesn't support jpegs that include an ICC Profile.
This is because imghdr looks for JFIF somewhere at the beginning of the file,
but the ICC_PROFILE shifts that further.
(The ICC spec is here http://www.color.org/specification/ICC1v43_2010-12.pdf,
annex B)
Ezio Melotti added the comment:
Can you provide a patch?
--
nosy: +ezio.melotti
stage: - needs patch
versions: +Python 3.4 -Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16512
Joril added the comment:
I can try, yes. I'll add one ASAP
--
versions: +Python 2.7 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16512
___
Kristján Valur Jónsson added the comment:
New patch, incorporating suggested fixes from review.
--
Added file: http://bugs.python.org/file28047/marshalinstance.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16475
Serhiy Storchaka added the comment:
Thank you, Kristján, for the statistics. It makes your proposition more
attractive.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16475
___
Kristján Valur Jónsson added the comment:
New patch with changes.
--
Added file: http://bugs.python.org/file28048/marshalinstance.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16475
Ezio Melotti added the comment:
Have you tried with HTMLParser?
sgmllib is deprecated and has been removed in Python 3.
HTMLParser is also much better at parsing (broken) HTML.
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
Mark Dickinson added the comment:
Thanks for the bug report. Are you in a position to test whether this is still
an issue for Python 2.7? (Python 2.5 is no longer maintained.)
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
moonflow added the comment:
I haven't tried it, the problem will not process?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16513
___
___
Ezio Melotti added the comment:
If what you are trying to do is extracting the link(s) that contain 'cve', you
try the attached script.
--
Added file: http://bugs.python.org/file28050/issue16513.py
___
Python tracker rep...@bugs.python.org
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16500
___
___
Ezio Melotti added the comment:
Sorry, I misread your code, looks like you want the href *without* 'cve'.
In that case change my code to use 'cve' not in attrs['href'] (also avoid
using s.find('cve') == -1 , and use the more readable and idiomatic 'cve' not
in s ).
I think your original
Changes by Amaury Forgeot d'Arc amaur...@gmail.com:
--
nosy: +amaury.forgeotdarc -Amaury.Forgeot.d'Arc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16500
___
New submission from Barry A. Warsaw:
When sys.path[0] is None, attempting to import a module produces a cryptic
chained traceback. This is a regression from 3.2 where the import would
succeed.
The basic issue is that in 3.2's import.c, non-string/bytes items on sys.path
are essentially
Richard Oudkerk added the comment:
IFF we are going to walk the hard and rocky road of exception handling,
then we are going to need at least four hooks and a register function that
takres four callables as arguments: register(prepare, error, parent,
child). Each prepare() call pushes an
Serhiy Storchaka added the comment:
Personally I don't like the use of macros inn this code. I think that without
them the code would be clearer.
If anyone is interested, here are the statistics for all the standard modules
(Lib/__pycache__/*.pyc).
UNICODE 105248 61%
TUPLE
Richard Oudkerk added the comment:
http://hg.python.org/sandbox/sbt#spawn now contains support for starting
processes via a separate server process. This depends on fd passing support.
This also solves the problem of mixing threads and processes, but is much
faster than using fork+exec. It
Barry A. Warsaw added the comment:
Patch for 3.3, omitting the requisite importlib.h change.
--
keywords: +patch
Added file: http://bugs.python.org/file28051/16514.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
Barry A. Warsaw added the comment:
Oh, the patch includes the removal of some unused imports from test_path.py,
thanks to pyflakes.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +brett.cannon, eric.smith, eric.snow, jason.coombs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
___
Kristján Valur Jónsson added the comment:
Changes as suggested by Serhiy
--
Added file: http://bugs.python.org/file28052/marshalinstance.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16475
Christian Heimes added the comment:
Amaury:
PyPy doesn't handle exceptions in hooks. Is there a reason why PyPy goes for
the simplistic approach?
Richard:
An error callback has the benefit that the API can notice the hooks that some
error has occurred. We may not need it, though.
I can think
Amaury Forgeot d'Arc added the comment:
PyPy doesn't handle exceptions in hooks.
Is there a reason why PyPy goes for the simplistic approach?
Probably because nobody thought about it.
At the moment, there is only one 'before', one 'parent' hook (so the FILO order
is simple), and three
Kristján Valur Jónsson added the comment:
The size of the .pyc files is secondary. The size that is important is the
memory footprint of loaded code objects, which can be done by stripping and
folding code objects.
This works springs out of work for embedding python on the PS3 console where
Eric V. Smith added the comment:
I agree it's a bug. And the fix looks good to me.
Having said that: I haven't looked at the import.c version to verify what is
happening. Does the test pass under 3.2?
--
___
Python tracker rep...@bugs.python.org
Changes by Phil Elson pelson@gmail.com:
Added file: http://bugs.python.org/file28053/pelson_warnings_fix_2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16382
___
Barry A. Warsaw added the comment:
Oh, btw, I intend to add documentation that makes explicit:
* sys.path entries must be strings or bytes, everything else is ignored
* path importers should expect strings or bytes
* the encoding of bytes is left to the individual path hooks to define, however
Antoine Pitrou added the comment:
However, even if you cannot agree that it is a good idea, can you
explain to me how it is a BAD idea? How can expanding object
references to strings to all objects, using the same mechanism, be
bad?
It is a bad idea because features have to be supported in
Joril added the comment:
Here it is... It is against the latest hg version, should I write one for 2.7
too?
--
keywords: +patch
Added file: http://bugs.python.org/file28054/imghdr_icc_jpeg.patch
___
Python tracker rep...@bugs.python.org
Ezio Melotti added the comment:
Thanks for the patch.
should I write one for 2.7 too?
Not necessary, 2.7 only gets bugs fixes.
OTOH it would be nice to have some tests for this new features (and for the
module in general), but there doesn't seem to be any Lib/test/test_imghdr.py
file. The
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
___
___
Antoine Pitrou added the comment:
By the way, please follow PEP 8 in test_marshal.py.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16475
___
Serhiy Storchaka added the comment:
Here is the statistics for all pyc-files (not only in Lib/__pycache__). This
includes encoding tables and tests. I count also memory usage for some types
(for tuples shared size is estimated upper limit).
type count % size shared %
Serhiy Storchaka added the comment:
Here is the statistics for all pyc-files (not only in Lib/__pycache__). This
includes encoding tables and tests. I count also memory usage for some types
(for tuples shared size is estimated upper limit).
type count % size shared %
Changes by Serhiy Storchaka storch...@gmail.com:
--
Removed message: http://bugs.python.org/msg176012
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16475
___
Antoine Pitrou added the comment:
Here is the statistics for all pyc-files (not only in
Lib/__pycache__). This includes encoding tables and tests. I count
also memory usage for some types (for tuples shared size is estimated
upper limit).
Did you examine the sharing per file or among all
Serhiy Storchaka added the comment:
Per file. With total sharing:
UNICODE 622812 58%26105085 18262484 70%
TUPLE 224214 21% 8184848 4007404 49%
STRING 90992 8.4%6931342 1361618 20%
INT 52087 4.8% 71540095666 13%
CODE
Serhiy Storchaka added the comment:
Total size of all *.pyc files is 22 MB.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16475
___
___
Martin v. Löwis added the comment:
Am 20.11.12 17:32, schrieb Kristján Valur Jónsson:
The size of the .pyc files is secondary.
This really depends on whom you ask. When I did the string interning
support, the primary concern *was* for the size of the pyc files, and
there *was* a real project
Martin v. Löwis added the comment:
Am 20.11.12 18:02, schrieb Antoine Pitrou:
It is a bad idea because features have to be supported in the long-term,
which means more maintenance effort. So, basically, this is the same
reason we don't accept every feature request + patch that gets posted
to
Gregory P. Smith added the comment:
I think you are solving a non-problem if you want to expose exceptions from
such hooks. Nobody needs it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16500
Antoine Pitrou added the comment:
I think you are solving a non-problem if you want to expose exceptions from
such hooks. Nobody needs it.
Agreed.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16500
Barry A. Warsaw added the comment:
On Nov 20, 2012, at 04:51 PM, Eric V. Smith wrote:
I agree it's a bug. And the fix looks good to me.
Thanks.
Having said that: I haven't looked at the import.c version to verify what is
happening. Does the test pass under 3.2?
Yep. See below. When you
Christian Heimes added the comment:
Your suggestion is that the hooks are called as:
for hook in hooks:
try:
hook()
except:
try:
sys.excepthook(*sys.exc_info())
except:
pass
That makes the implementation much easier. :)
--
Changes by Barry A. Warsaw ba...@python.org:
--
title: Cryptic traceback when sys.path - Cryptic traceback when sys.path[0] is
None
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
___
Roger Serwy added the comment:
This is still a bug with 2.7 and 3.4. I just tried leaving the width and height
fields in config-main.cfg and IDLE had raised the error:
_tkinter.TclError: expected integer but got
The width and height keys in the text_options dictionary in EditorWindow.py
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16511
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
When width or height are 0, IDLE starts and show window with some minimal width
or height. When width or height are empty or invalid IDLE can't start.
The proposed patch makes IDLE more resistant against such broken configs.
--
keywords: +patch
Roundup Robot added the comment:
New changeset 291406748217 by Barry Warsaw in branch '3.3':
- Issue #16514: Fix regression causing a traceback when sys.path[0] is None
http://hg.python.org/cpython/rev/291406748217
New changeset a82ee9a1457a by Barry Warsaw in branch 'default':
- Issue #16514:
Roger Serwy added the comment:
Serhiy, I applied your patch and it works. However, the initial window size in
IDLE Preferences-General are listed as None instead of a number.
Perhaps if the userCfg has an invalid value then the defaultCfg should be
returned?
--
versions: +Python 2.6,
Roger Serwy added the comment:
Changed from Crash to Behavior, as the interpreter is not crashing. Also undid
my mistake of re-adding 2.6 and 3.1.
--
type: crash - behavior
versions: -Python 2.6, Python 3.1
___
Python tracker rep...@bugs.python.org
Changes by Barry A. Warsaw ba...@python.org:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
___
Serhiy Storchaka added the comment:
Perhaps if the userCfg has an invalid value then the defaultCfg should be
returned?
Yes, you are right. Thanks for suggestion.
--
Added file: http://bugs.python.org/file28057/idle_safe_getoption_2.patch
___
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28056/idle_safe_getoption.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16511
___
Roundup Robot added the comment:
New changeset 10314c9b7c5a by Antoine Pitrou in branch '2.7':
Issue #1160: Fix compiling large regular expressions on UCS2 builds.
http://hg.python.org/cpython/rev/10314c9b7c5a
--
nosy: +python-dev
___
Python tracker
Roundup Robot added the comment:
New changeset a3579d766fb6 by Antoine Pitrou in branch '3.2':
Issue #1160: Fix compiling large regular expressions on UCS2 builds.
http://hg.python.org/cpython/rev/a3579d766fb6
New changeset 8b73a069ae4f by Antoine Pitrou in branch '3.3':
Merge test from issue
Antoine Pitrou added the comment:
I've committed the patch to 3.2 and 2.7, and added the test to 3.3 and default.
Thank you!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker
Serhiy Storchaka added the comment:
Patch updated. Added warning for case when user config broken. Thanks Roger for
suggestion.
--
Added file: http://bugs.python.org/file28058/idle_safe_getoption_3.patch
___
Python tracker rep...@bugs.python.org
Paul A. added the comment:
On Sun, Nov 18, 2012 at 08:01:39PM +, Terry J. Reedy wrote:
I should have added 'please try compiling 3.x to make sure it has the same
problem' since configure might behave differently.
I'm fairly sure I did, that was quite a few months ago, so my memory
could
New submission from Chris Jerdonek:
The below should probably say something along the lines of max expected 1
positional arguments (since the foo value is an argument):
max(foo=1)
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: max expected 1 arguments, got 0
I
Terry J. Reedy added the comment:
Yes, and ditto for 3.x if the patch needs to be altered.
--
title: ia64-hp-hpux11.31 won't compile Python-2.6.8rc2 without
-D_TERMIOS_INCLUDED - ia64-hp-hpux11.31 won't compile 2.7 without
-D_TERMIOS_INCLUDED
___
Stefan Krah added the comment:
I think I fixed this yesterday in #6308. Please try with a current 2.7,
3.3 or 3.4 clone.
--
nosy: +skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14525
Carl Meyer added the comment:
Here is the bug filed against virtualenv that led to the addition of the local/
directory: https://github.com/pypa/virtualenv/issues/118
As Vinay pointed out, the original fix was later modified to be friendlier to
tools that dislike recursive symlinks.
That's
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
title: TypeError message incorrect for max() with no args - TypeError message
incorrect for max() with one keyword arg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16515
Hans Larsen added the comment:
-Oprindelig meddelelse-
From: Martin v. Löwis
Sent: Saturday, November 17, 2012 2:45 PM
To: jo...@mail.dk
Subject: [issue16491] try-except-raise-bug
Martin v. Löwis added the comment:
That looks like a bug/missing feature in PythonWin to me, which
Roundup Robot added the comment:
New changeset f32f1cb508ad by Chris Jerdonek in branch '3.2':
Improve str() and object.__str__() documentation (issue #13538).
http://hg.python.org/cpython/rev/f32f1cb508ad
New changeset 6630a1c42204 by Chris Jerdonek in branch '3.3':
Null merge from 3.2 (issue
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13538
New submission from Joel Nothman:
The argparse documentation states that type= can take any callable that takes
a single string argument and returns the converted value. The following is an
exception:
import argparse
ap = argparse.ArgumentParser()
ap.add_argument('foo',
New submission from Chris Jerdonek:
The null-merge instructions in the devguide (in the note box in the section
linked to below):
http://docs.python.org/devguide/committing.html#porting-within-a-major-version
are incomplete if the merge created conflicts. It would help to include
New submission from Chris Jerdonek:
This issue is to add buffer protocol (or perhaps buffer object) to the
glossary. The concept is currently described here:
http://docs.python.org/dev/c-api/buffer.html#buffer-protocol
Éric initially suggested doing this in the comments to issue 13538.
Such
New submission from Christian Heimes:
While I was testing #16499 I found a small bug in the venv code of the site
module. The code in site.venv() doesn't use abspath() to sanitize the path to
executable_dir. This leads to wrong behavior when a venv is created in the root
of a hg checkout and
76 matches
Mail list logo