[issue22739] There is no disk in the drive error
New submission from Lachlan Kingsford: An error is being raised that 'There is no disk in the drive. Please insert a disk into drive \Device\Harddisk1\DR1. Cancel, Try Again, Continue)'. The line of code referred to has no reference to any file or disk access. None of its calling procedures have any file or disk access. As such, I am fairly confident that the error is not caused by an error in my code. The Python interpreter was embedded via cx_freeze. The embedded interpreter was Win64 running on 64 bit Windows 7. The computer that reported the bug did not have Python installed on it. I have been unable to replicate the bug. Similar bugs have been reported due to USB sticks and phones, but none were plugged in or removed while the program was being run. At this stage, I am unsure if this is a bug with Windows, cx_freeze, or pygame. The bug is also listed on https://github.com/lkingsford/AtlasWarriors/issues/5, with access to the source available. You can view the stack trace and an image of the error, and the stack trace there. I am not sure if this is a known issue but I am unable to find any reference to it. -- components: IO, Windows messages: 230060 nosy: Lachlan.Kingsford, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: There is no disk in the drive error versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22739 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22256] pyvenv should display a progress indicator while creating an environment
Vinay Sajip added the comment: It looks as if ensurepip is where changes should happen. The venv code just makes a subprocess.check_output() call to ensurepip, and anything that ensurepip outputs would be displayed on the console. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22256 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22725] improve documentation for enumerate() (built-in function)
Georg Brandl added the comment: next() is quite unlike match() and search(), as you almost never use next() on iterators directly. Rather, the iterator is iterated by constructs like a for loop or a comprehension, or another function that consumes it (list, map, ...) -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22725 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22739] There is no disk in the drive error
Tim Golden added the comment: I very much doubt that this is a Python issue as such. Other things being equal, I would expect Harddisk\DR1 to be a CD-ROM or some other removable disk. Using something like winobj.exe from sysinternals should show what it expects to be on a given machine. It's certainly possible that the machine on which cx_freeze is being used has a permanent D: drive while the corresponding drive on the target machine is removable. (Strictly Harddisk\DR1 needn't be the D: drive and it needn't be removable, but that's far and away the most common configuration). I obviously can't say why any code should be be trying to access that drive. You could try running procexp.exe (sysinternals again) to see what handle is being attempted on that drive by that program which might lend a clue as to where the problem is arising. But, again, I don't believe this is a Python issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22739 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10548] Error in setUp not reported as expectedFailure (unittest)
Michael Foord added the comment: Assertions are not uncommon in setUp. setUp is for setting up common state shared between tests and I regularly want to assert that state creation / preconditions are correct. I've never been bitten by this issue (I rarely use expectedFailure), but it's worth noting the use case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22740] Cache error
New submission from Stephan Monecke: `python2 test.py` results in the following error: Traceback (most recent call last): File test.py, line 1, in module import seaborn as sns File /path/seaborn.py, line 4, in module sns.set(style=ticks) AttributeError: 'module' object has no attribute 'set' seaborn.py is an old plot-file thats already deleted. -- components: Extension Modules messages: 230065 nosy: smoneck priority: normal severity: normal status: open title: Cache error type: crash versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22740 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22740] Cache error
Stephan Monecke added the comment: Edit: test.py contains just import seaborn as sns -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22740 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22725] improve documentation for enumerate() (built-in function)
Van Ly added the comment: While next() is rarely used directly on iterators, as you say, it may help to remind the experienced reader of the mechanical characteristic in essence which a new reader on first approach uses to construct a mental model. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22725 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22741] suggestion for improving wording on len(s) (built-in function)
New submission from Van Ly: -- suggest the following because -- the parenthetical parts interrupt the reading too often len(s) Returns a length count, the number of objects in argument s which may be a sequence, or mapping: a string, list or tuple, or a dictionary. -- assignee: docs@python components: Documentation messages: 230068 nosy: docs@python, vy0123 priority: normal severity: normal status: open title: suggestion for improving wording on len(s) (built-in function) type: enhancement versions: Python 2.7, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22741 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22740] Cache error
Stephan Monecke added the comment: Problem found. Induced by a .pyc file in the folder. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22740 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22740] Cache error
Changes by Georg Brandl ge...@python.org: -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22740 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22731] test_capi test fails because of mismatched newlines
Nick Coghlan added the comment: Argh, you're making me page _testembed back into my brain. I try to avoid having to do that ;) Anyway, this doesn't look like the right fix to me - although it may indeed be a test bug uncovered by a VC10-VC14 behavioural change in the behaviour of printf(). The origin of the output being checked is https://hg.python.org/cpython/file/default/Programs/_testembed.c#l79 Note the mixture of output from C level printf() calls and Python level print() calls inside check_stdio_details(). My guess would be that VC10 is translating '\n' to '\r\n' in the printf() calls, and VC14 has stopped doing that. To confirm my theory: check if it is only the lines that start with Expected that end with '\n' rather than '\r\n' under VC14 (those are the ones produced directly from C - the others are produced via Python's print builtin). If that *is* what's happening, we may want to convert the embedding tests over to running the subprocess in universal newlines mode, and adjust the expected output accordingly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22731 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22731] test_capi test fails because of mismatched newlines
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22731 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22725] improve documentation for enumerate() (built-in function)
Ethan Furman added the comment: I do not think 'next' is needed in this context. Unlike 'match' and 'search', 'next' is a function that can be used with any iterator and mentioning it here is unnecessary. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22725 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22738] improve sys.argv, 'python -h' documentation
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22738 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22741] suggestion for improving wording on len(s) (built-in function)
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22741 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22678] An OSError subclass for no space left on device would be nice
STINNER Victor added the comment: The PEP 3151 introduced specialized subclasses of OSError. Antoine Pitrou conducted a survey to decide which errors are common enough to merit a builtin exception: http://legacy.python.org/dev/peps/pep-3151/#appendix-a-survey-of-common-errnos ENOSPC is not mentionned in the PEP. According to 0002-Use-the-new-NoSpaceError.patch the error is rare: only used *once* in Python... and only in a very specific unit test (to workaround an issue on a specific buildbot...). It looks like ENOSPC is available on Linux, Windows, FreeBSD and Mac OS X. It is part of the POSIX standad, ex: http://pubs.opengroup.org/onlinepubs/009604599/basedefs/errno.h.html -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22678 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22741] suggestion for improving wording on len(s) (built-in function)
Stefan Krah added the comment: The original wording is clearer (this also applies to similar issues that have been opened recently). -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22741 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22678] An OSError subclass for no space left on device would be nice
Antoine Pitrou added the comment: That said I am not against adding a new error for this, but I agree the need is probably rather rare (the error is rare in itself, and there's not much to do if you hit a disk space issue, usually). I'm going to wait for other people to come with comments and possible use cases. In any case, thank you for submitting a patch, this is appreciated. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22678 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22256] pyvenv should display a progress indicator while creating an environment
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22256 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22737] Provide a rejected execution model and implementations for futures.
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22722] inheritable pipes are unwieldy without os.pipe2
STINNER Victor added the comment: Would it be acceptable to implement a pipe2 shim for those platforms? If I understand correctly, you propose to add an option inheritable parameter to os.pipe(): def os.pipe(inheritable=False): ... The PEP 446 was written to fix race conditions. os.pipe(inheritable=True) would create a race condition if another thread calls fork(). What is your use case? Please elaborate. The subprocess module makes pass_fds file descriptors inheritables in a safe way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22722 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21668] The select and time modules uses libm functions without linking against it
Changes by Matt Frank matthew.i.fr...@intel.com: -- nosy: +WanderingLogic Added file: http://bugs.python.org/file37041/audioop_ctypes_test_link_with_libm.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21668 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21668] The select and time modules uses libm functions without linking against it
Matt Frank added the comment: Additionally, * audioop calls floor() * _ctypes_test calls sqrt() Patch attached. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21668 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21668] The select and time modules uses libm functions without linking against it
Changes by Matt Frank matthew.i.fr...@intel.com: -- nosy: +freakboy3742 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21668 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail
Changes by Matt Frank matthew.i.fr...@intel.com: -- nosy: +freakboy3742 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20306 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21668] The select and time modules uses libm functions without linking against it
STINNER Victor added the comment: audioop_ctypes_test_link_with_libm.patch + libraries=['m']) Why not using math_libs here? It would also be nice to add a comment explaining why libm is needed in each module. Can someone please combine both patches? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21668 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22742] IDLE shows traceback when printing non-BMP character
New submission from Alexander Belopolsky: print(\N{ROCKET}) Traceback (most recent call last): File pyshell#1, line 1, in module print(\N{ROCKET}) File idlelib/PyShell.py, line 1352, in write return self.shell.write(s, self.tags) UnicodeEncodeError: 'UCS-2' codec can't encode character '\U0001f680' in position 0: Non-BMP character not supported in Tk Shouldn't IDLE replace non-encodable characters with \uFFFD? I think \N{ROCKET} � is user-friendlier than the traceback. See also #14304. -- components: Library (Lib) messages: 230078 nosy: belopolsky priority: normal severity: normal status: open title: IDLE shows traceback when printing non-BMP character type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22742 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22743] Specify supported XML version
New submission from Friedrich Spee von Langenfeld: The W3C has published two versions of the standard specification for the Extensible Markup Language (XML) [version 1.0 and 1.1]. I know that the W3C expects all parsers to understand both versions. I propose to state here (https://docs.python.org/3/library/xml.html) which versions of XML Python supports, especially, because https://docs.python.org/3/library/xml.etree.elementtree.html uses version 1.0 of the W3C recommendation in its examples. The version compatibility is named in https://docs.python.org/3/library/pyexpat.html#xml.parsers.expat.xmlparser.XmlDeclHandler , but I don´t think a normal user, who only want a quick, but reliable solution, would ever read this entry. What do you think? -- assignee: docs@python components: Documentation messages: 230079 nosy: Friedrich.Spee.von.Langenfeld, docs@python priority: normal severity: normal status: open title: Specify supported XML version type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22743 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21668] The select and time modules uses libm functions without linking against it
Matt Frank added the comment: audioop_ctypes_test_link_with_libm.patch + libraries=['m']) Why not using math_libs here? math_libs is defined in detect_modules(). But the _ctypes_test extension is defined in a different function: detect_ctypes(). The other option, would be to define math_libs=['m'] directly above this line and then use it once. I didn't think that added clarity, but I'd be happy to do it that way if it fits better with standard style. It would also be nice to add a comment explaining why libm is needed in each module. Done. Can someone please combine both patches? Done. -- Added file: http://bugs.python.org/file37042/time_select_audioop_ctypes_test_link_with_libm.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21668 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22695] open() declared deprecated in python 3 docs
Василий Макаров added the comment: I can confirm this issue is fixed for now. Closing ticket.. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22695 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22744] os.path.join on Windows creates invalid paths with spaces
New submission from tegavu: Windows does not like/permit folders with spaces in the beginning or folders and files with a tailing space character, as this will cause problems. The python functions for os.mkdir will solve this by eliminating the blanks automatically. But os.path.join() will give wrong results. Example: #Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) import os dir1 = c:\\ dir2 = test file = test.txt os.mkdir( os.path.join(dir1, dir2) ) # this will correctly create c:\test\ f = open( os.path.join(dir1, dir2, file) ,wb) # this will fail with 'FileNotFoundError: [Errno 2] No such file or directory: 'c:\\test \\test.txt'' print(__ + os.path.join(dir1, dir2, file) + __) # this will incorrectly show 'c:\test \test.txt' # or if you chose to also have spaces at the end of test.txt will show them -- messages: 230082 nosy: tegavu priority: normal severity: normal status: open title: os.path.join on Windows creates invalid paths with spaces type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22744 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22745] cgitb with Py3: TypeError: 'str' does not support the buffer interface
New submission from Wolfgang Rohdewald: The attached script works with Python2.7. With Python3.4, it produces Traceback (most recent call last): File /usr/lib/python3.4/cgitb.py, line 268, in __call__ self.handle((etype, evalue, etb)) File cgibug.py, line 12, in handle cgitb.Hook.handle(self, info) File /usr/lib/python3.4/cgitb.py, line 273, in handle self.file.write(reset()) TypeError: 'str' does not support the buffer interface When replacing the file mode 'wb' with 'w', it produces this failure: File /usr/lib/python3.4/cgitb.py, line 288, in handle self.file.write(doc + '\n') TypeError: can't concat bytes to str The script works as expected with Python2.7 with both file modes. -- components: Library (Lib) files: cgibug.py messages: 230083 nosy: wrohdewald priority: normal severity: normal status: open title: cgitb with Py3: TypeError: 'str' does not support the buffer interface type: crash versions: Python 3.4 Added file: http://bugs.python.org/file37043/cgibug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22745 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9351] argparse set_defaults on subcommands should override top level set_defaults
R. David Murray added the comment: If I understand you correctly, that would mean that if the namespace keyword is not used, we'd have the fixed behavior, but if the namespace keyword is used, we'd have the backward compatible behavior? If I'm understanding correctly, that sounds like a good solution to me (coupled with backing this out of the maint versions). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9351 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22746] cgitb html: wrong encoding for utf-8
New submission from Wolfgang Rohdewald: The attached script shows the non-ascii characters wrong wherever they occur, including the exception message and the comment in the source code. Looking at the produced .html, I can say that cgitb simply passes the single byte utf-8 codes without encoding them as needed. Same happens with Python3.4 (after applying some quick and dirty changes to cgitb.py, see bug #22745). -- components: Library (Lib) files: cgibug.py messages: 230085 nosy: wrohdewald priority: normal severity: normal status: open title: cgitb html: wrong encoding for utf-8 type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file37044/cgibug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22746 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22725] improve documentation for enumerate() (built-in function)
R. David Murray added the comment: That would not be consistent with the rest of the docs. Consider, for example, that the full documetation of dictionary views (https://docs.python.org/3/library/stdtypes.html#dictionary-view-objects), which are iterables in much the same way that the enumerate object is, does not mention next. The glossary link to iterable will lead the reader to the discussion of next, which is a fundamental Python concept and does not need to be repeated. In my opinion, of course, others may disagree. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22725 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10548] Error in setUp not reported as expectedFailure (unittest)
R. David Murray added the comment: Can you ever imagine the assertions in the setUp being what you would want reported as an expected failure? I would think that setUp assertion failure would be something you would want to be always reported as a failure, even if you expect the test itself to fail. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17896] Move Windows external libs from src\..\ to src\externals
Steve Dower added the comment: Not so keen on having separate folders for Python version, mostly because I want to avoid having the current version in too many locations. I've settled on patchlevel.h as the canonical source of the version number for my VC14 branch - everything else should read it from there. If the patch is updated to read it from patchlevel.h then I'm +1. Otherwise +0, and I'll probably update it later myself :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17896 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10548] Error in setUp not reported as expectedFailure (unittest)
Michael Foord added the comment: Maybe if the expectedFailure is applied to the whole class and it's the setUp that is unable to work. I've never seen it used that way of course (mostly because it doesn't work that way) - but I *can* imagine it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17717] Set up nasm from external.bat
Steve Dower added the comment: Practically this is very easy to do, and I'm more than willing to author detection into the new PCbuild files. Having nasm mirrored on svn.python.org (or anywhere on a PSF host) would be real nice though. I don't particularly like making the build system rely on potentially unreliable external sites. Not sure what the legal ramifications here are though... -- nosy: +steve.dower ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17717 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22738] improve sys.argv, 'python -h' documentation
R. David Murray added the comment: I don't understand how your suggested change would affect the font size issue (nor do I really understand it as a sentence). For your second suggestion (which is unrelated), how about instead: -c str : interpret str as a program (terminates option list) That would make the phrasing more consistent with the text for the other options. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22738 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22740] Cache error
Changes by R. David Murray rdmur...@bitdance.com: -- stage: - resolved type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22740 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17896] Move Windows external libs from src\..\ to src\externals
Zachary Ware added the comment: I'm ambivalent on per-version externals dirs by now; I've since found it much easier to maintain hg-shared repos per branch. I'll go ahead with this shortly on all three branches, unless there are objections to it on 2.7 and 3.4. -- versions: +Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17896 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22731] test_capi test fails because of mismatched newlines
Steve Dower added the comment: Argh, you're making me page _testembed back into my brain. I try to avoid having to do that ;) Hehe, sorry. My guess would be that VC10 is translating '\n' to '\r\n' in the printf() calls, and VC14 has stopped doing that. To confirm my theory: check if it is only the lines that start with Expected that end with '\n' rather than '\r\n' under VC14 (those are the ones produced directly from C - the others are produced via Python's print builtin). Confirmed. Enabling universal_newlines and using '\n'.join() instead of os.linesep.join() for the expected result works. Does that sound like it would be the correct fix? Or is the printf() change something that we should try and keep consistent with VC10? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22731 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22745] cgitb with Py3: TypeError: 'str' does not support the buffer interface
Amaury Forgeot d'Arc added the comment: html is text, so the file mode should be 'w'. But I don't reproduce the behavior with Python version v3.4.2. Which version are you using exactly? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22745 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22732] ctypes tests don't set correct restype for intptr_t functions
Steve Dower added the comment: I missed c_size_t somehow, but as eryksun says, it's not strictly the same thing. Of course, my current patch isn't the same thing either as it only supports 32-bit and 64-bit pointer sizes. I could make a bigger change to use c_void_p and compare its .value against None instead of 0 (which seems to be the only difference)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22732 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22741] suggestion for improving wording on len(s) (built-in function)
R. David Murray added the comment: Agreed. The original follows the rules of standard written English (especially as regards to punctuation), while the suggested replacement does not. -- nosy: +r.david.murray resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22741 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22744] os.mkdir on Windows silently strips trailing blanks from directory names
R. David Murray added the comment: I would classify that as a bug in mkdir (it should raise an error). The blank-elimination is almost certainly being done at the OS layer (windows) rather than the Python layer, though, and I doubt it is something we can fix at the Python layer for backward compatibility reasons. (If we can, it would only be in 3.5, so I'm changing the version). It is definitely *not* a bug in join. Probably this issue should be closed as not a bug. -- components: +Windows nosy: +r.david.murray, steve.dower, tim.golden, zach.ware title: os.path.join on Windows creates invalid paths with spaces - os.mkdir on Windows silently strips trailing blanks from directory names versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22744 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14304] Implement utf-8-bmp codec
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14304 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22745] cgitb with Py3: TypeError: 'str' does not support the buffer interface
R. David Murray added the comment: I don't think what html is is relevant here. Hook is going to be dealing with strings, though, so 'w' is indeed correct. The script works fine for me as well. (Also tested it on 3.3.2 since I had it laying around, so it's not a recent bugfix). -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22745 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22746] cgitb html: wrong encoding for utf-8
R. David Murray added the comment: If you look at the file, you'll find that the data is in utf-8 (at least if your locale is a utf-8 locale). However, html is by default interpreted as latin-1, so that's what the webrowser displays when you pass the file on disk to it. If you add encoding='latin-1' to your open call, your script will work. What you do if you need to display non-latin1 characters, I don't know. (See https://bugzil.la/760050, for example). Note: the above is for python3. I don't remember how you do the equivalent in python2...a naive codecs.open call just got me a UnicodeDecodeError. -- nosy: +r.david.murray resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22746 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22744] os.mkdir on Windows silently strips trailing blanks from directory names
tegavu added the comment: Well then the bug is also for example in the open() to create a file, beause it will also remove tailing spaces (files can have spaces in the front, while folders cannot have spces on either side). Although I still think an API to create a path should warn if this path cannot be valid. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22744 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22744] os.mkdir on Windows silently strips trailing blanks from directory names
Steve Dower added the comment: Paths are processed by the Windows API. This processing includes (at least): * resolve to current directory * convert forward slashes to backslashes * remove adjacent backslashes * trim trailing dots and spaces from names * resolve short path names This processing can be skipped with the '\\?\' prefix, but in general it shouldn't be. I would be okay with seeing this processing performed by pathlib so that str(Path(C:\\) / test) == C:\\test (or maybe as part of .resolve() - there's another issue where we started discussing this), but I would be really hesitant to change ntpath to do it or detect it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22744 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17896] Move Windows external libs from src\..\ to src\externals
Steve Dower added the comment: Sounds good to me. I thought about the shared repo approach, but I don't understand fully how merging between 2.7, 3.4 and default works in that scenario (simply because I've never tried it - maybe it's really easy?) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17896 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22744] os.mkdir on Windows silently strips trailing blanks from directory names
R. David Murray added the comment: Yeah, to os.path, paths are just strings, and there's no reference made to the actual file system. The blanks are valid on unix, for example (unless you pass them to the shell without escaping them). As Steve indicated, parts of Pathlib might make a different decision about that, but os.path...can't really, and still remain a mostly-portable API (not to mention backward compatibility). Or, to look at this another way, Python is giving you exactly the errors that you would get from Windows itself if you passed it the strings you are passing it, and no more. Python is faithfully constructing those strings according to *string* rules, and it is Windows that is transforming *some* of them into other strings. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22744 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7559] TestLoader.loadTestsFromName swallows import errors
Robert Collins added the comment: I've updated the patch to try and address the niggling clarity issues from the review. Please let me know what you think (and if I hear nothing I'll commit it as-is since the review was still ok). -- Added file: http://bugs.python.org/file37045/issue7559.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7559 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10548] Error in setUp not reported as expectedFailure (unittest)
Robert Collins added the comment: assertions in setUp are fine IMO. But here's the thing. WHat should this code do? class Demo(unittest.TestCase): def setUp(self): raise Exception('hi') def test_normal(self): # this should NOT be covered by expectedFailure pass @unittest.expectedFailure def test_expected_fail(self): pass This will fail today because the decorator doesn't affect setUp. If we apply a patch to change this, it will fail because test_normal doesn't apply the decorator. I can imagine with dependency injection that one could set this up and have it genuinely configured correctly: but if one is doing that I'd expect the dimension of variance to be per scenario, not per test method. So it still wouldn't make sense to me. @nick - yes, thats exactly right, this is at most docs IMO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined
New submission from Matt Frank: On systems where configure is unable to find langinfo.h (or where nl_langinfo() is not defined), configure undefines HAVE_LANGINFO_H in pyconfig.h. Then in pythonrun.c:get_locale_encoding() the call to nl_langinfo() is wrapped in an #ifdef, but the #else path on the ifdef does a PyErr_SetNone(PyExc_NotImplementedError) and returns NULL, which causes initfsencoding() to fail with the message Py_Initialize: Unable to get the locale encoding, which causes the interpreter to abort. I'm confused because http://bugs.python.org/issue8610 (from 2010) seems to have come down on the side of deciding that nl_langinfo() failures should be treated as implicitly returning either ASCII or UTF-8 (I'm not sure which). But maybe that was for a different part of the interpreter? In any case there are 4 choices here, all of which are preferable to what we are doing now. 1. Fail during configure. If we can't even start the interpreter, then why waste the users time with the build? 2. Fail during compilation. The #else path could contain #error Python only works on systems where nl_langinfo() is correctly implemented. Again, this would be far preferable to failing only once the user has finished the install and tries to get the interpreter prompt. 3. Implement our own python_nl_langinfo() that we fall back on when the system one doesn't exist. (It could, for example, return ASCII (or ANSI_X3.4-1968) to start with, and UTF-8 after we see a call to setlocale(LC_CTYPE, ) or setlocale(LC_ALL, ). 4. just return the string ASCII. The attached patch does the last. I'm willing to try to write the patch for choice (3) if that's what you'd prefer. (I have an implementation that does (3) for systems that also don't have setlocale() implemented, but I don't yet know how to do it if nl_langinfo() doesn't exist but setlocale() does.) -- components: Interpreter Core files: no_langinfo_during_init.patch keywords: patch messages: 230106 nosy: Arfrever, WanderingLogic, haypo, lemburg, loewis, pitrou priority: normal severity: normal status: open title: Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined type: crash versions: Python 3.4 Added file: http://bugs.python.org/file37046/no_langinfo_during_init.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22747 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22732] ctypes tests don't set correct restype for intptr_t functions
Antoine Pitrou added the comment: Well, if c_size_t is incorrect, then let's go with the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22732 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17896] Move Windows external libs from src\..\ to src\externals
Zachary Ware added the comment: Basically, after: hg clone h.p.o/cpython default hg share default 3.4 hg share default 2.7 hg -R 3.4 update 3.4 hg -R 2.7 update 2.7 the 2.7, 3.4, and default directories are separate working copies created from the same history, each at a different revision. As soon as a changeset is created in one, it's available in the others (but the other working copies don't change). So after commiting to 2.7 (from within the 2.7 dir), `cd ..\3.4 hg graft 2.7` will try to graft your new changeset to 3.4, then `cd ..\default hg merge 3.4` will merge it with default. hg push will push the same thing from any of the three directories. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17896 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17896] Move Windows external libs from src\..\ to src\externals
Terry J. Reedy added the comment: Since all other dependency directories are dependency version specific, the only problem with a common external directory is the unversioned tcltk/. What do you plan to do with that? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17896 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17896] Move Windows external libs from src\..\ to src\externals
Zachary Ware added the comment: There's no change from the status quo on that front: the only change is that the $(externalsDir) VS variable becomes ..\externals instead of ..\... Is there an open issue for versioning the tcltk[64] dirs? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17896 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined
STINNER Victor added the comment: I'm confused because http://bugs.python.org/issue8610 (from 2010) seems to have come down on the side of deciding that nl_langinfo() failures should be treated as implicitly returning either ASCII or UTF-8 It's very important than Py_DecodeLocale and Py_EncodeLocale use the same encoding than sys.getfilesystemencoding(). What is your platform? Which encoding is used by these functions? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22747 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22738] improve sys.argv, 'python -h' documentation
Van Ly added the comment: The font choice is a matter of style beyond me. I commented on it as I saw it. The second rendering looks in Capital relative to the first rendering. The problem wasn't there in v.2.7.5. In saying that, perhaps the information would be picked up by someone knowledgeable about the style sheet. The focus of the suggestion is in the head line about the wording. I chose 'feed' because it would align with the theme of python and pickling. 'interpret' isn't as nice a picture word. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22738 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22741] suggestion for improving wording on len(s) (built-in function)
Van Ly added the comment: (Well that is a stick in the mud and slap in the face attitude to different ways of describing what is there.) You have the documentation for len(s) perfect, __for_everyone__. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22741 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22738] improve 'python -h' documentation for '-c'
R. David Murray added the comment: Well, again, your suggested change for sys.argv is less optimal English. The text as is seems fine to me. 'feed' is a term generally used when there is a source separate from the command (for example, we speak about a unix pipe feeding data from one command to the next). A command line argument is not generally spoken about as being fed into the command. And the relevance of pickle in this context completely escapes me. Interpret programs is what Python does (Python is, after all, one of the class of programs referred to as an interpreter). I thank you for your desire to improve the python documentation, but so far your suggestions have not been improvements. It would probably be most helpful if you stick to pointing out places where you found the documentation confusing, explain your confusion as much as you can, and leave the writing of the improvements to the native English speakers. -- title: improve sys.argv, 'python -h' documentation - improve 'python -h' documentation for '-c' ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22738 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22738] improve 'python -h' documentation for '-c'
Van Ly added the comment: I don't know what you mean by optimal English. As is, the English is of the native English speaker's comfy couch guides speaking to guides kind rather than guides speaking to audience wanting to be guided by. The suggestion I offered is imperfect and can be improved or rejected. As communication, it is shorter than the original and applies the dry principle, don't repeat yourself. Command occurs twice and the native English speaker may feel they are different in their senses. As sequence was in another suggestion for enhancement (and not a bug). You have your point of view which is from the internal technical guts of this language. I am approaching the language from the fun of Monty Python and imagery of a python pickled in a jar. I have done a few tutorials and read code with this reference guide as I would use a dictionary to explain words in a passage. I expect in a final stage of approval an editor ensures correctness of English to whatever the standard is. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22738 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22738] improve 'python -h' documentation for '-c'
Van Ly added the comment: -c str : interpret str as a program (terminates option list) +1 (feed is shorter) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22738 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22746] cgitb html: wrong encoding for utf-8
Wolfgang Rohdewald added the comment: If you cannot offer a solution for arbitrary unicode, you have no solution at all. Afer all, that is what unicode is about: support ALL languages, not only your own. I do not quite understand why you think this is not a bug. If cgitb encodes unicode like x e 4 ; (remove spaces), the browser does not have to guess the encoding, it will always show the correct character. This works for all of unicode. See https://en.wikipedia.org/wiki/Unicode_and_HTML#Numeric_character_references So this bug is fixable, I am reopening it. For Python3, the fix is actually very simple: Do not write doc but str(doc.encode('ascii', 'xmlcharrefreplace')), like in the attached patch. This patch works for me but there might be yet uncovered code paths. And my source file is encoded in utf-8, other source file encodings should be tested too. I do not know if cgitb correctly honors the source file header like # -*- coding: utf-8 -*- Fixing this for Python2 is certainly doable too but perhaps more difficult because a Python2 str() may have an unknown encoding. -- keywords: +patch resolution: not a bug - status: closed - open Added file: http://bugs.python.org/file37047/22746.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22746 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22746] cgitb html: wrong encoding for utf-8
Changes by Wolfgang Rohdewald wolfg...@rohdewald.de: -- resolution: - remind ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22746 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22745] cgitb with Py3: TypeError: 'str' does not support the buffer interface
Wolfgang Rohdewald added the comment: This now works with mode 'w' and after reinstalling the packages. My Python is 3.4.0 (ubuntu). -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22745 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22748] Porting Extension Modules to Python 3 documentation mention about PyString_* functions in Python 3
New submission from Berker Peksag: Porting Extension Modules to Python 3 document mention about PyString_* functions in Python 3. I think the correct prefix should be PyUnicode_*. From https://docs.python.org/3/howto/cporting.html#str-unicode-unification: Python 3’s str() (PyString_* functions in C) type is equivalent to Python 2’s unicode() (PyUnicode_*). -- assignee: docs@python components: Documentation messages: 230119 nosy: benjamin.peterson, berker.peksag, docs@python priority: normal severity: normal stage: needs patch status: open title: Porting Extension Modules to Python 3 documentation mention about PyString_* functions in Python 3 versions: Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22748 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com