[issue2001] Pydoc interactive browsing enhancement

2010-11-13 Thread Nick Coghlan
Nick Coghlan added the comment: Just call warnings.warn with an appropriate message, a category of DeprecationWarning and a stacklevel of 2 (so the warning will refer to the function's caller rather than to the pydoc code). It's basically the example from the warnings.warn docs. --

[issue2001] Pydoc interactive browsing enhancement

2010-11-13 Thread Ron Adam
Ron Adam added the comment: Ok, here is the latest patch for review. "issue2001_a.diff' I restored the pydoc.py file and then put most of the new code in these two functions, _startserver(urlhandler, port) _browse(port=0, *, open_browser=True) This creates a bettor organized file, and r

[issue10415] readline.insert_text documentation incomplete

2010-11-13 Thread Justin Lebar
Justin Lebar added the comment: Actually, maybe startup_hook doesn't do what it sounds like it does and insert_text() only works from startup_hook. If this is the case, then the documentation for startup_hook could also be improved: > The startup_hook function is called with no arguments jus

[issue10415] readline.insert_text documentation incomplete

2010-11-13 Thread Justin Lebar
New submission from Justin Lebar : The readline documentation currently says: > readline.insert_text(string) > Insert text into the command line. But as far as I can tell, readline.insert_text() does something only when called from startup_hook or pre_input_hook. Here's an example of some

[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Bobby Impollonia
Bobby Impollonia added the comment: Attached is a patch for perf.py that goes along with the previous patch for make_perf3.sh. This patch changes the py3k group to include everything in the 2n3 group since we can still run all those tests after converting. Previously, nqueens, unpack_sequance

[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Bobby Impollonia
Bobby Impollonia added the comment: Patch is attached for make_perf3.sh to have it not convert things that don't need to be converted. This fixes the issue and with the patch all the py3k benchmarks run successfully after running the script. -- Added file: http://bugs.python.org/file1

[issue10410] Is iterable a container type?

2010-11-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Removed the incorrect "container" reference. See r86463. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue10414] socket.gethostbyname doesn't return an ipv6 address

2010-11-13 Thread david
New submission from david : (socket.gethostbyname doesn't return an ipv6 address) So just to start with I know the documentation says [0] "and getaddrinfo() should be used instead for IPv4/v6 dual stack support." However, the getaddrinfo() method provides more information than required. Why ca

[issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL

2010-11-13 Thread Senthil Kumaran
Senthil Kumaran added the comment: r86461 (release31-maint) r86462 (release27-maint) -- status: open -> closed ___ Python tracker ___

[issue9807] deriving configuration information for different builds with the same prefix

2010-11-13 Thread Matthias Klose
Matthias Klose added the comment: the change to python.pc should make the abi change to includedir, not Cflags. -- ___ Python tracker ___

[issue10260] Add a threading.Condition.wait_for() method

2010-11-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Good point, Antoine. I'm always trying to keep those timeouts low, however, to avoid having the testsuite duration grow too much with every test :) I think we can probably fix the issue by having the lock_tests.Bunch() function only return when all t

[issue9807] deriving configuration information for different builds with the same prefix

2010-11-13 Thread Matthias Klose
Matthias Klose added the comment: this adds the modifier to the /python3.2/config directory. Now you end up with both /python3.2/config and /python3.2/ for anything else. This is not what Debian, Fedora and Ubuntu are currently doing. Is this really wanted? I'd rather like to see t

[issue9520] Add Patricia Trie high performance container

2010-11-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think a Patricia Trie is going to find its way into the code distribution. It has a better chance as a third-party module listed on PyPI (much in the same way that people access memcached from Python). -- resolution: -> rejected status: o

[issue10413] Comments in unicode.h are out of date

2010-11-13 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Attached patch updates some comments in unicode.h mostly reflecting the fact that the default encoding is now unconditionally UTF-8. -- assignee: belopolsky components: Documentation, Interpreter Core files: unicode-comments.diff keywords: patc

[issue10412] Add py3k support for "slow" pickle benchmark in Benchmark Suite

2010-11-13 Thread Bobby Impollonia
New submission from Bobby Impollonia : A patch is attached that does the following: 1) Add py3k support for the "slow" (pure-Python) pickle/ unpickle benchmarks. 2) Add a runtime check to the pickle benchmark verifying that we do or don't have the C accelerators as expected. 3) Rename the cPickl

[issue10410] Is iterable a container type?

2010-11-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: > "iterable" is described as "A container object > capable of returning its members one at a time." That wording is confusing. I'll fix it. > Likewise, "and objects of any classes you define > with an __iter__() or __getitem__() method." is > wrong beca

[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Are there any files in performance/ that need 2to3? All the ones that require external libs (such as django, spambayes, etc.). Although, of course, since they require external libs it's not sure the translation will work either. I think I've converted all th

[issue10410] Is iterable a container type?

2010-11-13 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: d...@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Bobby Impollonia
Bobby Impollonia added the comment: Are there any files in performance/ that need 2to3? -- ___ Python tracker ___ ___ Python-bugs-lis

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > See Objects/dictnotes.txt for some of the results. > I spent about full month trying to optimize dict > performance either by tuning parameters or using > different algorithms. Well, I've seen those results. I'm asking about which workloads or benchmarks were

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: See Objects/dictnotes.txt for some of the results. I spent about full month trying to optimize dict performance either by tuning parameters or using different algorithms. There were a couple wins that were not implemented. 1) Allowing users to control insert

[issue10149] Data truncation in expat parser

2010-11-13 Thread Maciek J
Maciek J added the comment: Couldn't compile to html at the moment, but it should be fine anyway. Note that I didn't wanted to start a new paragraph (I'm guessing you meant the sentence at line 13 of the patch) as there was no new paragraph in a previous version. -- Added file: http:

[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, since this benchmark is already 3.x compatible, there's not much sense in making a 2to3 pass, is there? So perhaps "make_perf3.sh" (which I've never used) should be a bit smarter. -- ___ Python tracker

[issue10403] Use "member" consistently

2010-11-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: > "Members and methods" should just be "attributes". +1 That substitution should be made almost everywhere. Individual slot variable are still called members though and their type is a member_descriptor. And the C API still has a tp_members entry. Other

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > FWIW, one way to make a dict denser without increasing the number of > probes is to use Brent's Variation of Algorithm D in Knuth. That > optimizes the insertion order to minimize the number of collisions and > lets you pack well over two-thirds full without

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, one way to make a dict denser without increasing the number of probes is to use Brent's Variation of Algorithm D in Knuth. That optimizes the insertion order to minimize the number of collisions and lets you pack well over two-thirds full without de

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > My previous experiments along these lines showed it was a dead-end. > The number of probes was the most important factor and beat-out any > effort to improve cache utilization from increased density. Can you describe your experiments? What workloads or benc

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: My previous experiments along these lines showed it was a dead-end. The number of probes was the most important factor and beat-out any effort to improve cache utilization from increased density. Doing extra work (more probes) in order to improve cache

[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Bobby Impollonia
New submission from Bobby Impollonia : After checking out and converting the benchmark suite to py3k, the py3k benchmark set fails because of an ImportError in bm_pickle.py. Steps to reproduce: hg clone http://hg.python.org/benchmarks/ py2benchmarks mkdir py3benchmarks cd py3benchmarks ../py2

[issue10392] GZipFile crash when fileobj.mode is None

2010-11-13 Thread Brad Greenlee
Brad Greenlee added the comment: Understood. I just felt that fileobj.mode == None should be handled the same way that GzipFile(...,mode=None) is handled. I've submitted a patch to Django: http://code.djangoproject.com/ticket/14681 -- ___ Python tr

[issue10410] Is iterable a container type?

2010-11-13 Thread INADA Naoki
New submission from INADA Naoki : In http://docs.python.org/release/2.6.6/glossary.html, "iterable" is described as "A container object capable of returning its members one at a time." Is it correct? Is stream object like file a container type? Container ABC requires only "__contains__" abstrac

[issue10399] AST Optimization: inlining of function calls

2010-11-13 Thread Brett Cannon
Brett Cannon added the comment: While I have nothing to say directly about the inline optimization, I do have some stuff to say about moving to AST optimizations. First, doing in Python is a good thing. It not only makes prototyping easier, but it allows other VMs to use the optimizations w/o

[issue10401] Globals / builtins cache

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: There aren't many possible approaches. The more complex variants of globals caches try to also speedup writes, which is IMO a waste of time since rebinding globals is not a good coding practice, and especially not in the middle of time-critical loops. (by th

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-13 Thread Vlastimil Brom
Vlastimil Brom added the comment: Thank you very much! a quick test with my custom unicodedata with 6.0 on py 2.7 seems ok. I hope, there won't be problems with "cooperation" of the more recent internal data with the original 5.2 database in python 2.x releases. vbr -- __

[issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False

2010-11-13 Thread Michael Hoffman
Michael Hoffman added the comment: As always, it seems a bit more complicated than I originally expected. Since it's too late for a Python 2.x feature addition, I'll wait until I upgrade to 3.x to work on that. You are correct, technically this is not a docs bug but I think the clarity of th

[issue2571] cmd.py always uses raw_input, even when another stdin is specified

2010-11-13 Thread Michael Hoffman
Changes by Michael Hoffman : -- nosy: +hoffman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue10401] Globals / builtins cache

2010-11-13 Thread Brett Cannon
Brett Cannon added the comment: Unladen actually has something like this in place for performance optimizations. Not sure how Antoine's approach differs, though. -- nosy: +brett.cannon ___ Python tracker

[issue10409] mkcfg crashes with ValueError

2010-11-13 Thread Tarek Ziadé
Tarek Ziadé added the comment: Commited in a99e29d63071 (hg.python.org) -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-13 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101113.zip is a new version of the regex module. It now supports Unicode 6.0.0. -- Added file: http://bugs.python.org/file19597/issue2636-20101113.zip ___ Python tracker <http://bugs.python.

[issue3871] cross and native build of python for mingw32 with distutils

2010-11-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > this is, after all, a new platform! it starts off with > "sys.platform == 'mingw32'" I disagree; programs compiled with mingw32 run on Windows, and use the MSVC runtime. It's the same platform as the current win32 build. It's even possible to use ming

[issue10409] mkcfg crashes with ValueError

2010-11-13 Thread Tarek Ziadé
Tarek Ziadé added the comment: Thanks for the feedback, I can reproduce this. Fixing it. -- ___ Python tracker ___ ___ Python-bugs-li

[issue10409] mkcfg crashes with ValueError

2010-11-13 Thread Stein Magnus Jodal
New submission from Stein Magnus Jodal : I'm using Distutils2 1.0a3 with Python 2.6.6. To reproduce: 1. Run ``python -m distutils2.mkcfg`` 2. When you get to the Trove classifier step enter e.g. "Apache 2" as license 3. When asked to select a matching license, enter something else than a numbe

[issue1520831] urrlib2 max_redirections=0 disables redirects

2010-11-13 Thread John J Lee
John J Lee added the comment: Why not? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a benchmark adapted from another bug entry (I merely adapted the dict sizes in order to better exhibit the performance degradation when the CPU cache becomes too small to hold the whole dict). Results without the patch: 1 words (9092 keys)

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is a patch experiment which does two things: - make dicts denser by making the resize factor 2 instead of 4 for small dicts - improve cache locality on collisions by using linear probing It should be noted that these two changes are not independent. Impr

[issue10407] missing errno import in distutils/dir_util.py

2010-11-13 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report. I’ve run pyflakes over the distutils directory and found another error in test_sysconfig. Will fix shortly. -- assignee: tarek -> eric.araujo status: open -> pending type: crash -> behavior versions: +Python 2.7, Python 3.1 _

[issue10407] missing errno import in distutils/dir_util.py

2010-11-13 Thread Zbyszek Szmek
New submission from Zbyszek Szmek : Fix is trivial: diff -r 8daacdacf720 -r 1a821081b470 Lib/distutils/dir_util.py --- a/Lib/distutils/dir_util.py Sat Nov 13 13:27:49 2010 +0100 +++ b/Lib/distutils/dir_util.py Sat Nov 13 14:37:49 2010 +0100 @@ -5,6 +5,7 @@ __revision__ = "$Id: dir_util.py 86244

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-13 Thread Vlastimil Brom
Vlastimil Brom added the comment: I'd have liked to suggest updating the underlying unicode data to the latest standard 6.0, but it turns out, it might be problematic with the cross-version compatibility; according to the clarification in http://bugs.python.org/issue10400 the 3... versions ar

[issue10116] Sporadic failures in test_urllibnet

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: There are still sporadic failures such as: == ERROR: testURLread (test.test_urllibnet.URLTimeoutTest) -- Traceback (most rece

[issue3871] cross and native build of python for mingw32 with distutils

2010-11-13 Thread Luke Kenneth Casson Leighton
Luke Kenneth Casson Leighton added the comment: > The current patch makes too many changes in core distutils functions; > it cannot be accepted in this form. I'm sure that most of the needed > changes can be made in a subclass of the present Mingw32CCompiler. that's what i did when creating t

[issue3871] cross and native build of python for mingw32 with distutils

2010-11-13 Thread Luke Kenneth Casson Leighton
Luke Kenneth Casson Leighton added the comment: > I am not sure how we should do this, but here's my proposal > for distutils2 at least: > - make this new feature a standalone package that patches distutils > - release it for 2.x > - let's add your work in distutils2 as well, so it's back in th

[issue10116] Sporadic failures in test_urllibnet

2010-11-13 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL

2010-11-13 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed in r86450 (py3k). Will be back porting shortly. -- resolution: -> fixed stage: -> committed/rejected ___ Python tracker ___ ___

[issue1520831] urrlib2 max_redirections=0 disables redirects

2010-11-13 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is an invalid bug report at the moment. In fact, aged. The redirection depends upon max_redirections and max_repeats together. Setting it to 0 explicitly (inside the code) is not a good use case under any condition. -- nosy: -BreamoreBoy resolut

[issue10260] Add a threading.Condition.wait_for() method

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Ok, here is a new patch which slightly expands the documentation and improves > the timeout unittest. > If there are no objections I'll then commit this shortly. Again, I think you should use a larger timeout value than 0.1, to avoid intermittent buildbot fa

[issue10260] Add a threading.Condition.wait_for() method

2010-11-13 Thread Georg Brandl
Georg Brandl added the comment: Good, but please wait until after the a4 freeze. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue10387] ConfigParser's getboolean method is broken

2010-11-13 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Sat, Nov 13, 2010 at 01:20:45AM +, Łukasz Langa wrote: > You think wrong. Try it. Okay, I get it. Coercing would be a bad idea in RawConfigParser because there are cases where get method can have raw=True and coercing would break those behaviors. The w

[issue10356] decimal.py: hash of -1

2010-11-13 Thread Mark Dickinson
Mark Dickinson added the comment: The Fraction type has the same behaviour, so I've fixed it to match the proposed new Decimal behaviour in r86448. -- ___ Python tracker ___ __

[issue10260] Add a threading.Condition.wait_for() method

2010-11-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Ok, here is a new patch which slightly expands the documentation and improves the timeout unittest. If there are no objections I'll then commit this shortly. -- Added file: http://bugs.python.org/file19594/wait_for2.patch _

[issue10141] SocketCan support

2010-11-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The patch looks good at first glance, but is there a way to test the feature? -- nosy: +amaury.forgeotdarc ___ Python tracker ___ ___

[issue10205] Can't have two tags with the same QName

2010-11-13 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the explanation, Éric. That helps. - Backported QName tests in r86447 to release31-maint. As for the logic of the fix, it follows like this: If True and False: #Doesn't go here elif True: # Goes here vs if True: # Goes here if False:

[issue10406] IDLE 2.7 on OS X does not enable Rstrip extension by default

2010-11-13 Thread Ned Deily
Changes by Ned Deily : Added file: http://bugs.python.org/file19593/issue10406-idle27-rstrip-27.txt ___ Python tracker ___ ___ Python-bugs-lis

[issue10406] IDLE 2.7 on OS X does not enable Rstrip extension by default

2010-11-13 Thread Ned Deily
New submission from Ned Deily : r73001 for Issue5150 added the Rstrip extension to IDLE and modified the extensions configuration file, config-extensions.def, to enable it by default. For Python 2 OS X installs, however, the config-extensions.def file from Lib/idlelib is replaced by a tailore

[issue10356] decimal.py: hash of -1

2010-11-13 Thread Mark Dickinson
Mark Dickinson added the comment: Okay; go ahead and apply (preferably in two separate commits, since you're fixing two only marginally related issues here). -- assignee: -> skrah ___ Python tracker

[issue10404] IDLE on OS X popup menus do not work: cannot set/clear breakpoints

2010-11-13 Thread Ned Deily
Changes by Ned Deily : -- nosy: +Bruce.Sherwood, kbk, taleinat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10405] IDLE breakpoint facility undocumented

2010-11-13 Thread Ned Deily
New submission from Ned Deily : In neither the IDLE section of the Library Reference nor in IDLE's own help file is there any documentation on how to use its breakpoint capability. Since the menu options only appear if the user knows to Right-click (or Control-click on OS X - see issue10404),

[issue10392] GZipFile crash when fileobj.mode is None

2010-11-13 Thread R. David Murray
R. David Murray added the comment: Yes. However, if None were a valid value for mode, then the would would instead do something like: SENTINEL = object() class GZipFile... def __init__(self, filename=None, mode=SENTINEL, ... and then where None currently appears in the logic of the met

[issue10404] IDLE on OS X popup menus do not work: cannot set/clear breakpoints

2010-11-13 Thread Ned Deily
Ned Deily added the comment: The attached patch modifies IDLE on OS X to bind popup menus to Control-Click (of the main or "left" button), as is commonly done elsewhere in OS X. -- Added file: http://bugs.python.org/file19592/issue10404-idle_no_context_menus.txt _

[issue10404] IDLE on OS X popup menus do not work: cannot set/clear breakpoints

2010-11-13 Thread Ned Deily
New submission from Ned Deily : In several contexts, IDLE binds clicking of the right mouse button to context popup menus, most importantly, to provide the Set Breakpoint and Clear Breakpoint actions in edit windows. On OS X systems, however, one cannot assume there will be more than one (e.g