[issue14965] super() and property inheritance behavior
Simon Zack added the comment: For those who want to use this right away, I've added a python implementation of the patch, which passes the unit tests. There's a slight difference in usage, where instead of using super() directly, super_prop(super()) needs to be used, so we can still use super without arguments. -- Added file: http://bugs.python.org/file37546/superprop.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14965 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23107] Tighten-up search loops in sets
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23107 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23119] Remove unicode specialization from set objects
New submission from Raymond Hettinger: This tracker item is to record experiments with removing unicode specialization code from set objects and run timings to determine the performance benefits or losses from those specializations. * Removes the set_lookkey_unicode() function and the attendant so-lookup indirections. That saves 60 lines of code. On each lookup, it saves one indirection for the lookup dispatch, but in the case of unicode only tables, it costs an additional indirection through the abstract API for PyObject_RichCompareBool. * Removes the specialization code in add, discard, and contains functions to check for a unicode key with an already computed hash value. This saves a type check (cheap), a hash field check, and a nine lines of code. In the cast where the hash value would have already been computed, it costs a call to PyObject_Hash (which has an indirection, but otherwise does the same field test that we are doing). The working hypothesis is that this specialization code saves only a little in cases where it applies and adds a little to all the cases where it does not apply. (Note, the use cases for sets are less likely than dicts to be looking up strings whose hash value has already been computed.) -- Here are some initial timings for the first patch. It seems to show that intersection benefits slightly and that set creation time is unaffected. $ ./time_suite.sh 10 loops, best of 3: 14.9 usec per loop 10 loops, best of 3: 15.3 usec per loop 100 loops, best of 3: 1.17 usec per loop 100 loops, best of 3: 1.13 usec per loop 1 loops, best of 3: 24.9 usec per loop 1 loops, best of 3: 24.2 usec per loop $ ./time_suite.sh 10 loops, best of 3: 14.7 usec per loop 10 loops, best of 3: 14.6 usec per loop 100 loops, best of 3: 1.16 usec per loop 100 loops, best of 3: 1.07 usec per loop 1 loops, best of 3: 23.1 usec per loop 1 loops, best of 3: 23.4 usec per loop $ ./time_suite.sh 10 loops, best of 3: 14.5 usec per loop 10 loops, best of 3: 14.5 usec per loop 100 loops, best of 3: 1.16 usec per loop 100 loops, best of 3: 1.17 usec per loop 1 loops, best of 3: 22.5 usec per loop 1 loops, best of 3: 22 usec per loop -- assignee: rhettinger components: Interpreter Core files: one_lookkey.diff keywords: patch messages: 233128 nosy: rhettinger priority: normal severity: normal status: open title: Remove unicode specialization from set objects type: performance versions: Python 3.5 Added file: http://bugs.python.org/file37547/one_lookkey.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23119 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23119] Remove unicode specialization from set objects
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Added file: http://bugs.python.org/file37548/no_special_hash.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23119 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23119] Remove unicode specialization from set objects
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Added file: http://bugs.python.org/file37549/time_suite.sh ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23119 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows
Ned Batchelder added the comment: This bug just bit me. Changing # coding: utf8 to # coding: utf-8 works around it. -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20844 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows
Ned Batchelder added the comment: (oops: with Python 3.4.1 on Windows) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20844 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23120] installation order of 32bit and 64bit python seems to matter
New submission from Peter Santoro: It appears that installation order matters when installing both 32bit and 64bit versions of Python. If you install the 32bit version first, the 64bit version will uninstall the 32bit version. Here are the steps I used: 1. Starting point (Windows 7 64bit with latest MS patches): Python 3.3.5 32bit (c:\bin32\python33, required for support of older systems that will be upgraded to 3.4.3 when it's available) Python 3.4.1 32bit (c:\bin32\python34) Python 3.4.1 64bit (c:\bin\python34, included in PATH) 2. Uninstalled Python 3.4.1 32bit - ran as expected Python 3.4.1 64bit - ran as expected 3. Attempted Install (32bit install before 64bit install) Python 3.4.2 32bit (c:\bin32\python34) - ran as expected Python 3.4.2 64bit (c:\bin\python34) - install dialog had red warning message at top stating that previous version will be uninstalled; if you continue, the 64bit install deletes the Python 3.4.2 32bit install 4. Work around installation order (64bit install before 32bit install): Python 3.4.2 64bit (c:\bin\python34) - ran as expected Python 3.4.2 32bit (c:\bin32\python34) - ran as expected Notes: I've reported other strange issues with multiple versions of python installed, but they were deemed different than the original reported bug and were not further discussed. It's quite possible that the combination of python versions installed/uninstalled over time on this system has caused some bad/unexpected/untested state (e.g. Windows registry entries). -- components: Installation messages: 233131 nosy: pe...@psantoro.net priority: normal severity: normal status: open title: installation order of 32bit and 64bit python seems to matter type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23120 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23119] Remove unicode specialization from set objects
Antoine Pitrou added the comment: +1 for this. In my experience sets of unicode keys are not as common as dicts with unicode keys, and the posted numbers make the simplification a no-brainer. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23119 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23120] installation order of 32bit and 64bit python seems to matter
Changes by Tim Golden m...@timgolden.me.uk: -- components: +Windows nosy: +steve.dower, tim.golden, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23120 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23121] pip.exe breaks if python 2.7.9 is installed under c:\Program Files\Python
New submission from Joshua Ellinger: The problem is that the python path name is quoted if it contains spaces. The launcher does not remove the extra quotes and fails. I 'solved' by editing the pip.exe to remove the quotes. ps - Windows programs are normally installed under c:\Program Files or c:\Program Files (x86). That should be the default in the installer if possible. -- components: Windows messages: 233133 nosy: joshuaellinger, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: pip.exe breaks if python 2.7.9 is installed under c:\Program Files\Python type: crash versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23121 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23118] Properly codesign Mac python 2.7.9.pkg so it can work thru OS X firewall
Changes by R. David Murray rdmur...@bitdance.com: -- superseder: - Properly codesign Mac python 2.7.9.pkg so it can work thru OS X firewall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23122] python@93442 breaks build if system Python is 2.6
New submission from Marcel Hellkamp: On CentOS 6.6 the system Python is 2.6. The use to set literals in Parser/adsl.py breaks the build process on these systems. The ./configure should ensure that a compatible version of python is available. -- components: Build messages: 233134 nosy: Marcel.Hellkamp priority: normal severity: normal status: open title: python@93442 breaks build if system Python is 2.6 type: compile error versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23122 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23120] installation order of 32bit and 64bit python seems to matter
Steve Dower added the comment: I'm already quite keen to rename the registry key for 32-bit on Windows, since there are some places where that will cause conflicts. This won't be done for 3.4 though, as we don't have an active maintainer for the old installer (Martin is still building them, but not working on it). I haven't yet thought about how the updated keys should look, but when I get time to get back to the installer I'll try some things. The 3.5 installer shouldn't have this issue as it will use product codes to detect other Python installations rather than registry keys. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23120 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23121] pip.exe breaks if python 2.7.9 is installed under c:\Program Files\Python
Steve Dower added the comment: I've previously reported this issue against setuptools (which generates the executable) and apparently they consider it a feature. I don't have the link handy from my phone, but if you find the issue on bitbucket you can help attract some more attention to this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23121 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23122] python@93442 breaks build if system Python is 2.6
Berker Peksag added the comment: Could you try the following command? make touch See also https://docs.python.org/devguide/setup.html?highlight=touch#avoiding-re-creating-auto-generated-files -- nosy: +berker.peksag title: python@93442 breaks build if system Python is 2.6 - python@93442 breaks build if system Python is 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23122 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23122] python@93442 breaks build if system Python is 2.6
Marcel Hellkamp added the comment: make touch solved the problem. A clear case of RTFM :) Sorry for the noise. -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23122 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23122] python@93442 breaks build if system Python is 2.6
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23122 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23123] Only READ support for Decimal in json
New submission from Anders Rundgren: jsonString = '{t:6,h:4.50, g:text,j:1.40e450}' jsonObject = json.loads(jsonString, object_pairs_hook=collections.OrderedDict,parse_float=Decimal) for item in jsonObject: print jsonObject[item] 6 4.50 text 1.40E+450 Works as expected. However, there seems to be no way to get back to the original JSON string as far as I can tell since you have to convert Decimal to str in cls when using json.dumps which adds around the arguments -- components: Extension Modules messages: 233139 nosy: anders.rundgren@gmail.com priority: normal severity: normal status: open title: Only READ support for Decimal in json type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23123 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23121] pip.exe breaks if python 2.7.9 is installed under c:\Program Files\Python
eryksun added the comment: See issue 21699. This is fixed in distlib 0.1.9. The latest pip uses distlib 0.2.0, so just update from pip 1.5.6 to 6.0.3. C:\C:\Program Files\Python27\Scripts\pip.exe --version pip 6.0.3 from C:\Program Files\Python27\lib\site-packages (python 2.7) Instructions for upgrading: https://pip.pypa.io/en/latest/installing.html#upgrade-pip -- nosy: +eryksun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23121 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- nosy: +djc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23102 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution
Changes by Carsten Grohmann carstengrohm...@gmx.de: -- nosy: +cgrohmann ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23102 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19539] The 'raw_unicode_escape' codec buggy + not appropriate for Python 3.x
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: needs patch - resolved superseder: - 'codecs' module docs improvements ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19539 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23121] pip.exe breaks if python 2.7.9 is installed under c:\Program Files\Python
Joshua Ellinger added the comment: Having pip not work after a straight install to the normal place you'd install it on windows can't be a feature. Even after I changed the .exe, pip itself breaks on the same problem. Basically, you can't install python to the normal place on windows until this is fixed. Josh On Dec 27, 2014, at 9:49 AM, Steve Dower rep...@bugs.python.org wrote: Steve Dower added the comment: I've previously reported this issue against setuptools (which generates the executable) and apparently they consider it a feature. I don't have the link handy from my phone, but if you find the issue on bitbucket you can help attract some more attention to this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23121 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23121 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23121] pip.exe breaks if python 2.7.9 is installed under c:\Program Files\Python
Joshua Ellinger added the comment: The safest fix would be to make subprocess strip double-quotes from the executable path. Double quote () is not an allowed character in Windows file systems. There is no case under which it can be correct to spawn a process in Windows where the path is quoted. http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx On Dec 27, 2014, at 4:04 PM, Joshua Ellinger rep...@bugs.python.org wrote: Joshua Ellinger added the comment: Having pip not work after a straight install to the normal place you'd install it on windows can't be a feature. Even after I changed the .exe, pip itself breaks on the same problem. Basically, you can't install python to the normal place on windows until this is fixed. Josh On Dec 27, 2014, at 9:49 AM, Steve Dower rep...@bugs.python.org wrote: Steve Dower added the comment: I've previously reported this issue against setuptools (which generates the executable) and apparently they consider it a feature. I don't have the link handy from my phone, but if you find the issue on bitbucket you can help attract some more attention to this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23121 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23121 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23121 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23121] pip.exe breaks if python 2.7.9 is installed under c:\Program Files\Python
Donald Stufft added the comment: If distlib 0.2.0 fixes this, then it should be fixed in pip 6+ when installing from Wheels. If the same problem exists in setuptools then it'll need to get fixed in setuptools (or pip will need to start writing it's own console scripts when installing from sdist too). -- nosy: +dstufft ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23121 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23121] pip.exe breaks if python 2.7.9 is installed under c:\Program Files\Python
eryksun added the comment: If the same problem exists in setuptools then it'll need to get fixed in setuptools (or pip will need to start writing it's own console scripts when installing from sdist too). Will setuptools eventually switch to using distlib also? Currently setuptools has a different problem. Instead of errnously double quoting the EXE path, it doesn't quote it at all. As you can see in the cdb debugger output below, CreateProcessA is called without properly quoting the path to python.exe (register rdx is the 2nd parameter, lpCommandLine). C:\cdb C:\Program Files\Python27\Scripts\test.exe [clip] 0:000 bp kernel32!CreateProcessA 0:000 g Breakpoint 0 hit kernel32!CreateProcessA: `77a4acf0 4c8bdc mov r11,rsp 0:000 db @rdx `00585c40 43 3a 5c 50 72 6f 67 72-61 6d 20 46 69 6c 65 73 C:\Program Files `00585c50 5c 50 79 74 68 6f 6e 32-37 5c 70 79 74 68 6f 6e \Python27\python `00585c60 2e 65 78 65 20 22 43 3a-5c 50 72 6f 67 72 61 6d .exe C:\Program `00585c70 20 46 69 6c 65 73 5c 50-79 74 68 6f 6e 32 37 5c Files\Python27\ `00585c80 53 63 72 69 70 74 73 5c-74 65 73 74 2d 73 63 72 Scripts\test-scr `00585c90 69 70 74 2e 70 79 22 00-00 ab ab ab ab ab ab ab ipt.py. `00585ca0 ab ab ab ab ab ab ab ab-ab fe ee fe ee fe ee fe `00585cb0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 So test.exe will actually run C:\program.exe, if it exists. For example: C:\type program.c #include stdio.h int main(int argc, char *argv[]) { int i; for (i=0; i argc; i++) printf(%s\n, argv[i]); return 0; } C:\dir /b C:\program.exe program.exe C:\C:\Program Files\Python27\Scripts\test.exe C:\Program Files\Python27\python.exe C:\Program Files\Python27\Scripts\test-script.py -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23121 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23124] Incorrect Integer saving
New submission from Adam Carruthers: 255 is 255 - True (255).bit_length() - 8 256 is 256 - True (256).bit_length() - 9 257 is 257 - False (257).bit_length() - 9 ^ Will show True if you do it exactly like this because of a quirk. a = 257 b = 257 a is b - False I think you don't want to map variables to integers direct unless they are at or under 8 bits in length. -- messages: 233145 nosy: Adam.Carruthers priority: normal severity: normal status: open title: Incorrect Integer saving type: enhancement versions: Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23124 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23124] Incorrect Integer saving
Changes by Adam Carruthers adamjcarruther...@gmail.com: -- nosy: -Adam.Carruthers ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23124 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23124] Incorrect Integer saving
Ezio Melotti added the comment: On CPython small ints are cached to improve performances. This is an implementation detail and is should not be used to compare ints (== should be used instead). -- nosy: +ezio.melotti resolution: - not a bug stage: - resolved status: open - closed type: enhancement - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23124 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com