[issue812369] module shutdown procedure based on GC

2012-02-16 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue13598] string.Formatter doesn't support empty curly braces "{}"

2012-02-16 Thread Ramchandra Apte
Ramchandra Apte added the comment: I have submitted a new patch, I have moved the increment to the end of if loop. -- Added file: http://bugs.python.org/file24542/issue13598.diff ___ Python tracker ___

[issue13598] string.Formatter doesn't support empty curly braces "{}"

2012-02-16 Thread Ramchandra Apte
Ramchandra Apte added the comment: @Nick I don't understand why should my patch make Formatter thread-unsafe - the auto_field_count and manual variables are local variables just like the variables in the other functions in Formatter. -- ___ Python

[issue14035] behavior of test.support.import_fresh_module

2012-02-16 Thread Eli Bendersky
Eli Bendersky added the comment: Florent, I can reproduce the problem by leaving just the last import_fresh_module in test_fresh_import.py And your patch fixes it, although as Nick says it's problematic in terms of ref leaks. What I'm not sure about is why the extra reference is needed. The

[issue812369] module shutdown procedure based on GC

2012-02-16 Thread Nick Coghlan
Nick Coghlan added the comment: In #14035, Florent pointed out the current behaviour potentially causes problems for some uses of import_fresh_modules() in the test suite (with globals sometimes being set to None if there's no indepenent reference to the module). GC based module cleanup woul

[issue14035] behavior of test.support.import_fresh_module

2012-02-16 Thread Nick Coghlan
Nick Coghlan added the comment: Keeping module references implicitly in import_fresh_module will leak references like crazy in the test suite. The onus is on the code referencing module contents to ensure that the module globals remain valid. If we get rid of the explicit clearing of module g

[issue14036] urlparse insufficient port property validation

2012-02-16 Thread zulla
zulla added the comment: I understand your point of view, but I disagree. Various libraries and projects rely on urlparse.urlparse and urllib.parse.urlparse. This bug just blew up in my face. I'm working with Cython and PyQt4. When a developer relies on ParseResult().netloc being a valid net

[issue14036] urlparse insufficient port property validation

2012-02-16 Thread R. David Murray
R. David Murray added the comment: It's not a patch if it is the whole file. A diff would be much more useful, since then we could see the changes easily. This kind of change would require a bit of discussion. I'm doubtful that it would be applied as a bug fix, and we might even want the va

[issue14026] test_cmd_line_script should include more sys.argv checks

2012-02-16 Thread Jason Yeo
Jason Yeo added the comment: I would like to work on this but I am not sure how to go about it. It seems that the method signature for _check_script has to be changed in include another parameter for expected_argv1, expected_argv2, etc. The _check_output also has to be changed to include asse

[issue14036] urlparse insufficient port property validation

2012-02-16 Thread zulla
Changes by zulla : Removed file: http://bugs.python.org/file24535/urlparse.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue14036] urlparse insufficient port property validation

2012-02-16 Thread zulla
zulla added the comment: Whops. I forgot an int() :-) Here's the right patch. -- Added file: http://bugs.python.org/file24540/testurllib.py ___ Python tracker ___ _

[issue14036] urlparse insufficient port property validation

2012-02-16 Thread zulla
zulla added the comment: Hi. No, it's a patched version. It won't crash under circumstances like that [1] and won't succeed with invalid input: >>> import urlparse >>> urlparse.urlparse("http://www.google.com:foo";) ParseResult(scheme='http', netloc='www.google.com:foo', path='', params='',

[issue14036] urlparse insufficient port property validation

2012-02-16 Thread R. David Murray
R. David Murray added the comment: Did you upload urlparse.py to the issue by accident? Can you please provide some examples of where you think the current code is producing incorrect results? -- nosy: +r.david.murray ___ Python tracker

[issue14036] urlparse insufficient port property validation

2012-02-16 Thread zulla
zulla added the comment: The "port" and "netloc" component of a ParsedResult-object is not properly sanitized or validated. This may lead to bypass-able hostname-based filters. Remote Crash vulnerabilities be be also possible. -- ___ Python tracker

[issue14028] random.choice hits ValueError: cannot convert float NaN to integer

2012-02-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: Well, at least it was an interesting bug report ;-) -- ___ Python tracker ___ ___ Python-bugs-li

