[issue7881] Hardcoded path, unsafe tempfile in test_logging

2010-02-07 Thread Vinay Sajip
Vinay Sajip added the comment: Sorry for the goof; that line was unintentionally left in. Now removed (r78103). -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue5802] The security descriptors of python binaries in Windows are not strict enough

2010-02-07 Thread Hong Chen
Hong Chen added the comment: Thanks for the reply. I can log in as a non-admin user and replace python.exe with another binary. Does that serve as an attack example? Hong On Sun, Feb 7, 2010 at 7:14 PM, Brian Curtin wrote: > > Changes by Brian Curtin : > > > -- > stage:  -> test nee

[issue7881] Hardcoded path, unsafe tempfile in test_logging

2010-02-07 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: In addition, the /tmp/tmp.txt file is only writeable by the user that created it. On the buildbot machine I'm admin'ing, the buildslave user created the file and user neal's run of build.sh on the trunk fails because it can't write the file. Also, to avoid

[issue5802] The security descriptors of python binaries in Windows are not strict enough

2010-02-07 Thread Brian Curtin
Changes by Brian Curtin : -- stage: -> test needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue7843] python-dev archives are not updated

2010-02-07 Thread Ilya Sandler
Ilya Sandler added the comment: As of Feb 2, 2010, archives seem to be functioning as expected ;-) -- status: open -> closed ___ Python tracker ___ __

[issue5341] A selection of spelling errors and typos throughout source

2010-02-07 Thread Éric Araujo
Éric Araujo added the comment: I should have seen this when changing one use of “builtin”. Applies only to py3k, since the glossary for trunk does not mention the `next` function. -- Added file: http://bugs.python.org/file16176/typo.diff ___ Python

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-07 Thread Ezio Melotti
Ezio Melotti added the comment: Almost completed patch, the code should be OK, I just have to add a few comments and check that it works fine in all the situations. -- Added file: http://bugs.python.org/file16175/issue7712v2.diff ___ Python tracker

[issue7881] Hardcoded path, unsafe tempfile in test_logging

2010-02-07 Thread Neil Schemenauer
New submission from Neil Schemenauer : The commit for issue #7868 added the following line to test_logging: print >> open('/tmp/tmp.txt', 'w'), type(logger) I'm not sure if that was intentional but it should be fixed. For one, that path does not necessarily exist. Secondly, opening a file in

[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-07 Thread Zvezdan Petkovic
Zvezdan Petkovic added the comment: Ronald, > That bit is not in the trunk, should it be forward ported to the trunk? Yes, that should be applied to trunk and 3.x to make it work on Mac OS X 10.5 (Leopard). I indicated that in msg98979. The explanation why that part is needed is given in ms

[issue7880] sysconfig does not like symlinks

2010-02-07 Thread Florent Xicluna
Florent Xicluna added the comment: actually realpath == abspath on most platforms where symlink is not implemented. Changed. -- Added file: http://bugs.python.org/file16173/issue7880_sysconfig.diff ___ Python tracker

[issue7880] sysconfig does not like symlinks

2010-02-07 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16172/issue7880_sysconfig.diff ___ Python tracker ___ ___ Python-bugs-lis

[issue7880] sysconfig does not like symlinks

2010-02-07 Thread Florent Xicluna
Changes by Florent Xicluna : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue7880] sysconfig does not like symlinks

2010-02-07 Thread Florent Xicluna
Florent Xicluna added the comment: proposed fix. -- keywords: +patch Added file: http://bugs.python.org/file16172/issue7880_sysconfig.diff ___ Python tracker ___

[issue7880] sysconfig does not like symlinks

2010-02-07 Thread Tarek Ziadé
Tarek Ziadé added the comment: Here's the traceback, I'll look at the problem asap 'import site' failed; traceback: Traceback (most recent call last): File "/MacDev/svn.python.org/python-trunk/Lib/site.py", line 530, in main() File "/MacDev/svn.python.org/python-trunk/Lib/site.py", lin

[issue7880] sysconfig does not like symlinks

2010-02-07 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue7880] sysconfig does not like symlinks

2010-02-07 Thread Florent Xicluna
New submission from Florent Xicluna : ~ $ cd /tmp ~ $ ln -s /usr/local/bin/python . ~ $ ./python -c "import sys; print sys.executable" 'import site' failed; use -v for traceback /tmp/python -- assignee: tarek components: Library (Lib) messages: 99027 nosy: ezio.melotti, flox, tarek pri

[issue7879] Too narrow platform check in test_datetime

2010-02-07 Thread Andrej Krpic
New submission from Andrej Krpic : Windows doesn't accept negative timestamps (stated in the comment), yet checks is made against os.name instead of sys.platform. patch fixes that, and also enables windows ce to pass on this test. I think this is better than having os.name in ("nt", "ce"). --

