[issue12661] Add a new shutil.cleartree function to shutil module
Leonid Vasilev vsleo...@gmail.com added the comment: Added file with sample usage (extracted from real application). the main purpose of shutil.cleartree() is to remove unnecessary files from tree, where patterns of ignored or deleted files are computed dynamically. Yes I agree, that it might be done by shell expression, but in case of dynamic patterns it will be hacky. -- Added file: http://bugs.python.org/file22807/example.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12661 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12648] Wrong import module search order on Windows
kota nospam.kotarou.d...@gmail.com added the comment: Yea, it runs the parser.py that time. And I didn't understand the page you linked me to. Would you mind explaining it a bit? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12648 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12648] Wrong import module search order on Windows
Nick Coghlan ncogh...@gmail.com added the comment: The Windows build actually uses the registry to locate the standard library rather than sys.path. This is by design, but isn't really documented properly. It means that code on sys.path (even in the current directory) won't shadow standard library modules on Windows. Due to various arcane details about how it is implemented, the emulation of the main import system that is used to run code with the '-m' switch gets the search order the other way around and hence gives a different answer (the same answer as Linux) in cases like this. -- assignee: - docs@python components: +Documentation -None nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12648 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams
Nadeem Vawda nadeem.va...@gmail.com added the comment: Looking at Lib/test/test_zlib.py, it appears that this behaviour is intentional (see issue8672). I agree that having flush() raise an exception is the Right Thing, but breaking existing code (which we know depends on this behavior) is clearly a bad idea. @pitrou - anything thoughts on this? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12646 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12567] curses implementation of Unicode is wrong in Python 3
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d98b5e0f0862 by Nadeem Vawda in branch 'default': Fix build error in _curses module when not using libncursesw. http://hg.python.org/cpython/rev/d98b5e0f0862 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12567 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12662] Allow configparser to process suplicate options
New submission from ojab o...@ojab.ru: Allow configparser to process duplicate options, just concatenating it's values, so using file [sect1] opt1=asd; opt2=qwe opt1=fgs we will have config['sect1']['opt1'] == 'asd;fgs' -- components: Library (Lib) messages: 141463 nosy: ojab priority: normal severity: normal status: open title: Allow configparser to process suplicate options type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12648] Wrong import module search order on Windows
kota nospam.kotarou.d...@gmail.com added the comment: So there isn't any way to load parser.py via import parser on Windows? -- components: +None -Documentation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12648 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12662] Allow configparser to process suplicate options
Changes by Georg Brandl ge...@python.org: -- assignee: - lukasz.langa nosy: +lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12567] curses implementation of Unicode is wrong in Python 3
Nadeem Vawda nadeem.va...@gmail.com added the comment: Following d98b5e0f0862, I have been able to successfully build the curses module with curses_unicode.patch applied. -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12567 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12567] curses implementation of Unicode is wrong in Python 3
Nadeem Vawda nadeem.va...@gmail.com added the comment: Ack sorry, forgot to give context - my machine doesn't have libncursesw, so the curses module failed to build before that commit (with or without the patch applied). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12567 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10087] HTML calendar is broken
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10087 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12663] ArgumentParser.error writes to stderr not to stdout
New submission from Sandro Tosi sandro.t...@gmail.com: Hello, following up http://mail.python.org/pipermail/docs/2011-July/005210.html , here's a patch to fix it. It applies to all the relevant branches. -- assignee: docs@python components: Documentation files: ArgumentParser.error_stderr-default.patch keywords: patch messages: 141467 nosy: docs@python, sandro.tosi priority: normal severity: normal stage: patch review status: open title: ArgumentParser.error writes to stderr not to stdout versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file22808/ArgumentParser.error_stderr-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12663 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12664] Path variable - Windows installer
New submission from Aaron Robson shiny.mag...@googlemail.com: One of the main barriers to getting a working development environment for me was having to discover that I needed, learn about and find out how to set up the Path variable in Windows. I propose an option in the installer (perhaps even set to be on by default) to allow the user to choose if they want it to be added to the list or not. My apologies if this has been raised before (my searches in the tracker didn't turn up any similar problems), I am quite new to the issue tracker however. -- components: Installation messages: 141468 nosy: AaronR priority: normal severity: normal status: open title: Path variable - Windows installer type: feature request versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12665] Dictionary view example has error in set ops
New submission from Sandro Tosi sandro.t...@gmail.com: Hello, following up http://mail.python.org/pipermail/docs/2011-July/005209.html here's a patch to fix the example error on active 3.x branches. -- assignee: docs@python components: Documentation files: dict_view_examples-default.patch keywords: patch messages: 141469 nosy: docs@python, sandro.tosi priority: normal severity: normal stage: patch review status: open title: Dictionary view example has error in set ops versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file22809/dict_view_examples-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12664] Path variable - Windows installer
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - duplicate status: open - closed superseder: - Windows installer should add Python and Scripts directories to the PATH environment variable ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12666] map semantic change not documented in What's New
New submission from Jason R. Coombs jar...@jaraco.com: In `whatsnew/3.0.html`, there is little said about the map builtin: map() and filter() return iterators. If you really need a list, a quick fix is e.g. list(map(...)), but a better fix is often to use a list comprehension (especially when the original code uses lambda), or rewriting the code so it doesn’t need a list at all. Particularly tricky is map() invoked for the side effects of the function; the correct transformation is to use a regular for loop (since creating a list would just be wasteful). This suggests that all one must do to port to Python 3 is wrap map in list, and in fact this is what the 2to3 fixers do, when in fact, map is semantically different in how it handles arguments of different lengths. Consider the following. def to_tuple(*args): return args print(list(map(to_tuple, [1,2,3], [4,5,6,7]))) On Python 2, this code outputs: [(1, 4), (2, 5), (3, 6), (None, 7)] On Python 3, this code outputs: [(1, 4), (2, 5), (3, 6)] I suggest three fixes (in order of importance): 1) Document the difference in whatsnew/3.0.html. 2) Describe how one should port code of this usage to 3.0. 3) Incorporate the porting in the 2to3 fixer (if possible). If no one objects, I'll begin on (1). Does anyone have any suggestions for a clean approach to (2)? -- assignee: docs@python components: 2to3 (2.x to 3.0 conversion tool), Documentation keywords: easy messages: 141470 nosy: docs@python, jason.coombs priority: normal severity: normal status: open title: map semantic change not documented in What's New type: behavior versions: Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12666] map semantic change not documented in What's New
Jason R. Coombs jar...@jaraco.com added the comment: I believe the correct solution to (2) is to use itertools.zip_longest. So to port to Python 3, the example would use: print(list(map(to_tuple, itertools.zip_longest([1,2,3], [4,5,6,7] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9968] cgi.FieldStorage: Give control about the directory used for uploads
phep patrice.pil...@teletopie.net added the comment: Le 30/07/2011 15:45, Éric Araujo a écrit : Éric Araujomer...@netwok.org added the comment: I’ve read in the tempfile module docstring that in order to control the directory, you have to set tempfile.tempdir before calling any tempfile function. I suspect this will not be okay for some applications. I wonder if the same limitation applies when one sets os.environ['TMP']. You were right in pointing into this direction I forgot to mention in the doc part of the patch. I've had a look at tempfile implementation and made some tests and this led me to notice a documentation problem that might be worth considering (cf. infra). But first things first: Actually, after reading tempfile.py, I cannot see the reason of the tempfile docstring about tempdir, except maybe for performance reasons. Setting tempfile.tempdir manually should not be a problem in any case: direct access to the member or call to tempfile.gettempdir() - except maybe in the very improbable case where tempdir would first be set to some not None value then re-set to None and a nasty trick I overlooked is lurking inside of the gettempdir() concurrent-access lock... But, on the other hand, trying to tweak the system by using os.environ on TMP and such may well fail in a number of occasions since those variables won't be checked after the first call to tempfile.gettempdir() (except if tempfile.tempdir is reset to None). I wonder if the file docstring does not relate to this problem, as a matter of fact. In the light of that, do you think the tempfile solution is enough, or do you want to get back to the earlier idea of adding an argument to FieldStorage? I can't think it of any reasonable use case that would make necessary to overload the interface right now provided the need to (maybe) set tempfile.tempdir is documented. At last, as a side note, during the tests I ran, I noticed one should really not use os.rename() since this raises an OSError (file not found) upon script termination (since the NamedTemporaryFile has been ... renamed, hey). As this problem does not concern the present issue, I did not deemed necessary to edit the documentation accordingly. Yet this might be debatable since the doc never explicitly says FieldStorage uses a (Named)TemporaryFile under the hood. Do you think one should state explicitly the coupling of those modules ? (One advantage of doc changes is that they can get committed to 2.7, 3.2 and 3.3 and get published immediately. We can anyway make a code change in 3.3 and a doc change for older versions.) On this topic, I was wondering if the changes I propose have any chance of landing some day in 2.7 land - dunno Python workflow precisely enough. I fiddled last night with setting an environment to deploy and test a patched Python Are you aware of the developers’ guide? http://docs.python.org/devguide/ Yep, it helped me. It just took me some time to be sure to get it right, run the tests, ... (by the way, patchcheck.py seems to be broken). (I had some problem to understand what happened when I encountered 6755). What is 6755? Sorry, I meant issue 6755. -- title: Let cgi.FieldStorage have named uploaded file - cgi.FieldStorage: Give control about the directory used for uploads Well, actually, the useful feature in the patch is the possibility to have a named-hence-linkable uploaded file. Giving control on the upload directory is but a useful-while-quite-necessary sister-feature, isn't it ? ___ Python trackerrep...@bugs.python.org http://bugs.python.org/issue9968 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9968 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12667] Better logging.handler.SMTPHandler doc for 'secure' argument
New submission from Sandro Tosi sandro.t...@gmail.com: Hello, following up http://mail.python.org/pipermail/docs/2011-July/005207.html here are 2 patches to correct the documentation for 'secure' argument of SMTPHandler: - the one for default (applicable also on 3.2) adds completely the 'secure' arg (missing) - the one for 2.7 corrects the wrong information. Both are taken from the docstring, that seems perfectly usable for the doc. -- assignee: docs@python components: Documentation files: logging_smtphandler_secure-default.patch keywords: patch messages: 141473 nosy: docs@python, sandro.tosi, vinay.sajip priority: normal severity: normal stage: patch review status: open title: Better logging.handler.SMTPHandler doc for 'secure' argument versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file22810/logging_smtphandler_secure-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12667 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12667] Better logging.handler.SMTPHandler doc for 'secure' argument
Changes by Sandro Tosi sandro.t...@gmail.com: Added file: http://bugs.python.org/file22811/logging_smtphandler_secure-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12667 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12183] Document behaviour of shutil.copy2 and copystat with symlinks
Petri Lehtinen pe...@digip.org added the comment: Senthil Kumaran wrote: When shutil.copy2 already says that it's behavior is equivalent to cp -p, will adding this sentence + Symbolic links are not preserved. The contents and metadata of the + linked files are copied instead. Not actively confuse the user? Because cp -p's behavior includes that and I dont see a special mention without giving more details is going to help. You're right. Only copytree() seems to understand symlinks, so deferencing symlinks is the default mode of operation. I updated the patch to remove the first hunk. -- Added file: http://bugs.python.org/file22812/copy2_copytree_symlinks_2.7_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12183 ___diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 1b160d8..99ee111 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -105,8 +108,9 @@ Directory and files operations :func:`copy2`. If *symlinks* is true, symbolic links in the source tree are represented as - symbolic links in the new tree; if false or omitted, the contents of the - linked files are copied to the new tree. + symbolic links in the new tree, but the metadata of the original links is NOT + copied; if false or omitted, the contents and metadata of the linked files + are copied to the new tree. If *ignore* is given, it must be a callable that will receive as its arguments the directory being visited by :func:`copytree`, and a list of its ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12626] run test cases based on a glob filter
Michael Foord mich...@voidspace.org.uk added the comment: I agree with Antoine, as test.support is not a public api adding new features to assist with debugging is fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12626 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12668] 3.2 What's New: it's integer-string, not the opposite
New submission from Sandro Tosi sandro.t...@gmail.com: Hello, following up http://mail.python.org/pipermail/docs/2011-July/005087.html, here's a patch to fix the 3.2 What's New section. -- assignee: docs@python components: Documentation files: whatsnew_3.2_int2str-default.patch keywords: patch messages: 141476 nosy: docs@python, sandro.tosi priority: normal severity: normal stage: patch review status: open title: 3.2 What's New: it's integer-string, not the opposite versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file22813/whatsnew_3.2_int2str-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12641] Remove -mno-cygwin from distutils
Changes by Roumen Petrov bugtr...@roumenpetrov.info: -- nosy: +rpetrov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12669] test_curses skipped on buildbots
New submission from Nadeem Vawda nadeem.va...@gmail.com: When running regrtest with the -j and/or -w options, test_curses gets skipped, complaining that stdout is not a tty. This means that the buildbots never run this test, which is obviously a Bad Thing. For the -w case (which applies to the buildbots), this is caused by sys.stdout (and sys.stderr) being replaced with a StringIO instance. We can work around this in the test by using sys.__stdout__ instead. This is perhaps ugly, but it seems to work, and is much better than doing nothing. For the record, this has already been proposed in issue7096 (now dead). For the -j case things aren't quite so straightforward - each test is run in a subprocess, with stdout and stderr redirected to pipes, so there isn't an easy way to access the terminal the process is associated with. Off the top of my head, the only way I can think of to work around this is to special-case test_curses so that it runs in the main process, and I'd really much rather not do that. Thankfully this case doesn't apply to the buildbots at present, but it is still bothersome when running tests locally. TLDR: 1. Is there any reason for test_curses not to use sys.__stdout__? 2. Any ideas on how to get test_curses working with regrtest.py -j? -- components: Tests messages: 141477 nosy: ezio.melotti, haypo, michael.foord, nadeem.vawda, pitrou, r.david.murray priority: normal severity: normal status: open title: test_curses skipped on buildbots type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12640] test_ctypes seg fault (test_callback_register_double); armv7; gcc 4.5.1
python272 letters.rando...@gmail.com added the comment: problem also occurs when built with configure option --with-system-ffi not sure whether it might be a compiler bug or an invalid test? some debug output: [@localhost Python-2.7.2]$ gdb ./python (gdb) run -Wd -3 -E -tt ./Lib/test/regrtest.py -v test_ctypes ... test_ushort (ctypes.test.test_callbacks.Callbacks) ... ok test_callback_register_double (ctypes.test.test_callbacks.SampleCallbacksTestCase) ... Program received signal SIGSEGV, Segmentation fault. 0x9998 in ?? () (gdb) where #0 0x9998 in ?? () #1 0x40409718 in _testfunc_cbk_reg_double (a=5.5, b=1.1964487668029418e-47, c=1.001023, d=0, e=1.5999e-05, func=0x999a) at /home/Python-2.7.2/Modules/_ctypes/_ctypes_test.c:39 #2 0x41edc9a0 in ffi_call_SYSV () from /usr/lib/libffi.so.5 #3 0x4016 in slot_tp_iter (self=Cannot access memory at address 0xffe0 ) at Objects/typeobject.c:5579 Backtrace stopped: previous frame inner to this frame (corrupt stack?) the referenced file snippets: /home/Python-2.7.2/Modules/_ctypes/_ctypes_test.c 35 EXPORT(double) 36 _testfunc_cbk_reg_double(double a, double b, double c, double d, double e, 37 double (*func)(double, double, double, double, double)) 38 { 39 return func(a*a, b*b, c*c, d*d, e*e); /home/Python-2.7.2/Objects/typeobject.c 5567 static PyObject * 5568 slot_tp_iter(PyObject *self) 5569 { 5570 PyObject *func, *res; 5571 static PyObject *iter_str, *getitem_str; 5572 5573 func = lookup_method(self, __iter__, iter_str); 5574 if (func != NULL) { 5575 PyObject *args; 5576 args = res = PyTuple_New(0); 5577 if (args != NULL) { 5578 res = PyObject_Call(func, args, NULL); 5579 Py_DECREF(args); 5580 } 5581 Py_DECREF(func); 5582 return res; 5583 } -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12669] test_curses skipped on buildbots
Nadeem Vawda nadeem.va...@gmail.com added the comment: Correction: the offending options are -j and *-W* (display test output on failure), not -w (re-run failed tests in verbose mode). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12670] Fix struct code after forward declaration on ctypes doc
New submission from Sandro Tosi sandro.t...@gmail.com: Hello, following up http://mail.python.org/pipermail/docs/2011-July/004974.html here's a patch (applicable on 2.7, 3.2 and 3.3) to fix the struct declaration in the forward declaration example. -- assignee: docs@python components: Documentation files: ctypes_fwd_declaration-default.patch keywords: patch messages: 141480 nosy: docs@python, sandro.tosi priority: normal severity: normal stage: patch review status: open title: Fix struct code after forward declaration on ctypes doc versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file22814/ctypes_fwd_declaration-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12670 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12671] urlopen returning empty string
New submission from Matthew Barnett pyt...@mrabarnett.plus.com: Someone over at StackOverflow had a problem with urlopen in Python 3.2.1: http://stackoverflow.com/questions/6892573/problem-with-urlopen/6892843#6892843 This is the code: from urllib.request import urlopen f = urlopen('http://online.wsj.com/mdc/public/page/2_3020-tips.html?mod=topnav_2_3000') page = f.read() f.close() With Python 3.1 and Python 3.2 it works OK, but with Python 3.2.1 the read returns an empty string. -- components: Library (Lib) messages: 141481 nosy: mrabarnett priority: normal severity: normal status: open title: urlopen returning empty string type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12562] calling mmap twice fails on Windows
Vlad Riscutia riscutiav...@gmail.com added the comment: Reason you are seeing the failure for this is following change from 2.5 in mmapmodule.c (:1109): m_obj-data = (char *) MapViewOfFile(m_obj-map_handle, dwDesiredAccess, 0, 0, 0); changed to mmapmodule.c (:1414 in 3.3): m_obj-data = (char *) MapViewOfFile(m_obj-map_handle, dwDesiredAccess, off_hi, off_lo, m_obj-size); Previously size wasn't passed to MapViewOfFile. Passing new size to MapViewOfFile greater than the size of previous map causes an error. This seems to be by design. From MSDN: MapViewOfFile: dwNumberOfBytesToMap [in] The number of bytes of a file mapping to map to the view. All bytes must be within the maximum size specified by CreateFileMapping. If this parameter is 0 (zero), the mapping extends from the specified offset to the end of the file mapping. CreateFileMapping: lpName [in, optional] The name of the file mapping object. If this parameter matches the name of an existing mapping object, the function requests access to the object with the protection that flProtect specifies. So on second call, CreateFileMapping will get back the previous mapping object, which has 4096 bytes of memory mapped. MapViewOfFile will try to map beyond its limit and get an error. I am curious how resizing worked before. I tried passing size=0 to MapViewOfFile on second call (length=8192) then call VirtualQuery on the returned map, which can query the size of the buffer. Size is still 4096. So even if length=8192 and we call CreateFileMapping with this length, it will return the previous 4096 byte-buffer. This looks to me like an issue which existed until Python 2.5, namely this error was silenced and returned map was still 4096 bytes, just claiming to be 8192. The way it is behaving now seems to be the correct way. -- nosy: +vladris ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12671] urlopen returning empty string
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: Just been told this bug has already been reported as issue #12576. -- resolution: - duplicate ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12671] urlopen returning empty string
Changes by Matthew Barnett pyt...@mrabarnett.plus.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11651] Improve test targets in Makefile
Nadeem Vawda nadeem.va...@gmail.com added the comment: I have attached a Python script which does what Antoine's patch does except which is expected to live in Tools/scripts. The perk of doing this in a Python script is that Windows users will be able to simply execute the script while the Makefile can be made to execute the script itself for those that prefer ``make test`` over ``./python Tools/scripts/run_tests.py``. I've attached a patch that reworks the Makefile test targets to use this script (with some minor modifications). Some notes: - By doing things this way, we lose the ability to specify custom arguments to the interpreter with $(TESTPYTHONOPTS). Might this be a problem? - The test and quicktest targets now use -u all,-largefile,-audio,-gui, which permits more tests to be run. On my current system, this adds about 20s to the running time for make test (~3m45s instead of ~3m25s). - regrtest.py now accepts -u none, explicitly specifying the default setting (to override the setting used by run_tests.py). This isn't strictly necessary, but it seemed good to have, for the sake of completeness. - I've changed the meaning of -j 1 -- instead of using a single subprocess, it runs the tests directly in the current process. This allows us to use the run_tests.py script for make buildbottest and still have the exact same semantics (using even one subprocess can cause problems for e.g. test_curses). Any thoughts? -- Added file: http://bugs.python.org/file22815/test-runner.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11651 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12648] Wrong import module search order on Windows
Nick Coghlan ncogh...@gmail.com added the comment: As far as I know, not as a top-level module in an installed version of Python (at least, not without mucking about in the registry). Shadowing standard library modules is generally a bad idea, and this is one of the reasons. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12648 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7089] shlex behaves unexpected if newlines are not whitespace
Ann Elliott elliott@osu.edu added the comment: This error still occurs in version 3.3.0a0. -- nosy: +elliotta versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7089 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12668] 3.2 What's New: it's integer-string, not the opposite
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12672] Some problems in documentation extending/newtypes.html
New submission from Eli Bendersky eli...@gmail.com: Reading the C API documentation: extending/newtypes.html Some problems: 1. In the first paragraph of 2.1 - to distinguish them from things like [].append, it's unclear what [].append is. Maybe [] and append? 2. The C coding convention is unusual and non PEP-7 in 2.1.1 (after if (self-first == NULL) in Noddy_new) 3. The previous problem repeats in other instances of Noddy_new in the document I found these while reading the 2.7 docs, but they could also exist in 3.x (didn't check). -- assignee: docs@python components: Documentation keywords: easy messages: 141487 nosy: docs@python, eli.bendersky priority: low severity: normal status: open title: Some problems in documentation extending/newtypes.html versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12672 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12659] Add tests for packaging.tests.support
Changes by shane moore dstor...@gmail.com: -- nosy: +shane.moore ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12659 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com