[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-16 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file24414/timestamp_datetime.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-16 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file24539/timestamp_datetime-2.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-16 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file24505/time_decimal-17.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-16 Thread STINNER Victor
STINNER Victor added the comment: Patch version 18: - Fix a loss of precision in _PyTime_SetDenominator() - Add more tests on integer overflow I also updated the patch adding datetime.datetime support because some people are interested by the type, even I don't think that it is interesting t

[issue14035] behavior of test.support.import_fresh_module

2012-02-16 Thread Florent Xicluna
Florent Xicluna added the comment: Keeping reference of fresh modules solves the issue. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file24537/issue14035_fresh_modules.diff ___ Python tracker

[issue14025] unittest.TestCase.assertEqual does not show diff when comparing str with unicode

2012-02-16 Thread Ezio Melotti
Ezio Melotti added the comment: If you really want the diff you could use assertMultiLineEqual, but even on Python 2 you shouldn't mix str and unicode. I would rather fix the code to return unicode than using assertMultilineEqual to get a diff between str and unicode. Moreover assertMultiLi

[issue14037] Allow grouping of argparse subparser commands in help output

2012-02-16 Thread Nick Coghlan
Nick Coghlan added the comment: I realised that my initial idea doesn't play nicely with my other suggestion of allowing a "metavar" argument to add_subparsers() (see #14039). A better model may be to mimic the add_argument_group() directly by offering an add_parser_group() method on the subp

[issue14039] Add "metavar" argument to add_subparsers() in argparse

2012-02-16 Thread Nick Coghlan
New submission from Nick Coghlan : Currently, using add_subparsers() means that the entire list of subcommands is added to the main usage message. This gets rather unwieldy when there are a lot of subcommands. It would be nice if the add_subparsers() method accepted a "metavar" argument that

[issue14037] Allow grouping of argparse subparser commands in help output

2012-02-16 Thread Nick Coghlan
New submission from Nick Coghlan : I've just started using the argparse subparser feature, and it's very nice. However, I'd love to be able to group the different subparser commands into different sections the way I can group ordinary arguments with add_argument_group(). Initially I thought j

[issue14038] Packaging test support code raises exception

2012-02-16 Thread Vinay Sajip
New submission from Vinay Sajip : test_packaging has started failing in the pythonv branch: == ERROR: test_old_record_extensions (packaging.tests.test_command_install_dist.InstallTestCase) --

[issue14035] behavior of test.support.import_fresh_module

2012-02-16 Thread Florent Xicluna
Florent Xicluna added the comment: Trigger the same behavior without import_fresh_module. (test_fresh_import2.py) If you uncomment line #A or #B, it succeed. On the other side, if you comment line #C or #D, it succeed too. The import machinery is a bit complex, indeed ... -- nosy: +br

[issue14036] urlparse insufficient port property validation

2012-02-16 Thread zulla
New submission from zulla : The "port" component of a URL is not properly be sanitized or validated. This may lead to the evasion of netloc/hostname based filters or exceptions. -- components: Library (Lib) files: testurllib.py messages: 153512 nosy: zulla priority: normal severity: nor

[issue2377] Replace __import__ w/ importlib.__import__

2012-02-16 Thread Brett Cannon
Brett Cannon added the comment: Add Nick since the refactoring of importlib.__import__() into functions was his idea. -- nosy: +ncoghlan ___ Python tracker ___ _

[issue2377] Replace __import__ w/ importlib.__import__

2012-02-16 Thread Brett Cannon
Brett Cannon added the comment: Just a quick update. I have refactored importlib in the cpython repo to allow for implementing bits of importlib.__import__() and importlib._gcd_import() in C. This means that the built-in __import__() is now calling importlib underneath the covers. Eventually

[issue13089] parsetok.c: memory leak

2012-02-16 Thread Stefan Krah
Stefan Krah added the comment: Yes, that's basically what I did, but using the latest revision I cannot reproduce the parsetok leak either. The atexit leak is an old friend (#11826), so I think we can close this one for now. -- resolution: -> out of date stage: needs patch -> committe

[issue10513] sqlite3.InterfaceError after commit

2012-02-16 Thread Anders Blomdell
Anders Blomdell added the comment: > So my suggestion is to remove in "pysql_connection_commit" the call to : > pysqlite_do_all_statements(self, ACTION_RESET, 0); > to bring back the correct old behavior. That's what I have been running for years, now... > And also eventually to remove in "pysq

[issue7652] Merge C version of decimal into py3k.

2012-02-16 Thread Stefan Krah
Stefan Krah added the comment: I walked into the Roundup trap again: >>> Decimal(9).quantize(1, "?!?!?") Decimal('9') -- ___ Python tracker ___ _

[issue7652] Merge C version of decimal into py3k.

2012-02-16 Thread Stefan Krah
Stefan Krah added the comment: STINNER Victor wrote: > decimal.Decimal.__truediv__() has an optional context argument, whereas > _decimal defines PyNumberMethods. Regarding the special methods: decimal.py uses the optional context arguments for convenience so that these methods can be re-used

[issue13641] decoding functions in the base64 module could accept unicode strings

2012-02-16 Thread R. David Murray
R. David Murray added the comment: OK, I skimmed the thread I was remembering, and while it was discussing str->str and bytes->bytes primarily, the only pronouncement I could find was that functions should not accept a *mix* of bytes and string. So I guess I withdraw my objection, although i

[issue14035] behavior of test.support.import_fresh_module

2012-02-16 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue13641] decoding functions in the base64 module could accept unicode strings