[issue7361] importlib not checking bytecode length

2010-02-07 Thread Brett Cannon
Brett Cannon added the comment: A quick check of things shows that a totally empty file, a missing timestamp, or no marshalled code triggers the use of source. I still need to check what happens when the magic number is truncated by a byte or so along with the timestamp. Any screw-up with th

[issue7878] regrtest should check for changes in import machinery

2010-02-07 Thread Brett Cannon
New submission from Brett Cannon : The saved_test_environment context manager should check that sys.path_hooks, sys.path_importer_cache, and __import__ have not changed. The thing that is tricky, though, is that sys.path_importer_cache is legitimately mutated by other tests simply because vali

[issue7361] importlib not checking bytecode length

2010-02-07 Thread Brett Cannon
Brett Cannon added the comment: issue #7875 brought up the original failure that caused the creation of this bug again and led to me finally diagnosing the problem. -- ___ Python tracker __

[issue7875] test_multiprocessing / importlib failure

2010-02-07 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +importlib not checking bytecode length ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7875] test_multiprocessing / importlib failure

2010-02-07 Thread Brett Cannon
Brett Cannon added the comment: OK, I figured this one out. Someone is using importlib.import_module() which uses importlib itself to do the import and not builtins.__import__. That has the side-effect of importlib replacing all None entries in sys.path_importer_cache with the finder that imp

[issue7501] python -m unittest path_to_suite_function errors

2010-02-07 Thread Michael Foord
Michael Foord added the comment: Is this needed as well as the load_tests protocol? If a test module defines a load_tests function that returns a test suite then the following creates the test suite from load_tests and executes that: python -m unittest modulename I don't think we need a

[issue7877] Iterators over _winreg EnumKey and EnumValue results

2010-02-07 Thread Brian Curtin
New submission from Brian Curtin : While EnumKey and EnumValue directly implement the underlying Windows calls of the same name, they don't feel very Pythonic. The user has to create their own loop and increment a counter to get all of the keys or values, stopping the loop when WindowsError is

[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-07 Thread Meador Inge
Meador Inge added the comment: > That bit is not in the trunk, should it be forward ported to the trunk? FWIW, I would really like to have it. > The actual prototype on 10.5 and 10.6 is: > > char **completion_matches(const char *, CPFunction *); > > Wouldn't it be better to change th

[issue7876] unittest docs use deprecated method in code example

2010-02-07 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for the report, this is fixed in r77999 and r78000 in trunk and py3k, but it needs to be backported to 3.1. -- nosy: +ezio.melotti priority: -> normal ___ Python tracker ___

[issue7876] unittest docs use deprecated method in code example

2010-02-07 Thread Bernt Røskar Brenna
New submission from Bernt Røskar Brenna : Suggest change the code example to use assertRaises instead of failUnlessRaises. The docs read: assertRaises(exception[, callable, ...])¶ failUnlessRaises(exception[, callable, ...])¶ with self.failUnlessRaises(some_error_class): d

[issue7875] test_multiprocessing / importlib failure

2010-02-07 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue7875] test_multiprocessing / importlib failure

2010-02-07 Thread Brett Cannon
Brett Cannon added the comment: I don't know who is doing this, but from what I can tell it isn't test_imoprtlib; running with -i shows __import__ to still be the built-in one along with no new sys.path_hooks entries or stale entries in sys.path_importer_cache. Same goes for when I run test_m

[issue6003] ZipFile.writestr "compression_type" argument

2010-02-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: Committed in r78097 (trunk) and r78098 (3.2). This includes the documentation change suggested in msg88437 -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue7874] logging.basicConfig should raise warning/exception on second call

2010-02-07 Thread Vinay Sajip
Vinay Sajip added the comment: The fact that the second call will do nothing is specifically documented: http://docs.python.org/dev/library/logging.html#logging.basicConfig "This function does nothing if the root logger already has handlers configured for it." This behaviour is by design, an

[issue7658] OS X pythonw.c compile error with 10.4 or earlier deployment target: no spawn.h

2010-02-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is now fixed in the 3.2 branch as well. -- status: open -> closed ___ Python tracker ___ ___ P

