[issue8852] _socket fails to build on OpenSolaris x64

2010-06-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Is there anything I can do to get someone to do something about it? I > would have thought with a patch, it would not be hard for someone to > fix. Sure. Unfortunately, the day has only 24 hours. -- ___ Python tr

[issue9066] Standard type codes for array.array, same as struct

2010-06-23 Thread Craig McQueen
New submission from Craig McQueen : The type codes for array.array are platform-dependent. The type codes are similar to those for the struct module. It would be helpful for array.array to adopt the struct module's "=" format specifier prefix, to specify "standard" sizes. E.g. array_objec

[issue1172711] long long support for array module

2010-06-23 Thread Craig McQueen
Craig McQueen added the comment: So it looks as though this isn't going in to Python 2.7. How about 3.x? -- nosy: +cmcqueen1975 ___ Python tracker ___ ___

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Antoine, there does need to be repeatablity; there's no question about > that. Well, that doesn't address my proposal of making it repeatable accross bugfix releases only. There doesn't seem to be a strong use case for perpetual repeatability. If some people

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread STINNER Victor
STINNER Victor added the comment: randint.py: another algorithm to generate a random integer in a range. It uses only operations on unsigned integers (no evil floatting point number). It calls tick() multiple times to generate enough entropy. It has an uniform distribution (if the input gener

[issue8413] String interpolation doesn't work with sys.version_info

2010-06-23 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Should this regression block final release of 2.7 or can it be fixed in e.g. 2.7.1? -- nosy: +benjamin.peterson ___ Python tracker ___

[issue8852] _socket fails to build on OpenSolaris x64

2010-06-23 Thread David Kirkby
David Kirkby added the comment: Is there anything I can do to get someone to do something about it? I would have thought with a patch, it would not be hard for someone to fix. -- ___ Python tracker ___

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Antoine, there does need to be repeatablity; there's no question about that. The open question for me is how to offer that repeatability in the cleanest manner. People use random.seed() for reproducible tests. They need it to have their studies become i

[issue8852] _socket fails to build on OpenSolaris x64

2010-06-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Has anyone done anything about fixing this issue? AFAICT, nobody did. -- ___ Python tracker ___

[issue9065] tarfile: default root:root ownership is incorrect.

2010-06-23 Thread Justin Bronder
Changes by Justin Bronder : -- components: +Library (Lib) versions: +Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue9065] tarfile: default root:root ownership is incorrect.

2010-06-23 Thread Justin Bronder
New submission from Justin Bronder : According to the tar spec [1], uname/gname should only be filled when they have successfully been resolved from the uid/gid. The tarfile module incorrectly defaults to root:root in this case. A patch against svn trunk r82183 is included. All tarfile unit te

[issue9051] Cannot pickle timezone instances

2010-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r82184. Leaving the issue open pending a more thorough review of pickling in datetime module. -- keywords: -easy, patch priority: normal -> low ___ Python tracker

[issue8852] _socket fails to build on OpenSolaris x64

2010-06-23 Thread David Kirkby
David Kirkby added the comment: Has anyone done anything about fixing this issue? The patch I attached appears to allow _socket to build on OpenSolaris and when I run the test suite, there is no failure of _socket. I've just downloaded the latest source code for the 3.1.2, 2.6.5 and Python-

[issue9048] no OS X buildbots in the stable list

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Buildbot failure reports are sent to python-checkins. In theory, at > least; I think that isn't working very well. ISTR we disabled them because there was too much churn from both unreliable buildbots and unreliable tests, which made the noise annoying and u

[issue9048] no OS X buildbots in the stable list

2010-06-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Is is possible to get e-mail about changes of buildbot status? I'd be > interested in two sets of mail: any buildbot failures caused by my > checkins and state changes for the OSX buildbots. Buildbot failure reports are sent to python-checkins. In theory, at

[issue9020] 2.7: eval hangs on AIX

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I checked every usage of Py_IS* in the tree and this is an isolated > case. So I think it's better to do the check explicitly and add a > comment to the Py_IS* macros. > > > Does the patch look good? Nice. I suppose Py_CHARMASK still needs fixing for the ge

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Mark Dickinson
Mark Dickinson added the comment: Just to illustrate, here's a patch that adds a method Random._smallrandbelow, based on the algorithm I described above. -- Added file: http://bugs.python.org/file17755/_smallrandbelow.diff ___ Python tracker

[issue9048] no OS X buildbots in the stable list

2010-06-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: Martin: sorry about my first question. My interpretation of your first message was that you thought that the OSX port itself wasn't stable, and you've already mentioned that you didn't mean to imply that. I'm unassigning the issue from my as I won't be able

[issue9048] no OS X buildbots in the stable list

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I think it's just as reasonable to say that the developers making > changes just aren't aware of bad side-effects on OS X. A good way to > remedy that would be to make those bad side-effects more apparent, for > example by adding an OS X buildbot into the "s