2012-02-16 Thread poq
poq added the comment: FWIW, I was surprised by the return type of b64encode when I first used it in Python 3. It seems to me that b64encode turns binary data into text and thus intuitively should take bytes and return str. Similarly it seems intuitive to me for b64decode to take str as input

[issue14035] behavior of test.support.import_fresh_module

2012-02-16 Thread Florent Xicluna
New submission from Florent Xicluna : While writing tests xml.etree, I hit a strange behaviour of import_fresh_module. How to reproduce: - dummy/__init__.py - dummy/foo.py - dummy/bar.py - test_fresh_import.py # 'dummy/foo.py' from dummy.bar import func # 'dummy/bar.py' fortytwo = 42 def fun

[issue9631] Python 2.7 installation issue for Linux gcc-4.1.0-3 (Fedora Core 5?)

2012-02-16 Thread miro ilias
miro ilias added the comment: Hi, with the fresh downloadable version of Python 2.7.2 I got the same error. /usr/bin/install -c -m 644 ./Lib/curses/wrapper.py /home/ilias/bin/python_static/lib/python2.7/curses /usr/bin/install -c -m 644 ./Lib/pydoc_data/__init__.py /home/ilias/bin/python_s

[issue13641] decoding functions in the base64 module could accept unicode strings

2012-02-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > However, accepting bytes or string and returning bytes is not an > obviously good idea, and IMO at least merits some discussion. Why? "a" in "a2b" means ASCII, and unicode is as valid a container for ASCII text as bytes is. -- _

[issue13641] decoding functions in the base64 module could accept unicode strings

2012-02-16 Thread R. David Murray
R. David Murray added the comment: Um. I'm inclined to think that #13637 was a mistake. Functions that accept bytes and return bytes and also accept string and return string seem uncontroversial. However, accepting bytes or string and returning bytes is not an obviously good idea, and IMO a

Re: RuntimeError: maximum recursion depth exceeded in cmp

2012-02-16 Thread OwenLJN
Let me restate my question:I want to make self_contained(L5) and self_contained(L6) work, but I get RuntimeError how can I fix this by adding one more parameter to check if a list inside a list was seen before, and then stop the loop to prevent the error message from showing again? And I found that

RuntimeError: maximum recursion depth exceeded in cmp

2012-02-16 Thread OwenLJN
Hi I wrote a python function self_contained(x) that finds all lists in x that contain themselves. Here's the body of the function: def self_contained(x): L = [] if not isinstance(x, list): return [] for i in x: if isinstance(i, list): if i in i:

[issue13641] decoding functions in the base64 module could accept unicode strings

2012-02-16 Thread Catalin Iacob
Catalin Iacob added the comment: Attached alternative patch with a different approach: on input, strings are encoded as bytes and the rest of the code proceeds as before. All existing tests for bytes now test for strings as well and there is a new test for strings with non ASCII characters.