[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: I have a question about this bit of the patch: @@ -38,10 +38,31 @@ #if defined(_RL_FUNCTION_TYPEDEF) extern char **completion_matches(char *, rl_compentry_func_t *); #else +#if !defined(__APPLE__) extern char **completion_matches(char *, CPFunction *); #e

[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Zvezdan, your "fix1" patch works perfectly for me in Python 2.6 on both OS X 10.5 and 10.6. Great work! I approve applying this patch for Python 2.6.5. Ronald, would you like to do the honors? -- assignee: -> ronaldoussoren resolution: fixed -> a

[issue7875] test_multiprocessing / importlib failure

2010-02-07 Thread Florent Xicluna
Changes by Florent Xicluna : -- keywords: +buildbot ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue7875] test_multiprocessing / importlib failure

2010-02-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : An interesting bug failure on one of the buildbots. It seems importlib has been enabled as the default import mechanism (when? where?). test_multiprocessing Process Process-24: Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.nor

[issue7859] support "with self.assertRaises(SomeException) as exc:" syntax

2010-02-07 Thread Florent Xicluna
Florent Xicluna added the comment: Fixed (with tests) in r78094. Thank you Michael. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue7859] support "with self.assertRaises(SomeException) as exc:" syntax

2010-02-07 Thread Michael Foord
Changes by Michael Foord : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue7859] support "with self.assertRaises(SomeException) as exc:" syntax

2010-02-07 Thread Florent Xicluna
Florent Xicluna added the comment: Thank you for this answer. The "exception" argument could be useful. But it does not work as documented on r77999... Btw, the documentation explains the behaviour I expect... -- status: closed -> pending ___ Python

[issue7870] Duplicate test methods in test_memoryio

2010-02-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior versions: +Python 3.2 ___ Python tracker ___

[issue7874] logging.basicConfig should raise warning/exception on second call

2010-02-07 Thread Brian Curtin
Changes by Brian Curtin : -- components: +Library (Lib) -2to3 (2.x to 3.0 conversion tool) nosy: +vinay.sajip priority: -> normal stage: -> test needed versions: +Python 3.1 -Python 2.5 ___ Python tracker

[issue7859] support "with self.assertRaises(SomeException) as exc:" syntax

2010-02-07 Thread Michael Foord
Michael Foord added the comment: Just use the context manager and the exception is available as exc_value. -- nosy: +michael.foord resolution: -> rejected stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue6171] Class Browser selection in Ubuntu

2010-02-07 Thread Serge
Serge added the comment: TreeNode class which is used in IDLE class browser create a window for a text label on each single click and apparently under Ubuntu tcl looses first left button click and therefore doesn't generate left buttond double click event. In this patch I make changes to the

[issue7859] support "with self.assertRaises(SomeException) as exc:" syntax

2010-02-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/2/7 Georg Brandl : > > Georg Brandl added the comment: > > Why not the un-magic context manager, which has an exc_value attribute with > the exception? That's what I meant, but our perceptions of magic are clearly different. :) -- __

[issue7874] logging.basicConfig should raise warning/exception on second call

2010-02-07 Thread Tobias
New submission from Tobias : logging.basicConfig should raise warning/eception on second call. Why? logging.basicConfig(filename="/tmp/works.log") logging.basicConfig(filename="/tmp/worksnot.log") what do you think does happen? Right - logging goes to "/tmp/worksnot.log". But does not behave t

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-07 Thread Florent Xicluna
Florent Xicluna added the comment: Let's fix some other tests. -- Added file: http://bugs.python.org/file16167/issue7712_context_manager_v5.diff ___ Python tracker ___ __

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-07 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16165/issue7712_context_manager_v4.diff ___ Python tracker ___ ___ Python

[issue7872] Incorrect error raised on importing invalid module via unittest

2010-02-07 Thread Michael Foord
Michael Foord added the comment: Duplicate of issue 7559. -- resolution: -> duplicate stage: test needed -> committed/rejected status: open -> closed ___ Python tracker ___

[issue7873] Remove precision restriction for integer formatting.

2010-02-07 Thread Mark Dickinson
Mark Dickinson added the comment: Removing 3.2 from the versions: the OverflowError appears to be specific to 2.x ints: >>> '%0.117x' % 1L '1' -- versions: -Python 3.2

[issue7872] Incorrect error raised on importing invalid module via unittest

2010-02-07 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, michael.foord priority: -> normal stage: -> test needed versions: +Python 2.6, Python 2.7, Python 3.2 ___ Python tracker ___ __

[issue7873] Remove precision restriction for integer formatting.

2010-02-07 Thread Mark Dickinson
Mark Dickinson added the comment: Looks like I accidentally truncated that traceback. Here's the full version: Python 2.7a2+ (trunk:78008M, Feb 5 2010, 23:39:39) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> '

[issue7873] Remove precision restriction for integer formatting.

2010-02-07 Thread Mark Dickinson
New submission from Mark Dickinson : Currently, in trunk: >>> '%0.116x' % 1 '0001' >>> '%0.117x' % 1 Traceback (most recent call last): File "", line 1, in This is intentional, and

[issue7872] Incorrect error raised on importing invalid module via unittest