[issue9048] no OS X buildbots in the stable list

2010-06-23 Thread R. David Murray
R. David Murray added the comment: Data point: on #python-dev we get announcements when buildbots (any buildbots, not just stable ones) *change state*. That is, when a buildbot that was passing fails, or a buildbot that was failing passes. We do look at the failures, though not all the time

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I don't know how relevant this is to OS X, but on FreeBSD 6.3, > kern.ngroups (maximum number of groups a uid may belong to) defaults > to 16. It probably is: "sysctl kern.ngroups" also gives 16 on OSX 10.6.4 (Darwin 10.4.0). -- ___

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-23 Thread R. David Murray
R. David Murray added the comment: I don't know how relevant this is to OS X, but on FreeBSD 6.3, kern.ngroups (maximum number of groups a uid may belong to) defaults to 16. -- ___ Python tracker _

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Mark Dickinson
Mark Dickinson added the comment: > * possibly providing a C version of rnd2() If recoding in C is acceptable, I think there may be better ( = simpler and faster) ways than doing a direct translation of rnd2. For example, for small k, the following algorithm for randrange(k) suffices: - tak

[issue8999] Add Mercurial support to patchcheck

2010-06-23 Thread Brett Cannon
Brett Cannon added the comment: Good point, Antoine. Then I might leave this patch for now and come back to it when we do the Hg transition. -- assignee: brett.cannon -> ___ Python tracker ___

[issue1004] MultiMethods with type annotations in 3000