[issue13995] sqlite3 Cursor.rowcount documentation for old sqlite bug

2012-02-16 Thread Petri Lehtinen
Petri Lehtinen added the comment: Fixed, thanks! -- nosy: +petri.lehtinen versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker ___ __

[issue13995] sqlite3 Cursor.rowcount documentation for old sqlite bug

2012-02-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 74b2da95c6be by Petri Lehtinen in branch '3.2': sqlite3: Fix documentation errors concerning Cursor.rowcount http://hg.python.org/cpython/rev/74b2da95c6be New changeset a1f17e108a1b by Petri Lehtinen in branch '2.7': Fix errors in sqlite3's Cursor.

[issue13878] test_sched failures on Windows buildbot

2012-02-16 Thread Charles-François Natali
Charles-François Natali added the comment: Should be fixed now, thanks. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker _

[issue13609] Add "os.get_terminal_size()" function

2012-02-16 Thread Zbyszek Szmek
Zbyszek Szmek added the comment: Stdout can be connected to a pipe, e.g to less, which in turn might be connected to a terminal. The program can then display output properly scaled for the terminal, assuming that because stdin is connnected to a terminal, output will eventually reach the same

[issue13609] Add "os.get_terminal_size()" function

2012-02-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think there's much point in the proposed complications. If you're willing to know the terminal size, you're probably interested in displaying something in it (using stdout), so why would you care about stderr or stdin? --

[issue14024] logging.Formatter Cache Prevents Exception Format Overriding

2012-02-16 Thread Vinay Sajip
Vinay Sajip added the comment: A number of points: 1. exc_text is not just an implementation detail - it's in the docs. Thus, removing the cache altogether would be backwards-incompatible. 2. The exc_text value is the only simple way of propagating the exception information across the wire,

[issue13961] Have importlib use os.replace()

2012-02-16 Thread Charles-François Natali
Changes by Charles-François Natali : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue13878] test_sched failures on Windows buildbot

2012-02-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 662c60d26183 by Charles-François Natali in branch '3.2': Issue #13878: Fix random test_sched failures. http://hg.python.org/cpython/rev/662c60d26183 New changeset e35091b95813 by Charles-François Natali in branch 'default': Issue #13878: Fix random

[issue14034] the example in argparse doc is too complex

2012-02-16 Thread Tshepang Lekhonkhobe
New submission from Tshepang Lekhonkhobe : The argparse example (http://docs.python.org/dev/library/argparse.html#example) introduces way too many concepts too early. It's written as if targeted to existing users of optparse, instead of newcomers to Python's CLI handling. Perhaps the example c

[issue12655] Expose sched.h functions

2012-02-16 Thread Matt Joiner
Matt Joiner added the comment: Please also expose sched_getcpu(). -- nosy: +anacrolix ___ Python tracker ___ ___ Python-bugs-list mai

[issue14020] Improve HTMLParser doc

2012-02-16 Thread Ezio Melotti
Ezio Melotti added the comment: Do you remember how to do it? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue14028] random.choice hits ValueError: cannot convert float NaN to integer

2012-02-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think my claim the hardware appears healthy was premature. I misunderstood our initial error report internally on where the code ran and was looking at the wrong host. doh. my bad. Several more of these have been found in the last week and they all su

[issue14031] logging module cannot format str.format log messages

2012-02-16 Thread Vinay Sajip
Vinay Sajip added the comment: Use instead the approach described in this post: http://plumberjack.blogspot.com/2010/10/supporting-alternative-formatting.html -- resolution: -> out of date status: open -> closed ___ Python tracker

[issue14033] distutils problem with setup.py build &setup.py install vs direct setup.py install

2012-02-16 Thread 勇刚 罗
New submission from 勇刚 罗 : D:\CI\bld\vcs>build-pygit2.bat D:\CI\bld\vcs\pygit2>call python setup.py build & call python setup.py install & cd /d D:\CI\bld\vcs running build running build_py running build_ext building 'pygit2' extension creating build creating build\temp.win32-3.2 creating bui

[issue14032] test_cmd_line_script prints undefined 'data' variable

2012-02-16 Thread Jason Yeo
Changes by Jason Yeo : Removed file: http://bugs.python.org/file24532/mypatch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue14032] test_cmd_line_script prints undefined 'data' variable