2010-02-07 Thread Daniel Waterworth
New submission from Daniel Waterworth : The problem is that when you import a module which is inside a package via 'loadTestsFromName' in unittest.TestLoader. If the imported module raises a ImportError this is read to mean that the module itself is unavailable. To illustrate this I have a sma

[issue7869] traceback from logging is unusable.

2010-02-07 Thread Vinay Sajip
Vinay Sajip added the comment: Fix (slightly modified version of patch) checked into trunk (r78081), thanks Inada Naoki! -- resolution: -> fixed status: open -> closed ___ Python tracker _

[issue7871] Duplicate test method in test_heapq

2010-02-07 Thread Georg Brandl
New submission from Georg Brandl : test_heap has a duplicate "test_get_only" test method, and the one that's overwritten seems to end up in an infinite loop. -- assignee: rhettinger messages: 98995 nosy: georg.brandl, rhettinger severity: normal status: open title: Duplicate test method

[issue7870] Duplicate test methods in test_memoryio

2010-02-07 Thread Georg Brandl
Changes by Georg Brandl : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue7870] Duplicate test methods in test_memoryio

2010-02-07 Thread Georg Brandl
New submission from Georg Brandl : test_memoryio.TextIOTestMixin has duplicate (and conflicting!) definitions of test_relative_seek() and test_textio_properties(). -- assignee: pitrou components: Tests messages: 98994 nosy: georg.brandl, pitrou priority: high severity: normal status: op

[issue7714] configure GCC version detection fix for Darwin

2010-02-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: Ported to 2.6 (r78065), 3.x (r78066) and 3.1 (r78068) -- status: open -> closed ___ Python tracker ___ ___

[issue7437] OS X 2.6.4 installer fails on 10.3 with two corrupted file names, ignored on 10.4

2010-02-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: TJ: thanks for testing on 10.3.9. -- stage: test needed -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue7807] test_macostools fails on OS X 10.6: no attribute 'FSSpec'

2010-02-07 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ P

[issue7807] test_macostools fails on OS X 10.6: no attribute 'FSSpec'

2010-02-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've disabled the tests (and updated documentation) in r78061 (trunk), r78062 (2.6) The root cause is that the implemention of macostools uses FSSpecs to implement the failing APIs and those aren't available in 64-bit code. I haven't reimplemented the faili

[issue7812] Call to gestalt('sysu') on OSX can lead to freeze in wxPython apps

2010-02-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: Removed the call to gestalt('sysu') in r78056 (trunk), r78057 (2.6), r78058 (3.x), r78060 (3.1) (Also changing the type to 'behavior' instead of 'crash' because this is not a crashing bug in python). -- resolution: -> fixed stage: -> committed/rej

[issue7812] Call to gestalt('sysu') on OSX can lead to freeze in wxPython apps

2010-02-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: Two short notes: 1) The call to gestalt('sysu') is basicly dead code and will be removed 2) Running the GUI runloop in a thread that is not the main thread is AFAIK not supported by Apple. I'm not 100% sure about the Carbon libraries, but in Cocoa the main

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-07 Thread Florent Xicluna
Florent Xicluna added the comment: Removed the dummy CM hack. Now it should be ready for final review. -- Added file: http://bugs.python.org/file16165/issue7712_context_manager_v4.diff ___ Python tracker __

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-07 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16152/issue7712_context_manager_v3a.diff ___ Python tracker ___ ___ Pyth

[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: re: msg98913 The addition of an #include of stdlib.h is unnecessary because Python.h already does that. re: msg98908 Building against with a 10.3 deployment target should be harmless. A universal build targets 10.3 on purpose because that results in bina

[issue7826] support caching for 2to3

2010-02-07 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> benjamin.peterson nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list maili

[issue7835] Minor bug in 2.6.4 related to cleanup at end of program

2010-02-07 Thread Georg Brandl
Georg Brandl added the comment: I'd say go ahead and commit without test. -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bug

[issue7848] copy.copy corrupts objects that return false value from __getstate__

2010-02-07 Thread Georg Brandl
Changes by Georg Brandl : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue7859] support "with self.assertRaises(SomeException) as exc:" syntax

2010-02-07 Thread Georg Brandl
Georg Brandl added the comment: Why not the un-magic context manager, which has an exc_value attribute with the exception? -- nosy: +georg.brandl ___ Python tracker ___

[issue7868] add a loggerClass attribute to Manager

2010-02-07 Thread Georg Brandl
Georg Brandl added the comment: Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue7869] traceback from logging is unusable.

2010-02-07 Thread R. David Murray
Changes by R. David Murray : -- nosy: +vinay.sajip priority: -> normal stage: -> patch review type: behavior -> feature request versions: -Python 2.5 ___ Python tracker ___ ___