2010-06-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: Let's close for now. -- nosy: +benjamin.peterson resolution: -> postponed status: open -> closed ___ Python tracker ___

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Some considerations for the PRNG are: > * equidistribution (for quality) > * repeatability from the same seed (even in multithreaded environments) I believe a reasonable (com)promise would be to guarantee repeatability accross a given set of bugfix releases (

[issue8999] Add Mercurial support to patchcheck

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > As for Hg support, enough people seem to run mq on top of svn to make > this a reasonable thing to add now and to change once the transition > occurs. Yes, but the question is what workflow it should assume. If you are running mq for example (or pbranch, or d

[issue9064] pdb enhancement up/down traversals

2010-06-23 Thread Andrew Valencia
New submission from Andrew Valencia : In very deep stack traces (like runaway recursion) it can be a pain to get up to the top of the stack to see what kicked it off. I've enhanced up/down to take a numeric argument for the number of positions to traverse, or -1 to go to the top/bottom. Samp

[issue9061] cgi.escape Can Lead To XSS Vulnerabilities

2010-06-23 Thread Craig Younkins
Craig Younkins added the comment: > cgi.escape is for HTML attribute escaping only. It is not safe for HTML attribute escaping because it does not encode single quotes. > "More suitable" for HTML would be the correct interpretation rather make the > "input safe". "More suitable, but not qui

[issue8930] messed up formatting after reindenting

2010-06-23 Thread Stefan Krah
Stefan Krah added the comment: Antoine, thanks. ceval.c fixes committed in r82177, r82179, r82181 and r82182. -- ___ Python tracker ___ __

[issue9048] no OS X buildbots in the stable list

2010-06-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> ronaldoussoren components: +Macintosh -None ___ Python tracker ___ ___ Python-bugs-l

[issue9061] cgi.escape Can Lead To XSS Vulnerabilities

2010-06-23 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Wed, Jun 23, 2010 at 03:46:35PM +, Craig Younkins wrote: > cgi.escape never escapes single quote characters, which can easily > lead to a Cross-Site Scripting (XSS) vulnerability. This seems to be > known by many, but a quick search reveals many are usin

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-06-23 Thread Kamil Kisiel
Kamil Kisiel added the comment: While I agree this functionality isn't strictly necessary I think it makes sense from a semantic point of view. I ran in to this issue today while writing some code and I simply expected the negative syntax to work, given that the format string syntax otherwise

[issue9048] no OS X buildbots in the stable list

2010-06-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Bit of a chicken/egg issue here. Since we haven't had OS X buildbots > for very long, and the ones we do have represent odd configurations, > I think it's premature to say that "the port *doesn't* pass the test > suite on a regular manner". And I didn't mea

[issue9063] TZ examples in datetime.rst are incorrect

2010-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Let's establish what is the correct wall clock sequence around EDT to EST transition: >>> import time >>> def print_time(s): ...tt = time.localtime(s) ...print(time.strftime('%c %z %Z', tt)) x = datetime(2010, 11, 7, 5) >>> s = (x - datetime(197

[issue9061] cgi.escape Can Lead To XSS Vulnerabilities

2010-06-23 Thread Craig Younkins
Craig Younkins added the comment: Proof of concept: print "" % cgi.escape("' onload='alert(1);' bad='") -- ___ Python tracker ___

[issue8901] Windows registry path not ignored with -E option

2010-06-23 Thread flashk
flashk added the comment: Any chance of getting this into 2.7 final? This fix is important for embedding Python in Windows applications. -- ___ Python tracker ___ __

[issue9048] no OS X buildbots in the stable list

2010-06-23 Thread Shashwat Anand
Changes by Shashwat Anand : -- nosy: +l0nwlf ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue9048] no OS X buildbots in the stable list

2010-06-23 Thread Bill Janssen
Bill Janssen added the comment: Bit of a chicken/egg issue here. Since we haven't had OS X buildbots for very long, and the ones we do have represent odd configurations, I think it's premature to say that "the port *doesn't* pass the test suite on a regular manner". I think it's just as reas

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks guys, I've got it from here. Some considerations for the PRNG are: * equidistribution (for quality) * repeatability from the same seed (even in multithreaded environments) * quality and simplicity of API (for usability) * speed (it matters whether a M

[issue9062] urllib.urlopen crashes when launched from a thread

2010-06-23 Thread Senthil Kumaran
Senthil Kumaran added the comment: There isn't a problem with urllib with respect to threading as such. There are programs and examples which use this module in multi-threading environment. I could not run your app, I am not on Mac, but some of the changes you could try is: - Not to pollute

[issue9063] TZ examples in datetime.rst are incorrect

2010-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The result given when Eastern tzinfo object is used is clearly wrong. The timezone shift should not change the actual time, but >>> x == x.astimezone(Eastern) False while >>> x == x.astimezone(Local) True -- _

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Mark Dickinson
Mark Dickinson added the comment: BTW, the Wichmann-Hill code is gone in py3k, so that doc paragraph needs removing or updating. -- ___ Python tracker ___ __

[issue9063] TZ examples in datetime.rst are incorrect

2010-06-23 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : With python started at the root of the source tree and TZ=US/Eastern in the environment, >>> exec(open('Doc/includes/tzinfo-examples.py').read()) >>> import os >>> os.environ['TZ'] 'US/Eastern' >>> from datetime import * >>> x = datetime(2010, 11, 7, 5

[issue8999] Add Mercurial support to patchcheck

2010-06-23 Thread Brett Cannon
Brett Cannon added the comment: So patchcheck is meant for both contributors and committers. I originally wrote it for me, but it helps make sure the patch is in a reasonable state before someone submits a patch. As for Hg support, enough people seem to run mq on top of svn to make this a re

[issue5672] Implement a way to change the python process name

2010-06-23 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/pyt

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Senthil Kumaran
Senthil Kumaran added the comment: I guess, Antoine wanted to point out this: "Changed in version 2.3: MersenneTwister replaced Wichmann-Hill as the default generator." But as the paragraph points out Python did provide non default WichmanHill class for generating repeatable sequences with old

[issue9016] IDLE won't launch (Win XP)

2010-06-23 Thread Jon Seger
Jon Seger added the comment: Actually I did do exactly what Martin requested, but then somehow I failed to include the output in my message, which doesn't really make sense as a result. How embarrassing! I apologize. I thought I had included something like the following: C:\Documents and

[issue8798] tkinter build variants on OSX

2010-06-23 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- nosy: +hobbs, srid, trentm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue9062] urllib.urlopen crashes when launched from a thread

2010-06-23 Thread Olivier Berten
New submission from Olivier Berten : I'm writing SwatchBooker , an app that's (among other things) reading some data from the web. When urllib.urlopen is called first from within a secondary thread, the app crashes (or freezes). If it's been called first fro

[issue9061] cgi.escape Can Lead To XSS Vulnerabilities

2010-06-23 Thread Craig Younkins
Changes by Craig Younkins : -- type: -> security ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue9061] cgi.escape Can Lead To XSS Vulnerabilities