2012-02-16 Thread Jason Yeo
Changes by Jason Yeo : Added file: http://bugs.python.org/file24532/mypatch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14032] test_cmd_line_script prints undefined 'data' variable

2012-02-16 Thread Jason Yeo
New submission from Jason Yeo : Hi, I'm new around here. I was trying to fix issue 14026 and I found this problem. In test_cmd_line_script, the test_issue8202 tries to print an undefined data variable when verbose is set to > 1. I have a patch attached to print(out) instead of print(data). Ple

[issue14031] logging module cannot format str.format log messages

2012-02-16 Thread Guido Kollerie
Guido Kollerie added the comment: I see, could this be made to work if I explicitly request a logger instead?: logger = logging.getLogger('my_logger', style='{') logger.info('User {} logged in', username) Maybe even for the root logger: root_logger = logging.getLogger(style='{')

[issue13892] distutils handling of windows manifest isn't optimal

2012-02-16 Thread Jack Jansen
Jack Jansen added the comment: Indeed, my situation is different from the cscript.exe situation because in my case Python needs to call back into the hosting application. Further experiments have shown that this is indeed the problem, and moreover that this is a problem that cannot be solved

[issue14031] logging module cannot format str.format log messages

2012-02-16 Thread R. David Murray
R. David Murray added the comment: That can't work. The logging messages may come from libraries written by someone else, using % formatting. The style has to be set at the individual logger level. -- nosy: +r.david.murray, vinay.sajip ___ Python

[issue14031] logging module cannot format str.format log messages

2012-02-16 Thread Guido Kollerie
New submission from Guido Kollerie : When logging messages with variable data one typically writes: username = 'Guido' logging.info('User %s logged in', username) However Python 3 has support str.format (PEP 3101). If one has adopted str.format for formatting strings in Python 3 code o

[issue13210] Support Visual Studio 2010

2012-02-16 Thread Jack Jansen
Changes by Jack Jansen : -- nosy: +jackjansen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue14026] test_cmd_line_script should include more sys.argv checks

2012-02-16 Thread Jason Yeo
Changes by Jason Yeo : -- nosy: +Jason.Yeo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree

2012-02-16 Thread Ezio Melotti
Ezio Melotti added the comment: I'm still not sure that's the best option. Without deprecation people will keep using cElementTree and we will have to keep it around forever (or at least until Python4 and then have a 3to4 to fix the import). This might be fine, but as a developer I would stil

[issue12627] Implement PEP 394: The "python" Command on Unix-Like Systems

2012-02-16 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file22737/version27_links.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue12627] Implement PEP 394: The "python" Command on Unix-Like Systems

2012-02-16 Thread Nick Coghlan
Nick Coghlan added the comment: New patch that aims to create the appropriate symlinks in "make bininstall". I don't currently have a sacrificial VM set up to test it in though. -- Added file: http://bugs.python.org/file24530/pep394_python27_symlinks.diff _

[issue12627] Implement PEP 394: The "python" Command on Unix-Like Systems

2012-02-16 Thread Nick Coghlan
Nick Coghlan added the comment: Actually, the Python 3 Makefile.pre.in is currently broken if $(EXE) is ever non-empty - in a few places it uses "$(PYTHON)$(VERSION)$(EXE)" and "$(PYTHON)3$(EXE)". Those are wrong, because the definition of $(PYTHON) at the top of the file is "python$(EXE)"

[issue12627] Implement PEP 394: The "python" Command on Unix-Like Systems

2012-02-16 Thread Nick Coghlan
Nick Coghlan added the comment: I removed the 3.3 patch, since all the previous version did was change symbolic links to hard links, and the latest round of discussions favoured retaining the symlinks since they're much easier to introspect. However, it turns out there is still one change nee

[issue12627] Implement PEP 394: The "python" Command on Unix-Like Systems

2012-02-16 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file22738/version33_links.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue14028] random.choice hits ValueError: cannot convert float NaN to integer

2012-02-16 Thread Mark Dickinson
Mark Dickinson added the comment: > I'm wondering if the NaN arises in the C code for random(): I don't think that's possible. In the second line: return PyFloat_FromDouble((a*67108864.0+b)*(1.0/9007199254740992.0)); a and b are already C unsigned longs, so no matter what their value, th

[issue14028] random.choice hits ValueError: cannot convert float NaN to integer

2012-02-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: The hypothesis that time.time() is returning NaN doesn't match the provided traceback. If time.time() had returned NaN, the exception would have happened earlier, on line 113 in random.py: long(time.time() * 256) I'm wondering if the NaN arises in the C

[issue14028] random.choice hits ValueError: cannot convert float NaN to integer

2012-02-16 Thread Mark Dickinson
Mark Dickinson added the comment: The bugs.launchpad.net URL shows a call to 'entropy.choice'. Any idea what 'entropy' is? Could it be that they're using their own Random subclass, not tied to the Python MT implementation? -- ___ Python tracker

[issue14028] random.choice hits ValueError: cannot convert float NaN to integer

2012-02-16 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm, this is a little odd. For 2.7 at least, the error message is coming from PyLong_FromDouble in Objects/longobject.c. I can't immediately see how PyLong_FromDouble could be called by the random seeding process. So it seems more likely that the error is r

[issue14028] random.choice hits ValueError: cannot convert float NaN to integer

2012-02-16 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue13986] ValueError: cannot convert float NaN to integer

2012-02-16 Thread Mark Dickinson
Mark Dickinson added the comment: My guess would be not related. My best guess for this issue is that it's caused by some mismatch in the struct stat declarations / uses on MIPS / Linux. A Google search for MIPS and stat suggests that there are problems in this area. -- __

[issue14028] random.choice hits ValueError: cannot convert float NaN to integer

2012-02-16 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue14030] Be more careful about selecting the compiler in distutils

2012-02-16 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue14030] Be more careful about selecting the compiler in distutils

2012-02-16 Thread Dirkjan Ochtman
New submission from Dirkjan Ochtman : distutils incorrectly handles CFLAGS as 1 argument instead of space-separated list of arguments. distutils should respect environment variables, which set compiler, linker etc. --- Lib/distutils/unixccompiler.py +++ Lib/distutils/unixccompiler.py @@ -297,7 +

[issue14029] When using setattr identifiers can start with any character

2012-02-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: It's not a bug. The specification of identifiers refers only to the places where they appear in the language grammar, i.e. what you can put into source code. What parameters objects accept in __setattr__ is an entirely different question. Some objects may ch

[issue14025] unittest.TestCase.assertEqual does not show diff when comparing str with unicode

2012-02-16 Thread Jaap Karssenberg
Jaap Karssenberg added the comment: On Thu, Feb 16, 2012 at 12:29 AM, Michael Foord wrote: > The type check in assertEqual, that delegates to the different comparison > methods, is strict because we can't know that using the error message > algorithms is sane for arbitrary subclasses - all we c

[issue14029] When using setattr identifiers can start with any character

2012-02-16 Thread Lyudmil Nenov
New submission from Lyudmil Nenov : I am not sure if this is actually a bug. Given documentation @ http://docs.python.org/release/2.5.2/ref/identifiers.html, the issue is that setattr does not appear to check identifier for naming convention. See a short example below. Running on windows >>

[issue2489] Patch for bugs in pty.py

2012-02-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm keeping this open to address the added behavior for spawn in 3.3. -- assignee: -> gregory.p.smith nosy: +gregory.p.smith stage: test needed -> versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2 ___ Pyt

[issue2489] Patch for bugs in pty.py

2012-02-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 994659efa292 by Gregory P. Smith in branch '3.2': Issue #2489: Fix bug in _copy loop that could consume 100% cpu on EOF. http://hg.python.org/cpython/rev/994659efa292 New changeset c7338f62f956 by Gregory P. Smith in branch 'default': Issue #2489:

[issue13986] ValueError: cannot convert float NaN to integer

2012-02-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: FYI - A "similar" NaN appearing in an unexpected place (the random module in this case) bug that I just filed - http://bugs.python.org/issue14028. I don't actually know if these will be related or not. -- nosy: +gregory.p.smith

[issue14028] random.choice hits ValueError: cannot convert float NaN to integer

2012-02-16 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue14028] random.choice hits ValueError: cannot convert float NaN to integer

2012-02-16 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.