2010-06-23 Thread Craig Younkins
New submission from Craig Younkins : The method in question: http://docs.python.org/library/cgi.html#cgi.escape http://svn.python.org/view/python/tags/r265/Lib/cgi.py?view=markup # at the bottom http://code.python.org/hg/trunk/file/3be6ff1eebac/Lib/cgi.py#l1031 "Convert the characters '&', '<

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Reposting from python-dev. See "os.getgroups() on MacOS X" . """ On Wed, Jun 23, 2010 at 2:08 AM, Ronald Oussoren wrote: .. >> >>> * [Ronald's proposal] results in posix.getgroups not re

[issue8999] Add Mercurial support to patchcheck

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: The purpose of patchcheck.py is not obvious to me. If it's meant to be used by committers (rather than contributors), than we should wait for the actual hg migration and the definition of our new workflow. Also, we might "need" two separate scripts: one for i

[issue8254] write a configure command

2010-06-23 Thread Éric Araujo
Éric Araujo added the comment: 4Suite’s DistExt has a config command similar to the new Distutils2 configure command described in this bug report. The Distutils config command is an unfinished command with use similar to autotools configure scripts. From the module docstring: “a (mostly) emp

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: This wouldn't be the first time reproduceability is dropped, since reading from the docs: “As an example of subclassing, the random module provides the WichmannHill class that implements an alternative generator in pure Python. The class provides a backward

[issue8254] write a configure command

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Shouldn't "config" and "configure" have more distinguishable names? (if I understand correctly, they both are distutils2 commands) -- nosy: +pitrou ___ Python tracker _

[issue9060] Python/dup2.c doesn't compile on (at least) newlib

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: (as a sidenote, the last significant changes to dup2.c date back from 1994) -- nosy: +gvanrossum, loewis, pitrou versions: +Python 3.2 ___ Python tracker __

[issue8930] messed up formatting after reindenting

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Stefan: it's ok with me, thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue8254] write a configure command

2010-06-23 Thread Éric Araujo
Éric Araujo added the comment: 5) Should the command write different files per Python version and platform? 4Suite’s config command does that. -- ___ Python tracker ___

[issue9059] Backwards compatibility

2010-06-23 Thread Ezio Melotti
Ezio Melotti added the comment: Python 2 is also forward compatible with several Python 3 features, for example: >>> from __future__ import print_function >>> print('foo') foo -- components: -Regular Expressions nosy: +ezio.melotti stage: -> committed/rejected __

[issue9059] Backwards compatibility

2010-06-23 Thread STINNER Victor
STINNER Victor added the comment: > Code written for Python during version 2 cannot be > used/compiled in version 3 Use 2to3 script to convert your Python2 program to Python3. More information at: http://docs.python.org/py3k/whatsnew/3.0.html#porting-to-python-3-0 -- nosy: +haypo ___

[issue9059] Backwards compatibility

2010-06-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: as stated in http://www.python.org/download/releases/3.1.2/ python 3 is designed to be backwards incompatible. I suggest you to follow the link "Conversion tool for Python 2.x code". -- nosy: +amaury.forgeotdarc resolution: -> invalid status: op

[issue9060] Python/dup2.c doesn't compile on (at least) newlib

2010-06-23 Thread Torne Wuff
New submission from Torne Wuff : On systems without dup2(), Python tries to compile its own from Python/dup2.c, but this file refers to close() without including unistd.h. This causes it to not compile with newlib (and possibly other C libraries, presumably it was relying on fcntl.h indirectly

[issue9059] Backwards compatibility

2010-06-23 Thread Raven Demeyer
New submission from Raven Demeyer : Python 3 is not backwards compatible with Python 2. Example: Python 2: print 'foo' Python 3: print(bar) Problem: Code written for Python during version 2 cannot be used/compiled in version 3 Solution: Just like any decent self-respecting programming language

[issue8930] messed up formatting after reindenting

2010-06-23 Thread Stefan Krah
Stefan Krah added the comment: Patch for ceval.c. If you agree with the macro indentation (starting in line 815) I can commit it and port it to the other branches. -- keywords: +patch nosy: +skrah Added file: http://bugs.python.org/file17752/trunk-ceval-indent.patch ___

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: Wrt. non-gcc compilers: we do need to worry about those (there have been bugreports in the past about using the Intel compiler), but those compilers still have to be able to process system headers and Martin's patch basicly adds the definition from the syste

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Mark Dickinson
Mark Dickinson added the comment: Either of these looks good to me. If the last line of the second is changed from "return int(r) % n" to "return int(r) // (N // n)" then it'll use the high-order bits of random() instead of the low-order bits. This doesn't matter for MT, but might matter fo

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > That (/usr/local/src) explains why I haven't been able to reproduce the > problem, that worried me a little. > > W.r.t. to the SDK: > > 1) You don't have to use an SDK: use > > co

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: That (/usr/local/src) explains why I haven't been able to reproduce the problem, that worried me a little. W.r.t. to the SDK: 1) You don't have to use an SDK: use configure --enable-universalsdk=/ MACOSX_DEPLOYMENT_TARGET=10.5 (or whatever target

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, here are two approaches to getting an equi-distributed version of int(n*random()) where 0 < n <= 2**53. The first mirrors the approach currently in the code. The second approach makes fewer calls to random(). def rnd1(n): assert 0 < n <= 2**53

[issue3439] create a numbits() method for int and long types

2010-06-23 Thread Mark Dickinson
Mark Dickinson added the comment: Ah; sorry for misunderstanding. Thanks for the explanation, Terry! -- ___ Python tracker ___ ___ Py

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > I don't agree that there must be an option to fall back to system provided > libs. The point of using an SDK is to avoid doing that because you might end > up with a binary that won't wor