[issue17659] First weekday
New submission from Izidor Matušov: There is no way how to figure out the first weekday: Does a week start with Monday or Saturday? (Or any other day?) According to documentation, module locale doesn't provide this information. Module calendar uses European convention (Monday is the first weekday). Purpose of this issue is to have a way how to return first weekday (Monday, Sunday, etc) Known workarounds: * http://blogs.gnome.org/patrys/2008/09/29/how-to-determine-the-first-day-of-week/ * https://github.com/projecthamster/hamster/blob/master/src/hamster/lib/stuff.py#L153 * http://stackoverflow.com/questions/4265697/how-to-determine-the-first-day-of-week-in-python -- components: Library (Lib) messages: 186280 nosy: IzidorMatusov priority: normal severity: normal status: open title: First weekday type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17659 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17655] Use writev() function in the io module
Charles-François Natali added the comment: I somehow doubt that the gain is worth the trouble, vectored disk I/O is not as interesting as vectored read/writes to a NIC. Actually, a quick search returned this link: http://www.mail-archive.com/dev@httpd.apache.org/msg23763.html Running the benchmark written by the Apache guys: $ rm -f writev.out; sync; sleep 5; ./test writev: 1s526601. copy+write: 1s323405. Doesn't really surprise me. So I'm -1, since it's unlikely to yield any improvement, and will greatly complicate the code. -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17655 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17502] unittest.mock: side_effect iterators ignore DEFAULT
Michael Foord added the comment: This was committed without NEWS entry or documentation update. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17502 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17655] Use writev() function in the io module
Antoine Pitrou added the comment: Agreed with Charles-François, it probably won't make a difference in practice. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17655 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17484] add tests for getpass
Antoine Pitrou added the comment: Did you forget to add test_getpass.py? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17484 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths
Serhiy Storchaka added the comment: Yes, it's my fault. Here is a patch (with test) which fixes this regression in 2.7. This is 2.7 only issue, in Python 3 arcnames always are unicode. Please test on Windows. -- components: +Library (Lib) keywords: +patch priority: normal - high stage: - patch review type: crash - behavior versions: -Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29729/zipfile_extract_unicode.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17656 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Antoine Pitrou added the comment: If this goes inside the select module, it could probably help issue #17552 (add socket.sendfile()) a bit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16427] Faster hash implementation
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file27950/fast_str_hash.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16427] Faster hash implementation
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file27947/fast_hash_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17502] unittest.mock: side_effect iterators ignore DEFAULT
Roundup Robot added the comment: New changeset 4d8e9c5ba651 by Andrew Svetlov in branch '3.3': Add NEWS entry for #17502: Process DEFAULT values in mock side_effect that returns iterator. http://hg.python.org/cpython/rev/4d8e9c5ba651 New changeset f82fb8813407 by Andrew Svetlov in branch 'default': Add NEWS entry for #17502: Process DEFAULT values in mock side_effect that returns iterator. http://hg.python.org/cpython/rev/f82fb8813407 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17502 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17502] unittest.mock: side_effect iterators ignore DEFAULT
Andrew Svetlov added the comment: NEWS updated, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17502 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17615] String comparison performance regression
Serhiy Storchaka added the comment: You can use a single switch instead nested switches: switch ((kind1 3) + kind2) { case (PyUnicode_1BYTE_KIND 3) + PyUnicode_1BYTE_KIND: { int cmp = memcmp(data1, data2, len); ... } case (PyUnicode_1BYTE_KIND 3) + PyUnicode_2BYTE_KIND: COMPARE(Py_UCS1, Py_UCS2); break; ... } I don't know if there is any effect. -- components: +Interpreter Core stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17660] mock.patch could whitelist builtins to not need create=True
New submission from Michael Foord: When patching builtin names (e.g. open) in a specific namespace you need to specify create=True or patch will refuse to create a name that doesn't exist. patch could whitelist the builtin names, when the patch target is a module object, to not require the create=True. -- assignee: michael.foord components: Library (Lib) keywords: easy messages: 186290 nosy: michael.foord priority: normal severity: normal stage: needs patch status: open title: mock.patch could whitelist builtins to not need create=True type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17660 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17660] mock.patch could whitelist builtins to not need create=True
Kushal Das added the comment: Working on this. -- nosy: +kushaldas ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17660 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17661] documentation of '%r' links to the wrong repr
New submission from Thomas Wouters: The documentation of '%r' in http://docs.python.org/2/library/stdtypes.html#string-formatting-operations links to the wrong repr, the module (http://docs.python.org/2/library/repr.html#module-repr) instead of the builtin function (http://docs.python.org/2/library/functions.html#func-repr). -- assignee: docs@python components: Documentation keywords: easy messages: 186292 nosy: docs@python, twouters priority: normal severity: normal status: open title: documentation of '%r' links to the wrong repr versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17661 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17615] String comparison performance regression
Neil Hodgson added the comment: A quick rewrite showed the single level case slightly faster (1%) on average but its less readable/maintainable. Perhaps taking a systematic approach to naming would allow Py_UCS1 to be deduced from PyUnicode_1BYTE_KIND and so avoid repeating the information in the case selector and macro invocation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17484] add tests for getpass
R. David Murray added the comment: Indeed I did. That's what I get for staging it one day and committing it the next...I forgot I hadn't done the add command. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17484 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17484] add tests for getpass
Roundup Robot added the comment: New changeset 113ff45c3f11 by R David Murray in branch 'default': #17484: Actually add the getpass tests this time. http://hg.python.org/cpython/rev/113ff45c3f11 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17484 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17484] add tests for getpass
R. David Murray added the comment: Thanks, Thomas. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17484 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17659] First weekday
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray stage: - needs patch versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17659 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17615] String comparison performance regression
Antoine Pitrou added the comment: You can use a single switch instead nested switches: switch ((kind1 3) + kind2) { case (PyUnicode_1BYTE_KIND 3) + PyUnicode_1BYTE_KIND: { int cmp = memcmp(data1, data2, len); ... } Please let's not add this kind of optifuscation unless it has a large positive effect. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17662] socketmodule raises on import when compiled using Setup.dist on 2.7.4
New submission from Bohuslav Slavek Kabrda: When building extension modules of Python 2.7.4 through Modules/Setup.dist, the socketmodule gets built badly, as it also needs to be compiled with timemodule.c (see the attached patch). This was caused by commit 8ec39bfd1f01, which introduced usage of _PyTime_floattime() without fixing Setup.dist (note, that this is ok when compiling through setup.py, as it has: exts.append( Extension('_socket', ['socketmodule.c', 'timemodule.c'], -- components: Build files: python-2.7.4-properly-compile-socketmodule-by-Setupdist.patch keywords: patch messages: 186298 nosy: bkabrda priority: normal severity: normal status: open title: socketmodule raises on import when compiled using Setup.dist on 2.7.4 type: crash versions: Python 2.7 Added file: http://bugs.python.org/file29730/python-2.7.4-properly-compile-socketmodule-by-Setupdist.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17658] pythonw.exe crashes on opening IDLE
Amaury Forgeot d'Arc added the comment: Hum, do you have any environment variable that refer to Python27? In a terminal window (cmd.exe), try the following command: set | findstr /i python -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17658 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17663] re.sub not replacing all
New submission from z06steve: fails to replace last occurrence of string v_wofstgvw, reproduced in 3.2.3, 3.2.4 and 3.3.1 a=''' -- V_INT_CTRC_ENTRY_DATE REPLACE VIEW V_WOFSTGVW.V_INT_CTRC_ENTRY_DATE AS LOCKING ROW FOR ACCESS SELECT D.DY DY, D.DW_CRRT_FL CURRENT_FLAG, D.MTH CURRENT_MTH, (CAST(D.DY AS DATE) - EXTRACT(DAY FROM (CAST( D.DY AS DATE)))+1) CURRENT_MTH_BEG_DT, ADD_MONTHS ((CAST(D.DY AS DATE) - EXTRACT(DAY FROM (CAST( D.DY AS DATE)))+1) , 1) - 1 CURRENT_MTH_END_DT, D.WOFC_MTH_END_FLG CURRENT_MTH_END_FLG, D.WOFC_QTR_END_FLG CURRENT_QTR_END_FL, D.YR CURRENT_YEAR, ((D.YR||'01/01')(DATE)) CURRENT_YEAR_BEG_DT , ((D.YR||'12/31')(DATE)) CURRENT_YEAR_END_DT , D.WOFC_YR_END_FLG CURRENT_YEAR_END_FL, D.HDAY_FLG HOLIDAY_FLG, CAST(ADD_MONTHS (CASE WOFC_MTH_END_FLG WHEN 'Y' THEN WOFCO_FRST_DY_MTH ELSE WOFCO_BEGIN_MTH_DT END, -1)AS CHAR(7)) PREV_REP_MTH, ADD_MONTHS (CASE WOFC_MTH_END_FLG WHEN 'Y' THEN WOFCO_FRST_DY_MTH ELSE WOFCO_BEGIN_MTH_DT END, -1 ) PREV_REP_MTH_BEG_DT, ADD_MONTHS (CASE WOFC_MTH_END_FLG WHEN 'Y' THEN D.DY ELSE D.WOFCO_MTH_END_DT END, -1 ) PREV_REP_MTH_END_DT , D.PREV_MTH PRIOR_MTH, PSETM.PRIOR_SET_CURRENT_MTH, PSETM.PRIOR_SET_CURRENT_MTH_BGN_DT, PSETM.PRIOR_SET_CURRENT_MTH_END_DT, PREPSETM.PRIOR_SET_REP_MTH, PREPSETM.PRIOR_SET_REP_MTH_BGN_DT, PREPSETM.PRIOR_SET_REP_MTH_END_DT, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN MTH ELSE PREV_MTH END REP_MTH, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN WOFCO_FRST_DY_MTH ELSE WOFCO_BEGIN_MTH_DT END REP_MTH_BEG_DT, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN D.DY ELSE D.WOFCO_MTH_END_DT END REP_MTH_END_DT, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN ADD_MONTHS (D.WOFCO_FRST_DY_MTH, 12 ) ELSE ADD_MONTHS (D.WOFCO_BEGIN_MTH_DT, 12) END REP_MTH_NEXT_YEAR_BEG_DT, CASE WOFC_MTH_END_FLG
[issue17660] mock.patch could whitelist builtins to not need create=True
Kushal Das added the comment: Initial patchset along with documentation and tests update. -- keywords: +patch Added file: http://bugs.python.org/file29731/issue17660.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17660 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17663] re.sub not replacing all
R. David Murray added the comment: The fourth argument to re.sub is the replacement count. You've passed it a flag. -- nosy: +r.david.murray resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17663 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17552] create_server
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- title: socket.sendfile() - create_server ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17552 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17552] socket.sendfile()
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- title: create_server - socket.sendfile() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17552 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17651] Errno checking replaced by concrete classes inherited from OSError
Andrew Svetlov added the comment: I've asked atykhonov for that because we have two sets: 1. Can be done with current exception classes 2. errno values doesn't have concrete OSError inherited exception and we have to make decision: add new exceptions or use errno check. This issue don't require external changes and can be closed quickly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17651 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16551] Cleanup the pure Python pickle implementation
Serhiy Storchaka added the comment: Here is an updated patch which get rid of trick with attribute caching. Globals used instead. Also added some minor style changes (dropped redundant semicolons and wrapped too long lines). -- Added file: http://bugs.python.org/file29732/pickle_cleanup_globals.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16551 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17552] socket.sendfile()
Giampaolo Rodola' added the comment: New patch in attachment includes a new 'offset' parameter, new tests and also update file offset on return or in case of error so that file.tell() can be used to tell how many bytes were transmitted at any time. This way we'll avoid using a custom exception. In summary, the API looks like this. Transfer ok: file = open('somefile', 'rb') s = socket.socket() sock.sendfile(file) (True, None) file.tell() 2000 ...and in case sendfile() could not be used internally because file was not a regular file: file = io.BytesIO(b'x' * 1*1024*1024) sock.sendfile(file) (False, UnsupportedOperation('fileno',)) file.tell() 2000 I still haven't looked into TransmitFile on Windows as I have to figure out how to compile Python 3.4 on Windows. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17552 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17552] socket.sendfile()
Changes by Giampaolo Rodola' g.rod...@gmail.com: Added file: http://bugs.python.org/file29733/socket-sendfile2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17552 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17658] pythonw.exe crashes on opening IDLE
Patrick Poitras added the comment: It returns this: C:\Users\Acebulfset | findstr /i python Path=C:\Python27\Lib\site-packages\PyQt4;C:\Program Files (x86)\NVIDIA Corporati on\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windo ws\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft SQL Server\1 10\Tools\Binn\;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;C:\Program Files\In tel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Python27\ PYTHONPATH=C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk; -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17658 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17552] socket.sendfile()
Changes by Giampaolo Rodola' g.rod...@gmail.com: Removed file: http://bugs.python.org/file29733/socket-sendfile2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17552 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17552] socket.sendfile()
Changes by Giampaolo Rodola' g.rod...@gmail.com: Added file: http://bugs.python.org/file29734/socket-sendfile2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17552 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17662] socketmodule raises on import when compiled using Setup.dist on 2.7.4
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +kristjan.jonsson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17650] There is no exception correspond to errno EROFS
Andrew Svetlov added the comment: Sorry for reopening. Do you really sure that ENOTCONN and EINVAL doesn't worth to have separate sublasses? The same question about Not Supported family. I don't force to make new exception classes, just like to figure out the status quo. If we decide to keep in stone our exceptions hierarchy for OSError's — that's ok. If list is open — let's discuss -- nosy: +georg.brandl status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17650 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17662] socketmodule raises on import when compiled using Setup.dist on 2.7.4
Kristján Valur Jónsson added the comment: This is my fault, I admit to not being an expert in non-windows builds. I've no idea how Modules/Setup.dist works but the patch looks reasonable and if it works, then all is fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17511] Idle find function closes after each find operation
Sarah added the comment: This changes the button's text from Find to Find Again, as per Todd Rovito and Terry J. Reedy's suggestion. -- Added file: http://bugs.python.org/file29735/issue17511_FindAgain.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17664] ssl.SSLError has errno value of None
New submission from Paul Wiseman: I was using py2.7.3 and was getting None back for the errno attribute for an ssl.SSLError('The read operation timed out'). I noticed in the 2.7.4 release notes that it sounds like there was a fix for this: Issue #12065: connect_ex() on an SSL socket now returns the original errno when the socket's timeout expires (it used to return None). I've just tested in py2.7.4 and I'm still getting None back for the errno attribute. I'm using this code to produce the error: import requests def __init__(self, exception): # First extract the real underlying exception exception = exception.args[0] # This should be ssl.SSLError super(requests.exceptions.ConnectionError, self).__init__(exception) self.strerror = exception.strerror self.errno = exception.errno requests.exceptions.ConnectionError.__init__ = __init__ timeout_val = 0.2 while True: try: print requests.get(https://google.com;, timeout=timeout_val) except requests.exceptions.SSLError as err: print err.strerror print err.errno break except Exception as err: print Got %s: %s % (err.__class__.__name__, err) timeout_val /= 2 -- messages: 186310 nosy: Paul.Wiseman priority: normal severity: normal status: open title: ssl.SSLError has errno value of None type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17570] Improve devguide Windows instructions
Andrew Svetlov added the comment: Sorry, but you cannot just rewrite ./python.exe to just python.exe At least in http://docs.python.org/devguide/buildbots you have to make probably three sections: 1. for linux users to use just ./python 2. for Mac ./python.exe 3. for Windows path to repo/PCBuild/python.exe or python_d.exe (IIRC) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17570 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17658] pythonw.exe crashes on opening IDLE
Amaury Forgeot d'Arc added the comment: Please remove the PYTHONPATH environment variable. I don't know how it came here, but it's certainly not needed: these directories are computed at runtime when the python27 interpreter starts; it can only do harm when another interpreter is installed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17658 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17649] Python/Python-ast.c: No such file or directory
pfg added the comment: The problem is Makefile.pre.in was changed in a way that stops out-of-tree builds. The following patch by Markus Von Appen fixes it. -- status: closed - open Added file: http://bugs.python.org/file29736/patch-Makefile.pre.in ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17511] Idle find function closes after each find operation
Sarah added the comment: Terry- There should be a checkbutton option labeled 'Wrap Around'. This is instantiated on lines 7 and 105-111 of SearchDialogBase.py Admittedly, it is standard practice to have a 'find' function wrap around. I suppose we could have the dialog start up with the 'Wrap around' box checked. Thoughts? Note: If we're going to make a change to the 'wrap around' settings, I think we should start a new issue. Wrap around really isn't related to the 'find box closing' issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17662] socketmodule raises on import when compiled using Setup.dist on 2.7.4
Roundup Robot added the comment: New changeset bad85e4e6b7f by Kristjan Valur Jonsson in branch '2.7': Issue #17662: fix socketmodule compilation with Setup.dist. http://hg.python.org/cpython/rev/bad85e4e6b7f -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17662] socketmodule raises on import when compiled using Setup.dist on 2.7.4
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17649] Python/Python-ast.c: No such file or directory
pfg added the comment: Ruslan Makhmatkhanov provided this (more complete) patch. -- Added file: http://bugs.python.org/file29737/patch-Makefile.pre.in ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17649] Python/Python-ast.c: No such file or directory
Changes by pfg giffu...@tutopia.com: Removed file: http://bugs.python.org/file29736/patch-Makefile.pre.in ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17589] Make documentation about macros in C API explicit about rvalue vs statement
Amaury Forgeot d'Arc added the comment: There are some extension modules (pytables) that do return Py_INREF(x), x; and Py_RETURN_NONE is also defined with a comma expression. Oh, and Cython: #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16895] Batch file to mimic 'make' on Windows
Zachary Ware added the comment: You seem to end your subroutines (or whatever they are called) using goto end rather than exit /b. Since popd follows the end label, does this mean that you get a popd after calling each subroutine? Yes. Is this intended and can it cause unmatched pushd/popd-s? It is intended and it can, but so far I haven't run into any trouble with it. However, I have realized that I haven't done any testing with some pushd's already on the stack... I'll do some more looking into that, and may have to implement either some form of callback labels or counting pushd's to properly popd. (I am not familiar with writing batch files.) Also, I think 32 bit builds should be the default. Many people with 64 bit Windows are using Visual Studio Express which only has 32 bit support. Fair point. I suppose I had been assuming that the error message from not finding the proper vcvars*.bat file would be an indication to pass '--without-64-bit' to configure.bat, but it is much nicer to just fall back to 32 bit. Also, it would be nice to just implode from the start if there is no compiler available. Next version of the patch will do both of these things in configure.bat; quit with an error message if %VS100COMNTOOLS% is not defined, and check for the existence of %VS100COMNTOOLS%\..\..\VC\bin\x86_amd64\vcvarsx86_amd64.bat before setting %PY_PLATFORM% to x64. Thanks for the comments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17589] Make documentation about macros in C API explicit about rvalue vs statement
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17511] Idle find function closes after each find operation
Terry J. Reedy added the comment: 'Find Next' is the actual (and standard) suggestion. It s a trivial change given that you identified the place to make it . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17665] convert to idiomatic unittest code
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- components: Tests files: diff nosy: tshepang priority: normal severity: normal status: open title: convert to idiomatic unittest code versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29738/diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17666] Extra gzip headers breaks _read_gzip_header
New submission from Peter: Regression in Python 3.3.0 to 3.3.1, tested under Mac OS X 10.8 and CentOS Linux 64bit. The same regression also present in going from Python 2.7.3 from 2.7.4, does that need a separate issue filed? Consider this VALID GZIP file, human link: https://github.com/biopython/biopython/blob/master/Tests/GenBank/cor6_6.gb.bgz Binary link, only a small file: https://raw.github.com/biopython/biopython/master/Tests/GenBank/cor6_6.gb.bgz This is compressed using a GZIP variant called BGZF which uses multiple blocks and records additional tags in the header, for background see: http://blastedbio.blogspot.com/2011/11/bgzf-blocked-bigger-better-gzip.html $ curl -O https://raw.github.com/biopython/biopython/master/Tests/GenBank/cor6_6.gb.bgz $ cat cor6_6.gb.bgz | gunzip | wc 3201183 14967 Now for the bug, expected behaviour: $ python3.2 Python 3.2 (r32:88445, Feb 28 2011, 17:04:33) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type help, copyright, credits or license for more information. import gzip handle = gzip.open(cor6_6.gb.bgz, rb) data = handle.read() handle.close() len(data) 14967 quit() Broken behaviour: $ python3.3 Python 3.3.1 (default, Apr 8 2013, 17:54:08) [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.57))] on darwin Type help, copyright, credits or license for more information. import gzip handle = gzip.open(cor6_6.gb.bgz, rb) data = handle.read() Traceback (most recent call last): File stdin, line 1, in module File /Users/pjcock/lib/python3.3/gzip.py, line 359, in read while self._read(readsize): File /Users/pjcock/lib/python3.3/gzip.py, line 432, in _read if not self._read_gzip_header(): File /Users/pjcock/lib/python3.3/gzip.py, line 305, in _read_gzip_header self._read_exact(struct.unpack(H, self._read_exact(2))) File /Users/pjcock/lib/python3.3/gzip.py, line 282, in _read_exact data = self.fileobj.read(n) File /Users/pjcock/lib/python3.3/gzip.py, line 81, in read return self.file.read(size) TypeError: integer argument expected, got 'tuple' The bug is very simple, an error in line 205 of gzip.py: 203 if flag FEXTRA: 204 # Read discard the extra field, if present 205 self._read_exact(struct.unpack(H, self._read_exact(2))) The struct.unpack method returns a single element tuple, thus a fix is: 203 if flag FEXTRA: 204 # Read discard the extra field, if present 205 extra_len, = struct.unpack(H, self._read_exact(2)) 206 self._read_exact(extra_len) This bug was identified via failing Biopython unit tests under Python 2.7.4 and 3.3.1, which all pass with this minor fix applied. -- components: Library (Lib) messages: 186320 nosy: maubp priority: normal severity: normal status: open title: Extra gzip headers breaks _read_gzip_header versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17664] ssl.SSLError has errno value of None
Antoine Pitrou added the comment: The issue you mention is unrelated. connect_ex() returns an error code, it doesn't raise an exception. As for the errno attribute being None, this is because most SSLErrors don't correspond to a single OS error. And in the case you mention (the read operation timed out), it isn't an OS error at all: it's simply a select() call timing out. -- nosy: +pitrou resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17667] Windows: build with build_pgo.bat -2 fails to optimize python.dll
New submission from Anselm Kruis: Version: 2.7.4 (and any prior 2.7-version. not tested with 3.x) Compiler: VS 2008 Professional If I compile Python using the batch PCbuild\build_pgo.bat -2 Visual Studio fails to correctly collect profile information for the project python27.dll. As a result, no real optimisation takes place. The command build_pgo.bat -2 runs the full test suite (..\lib\test\regrtest.py) to collect profile data. Experiments show, that several test cases (i.e. test_os and test_subprocess) break the collection of profile data. Probably the failure is related to the creation of sub-processes. I consider it a Visual Studio bug. To work around this issue I created a list of good test cases and patched build_pgo.bat to run only the tests from this list. -- components: Build, Windows files: build_pgo-2.patch keywords: patch messages: 186322 nosy: akruis priority: normal severity: normal status: open title: Windows: build with build_pgo.bat -2 fails to optimize python.dll type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file29739/build_pgo-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17667 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17666] Extra gzip headers breaks _read_gzip_header
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka stage: - needs patch type: - behavior versions: +Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17660] mock.patch could whitelist builtins to not need create=True
Antoine Pitrou added the comment: To be honest this proposal sounds like a quirk more than a feature to me. If you only special-case builtins, people will have to remember that special case and it will make the API more complicated. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17660 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17668] re.split loses characters matching ungrouped parts of a pattern
New submission from Tomasz J. Kotarba: Tested in 2.7 but possibly affects the other versions as well. A real life example (note the first character '' being lost): import re re.split(r'^(.*)$', 'Homo sapiens catenin (cadherin-associated)') produces: ['', 'Homo sapiens catenin (cadherin-associated)', ''] Expected (and IMHO most useful) behaviour would be for it to return: ['', 'Homo sapiens catenin (cadherin-associated)', ''] or (IMHO much less useful as one can already get this one just by adding external grouping parentheses and it is ): ['', 'Homo sapiens catenin (cadherin-associated)', 'Homo sapiens catenin (cadherin-associated)', ''] Not sure whether it can be changed in such a mature and widely used module without breaking compatibility but just adding a new optional parameter for deciding how re.split() deals with patterns containing grouping parentheses and making it default to the current behaviour would be very helpful. Best Regards -- components: Regular Expressions messages: 186324 nosy: ezio.melotti, mrabarnett, triquetra011 priority: normal severity: normal status: open title: re.split loses characters matching ungrouped parts of a pattern type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17511] Idle find function closes after each find operation
Terry J. Reedy added the comment: I took a look at both the 'Search' and 'Replace' dialogs and both already have wrap-around present as the default: '[x] Wrap around'. Sorry for not checking earlier. Having the find window stay open will make it much easier to visually check all the options.* The Edit menu has 3 find entries Find ...Cntl+F Find again Cntl+G Find selection Cntl+H I think these menu items should lead to a 'Find' dialog, not a 'Search' dialog. I find the name switch confusing. Both 'find' and 'find_replace' search the text (and both dialogs use SearchDialogBase). That would be a trivial change to add to the patch if everyone agrees. Otherwise it can be a separate issue. Re-considering whether we still need those 3 entries after this patch would be a separate follow-up issue. * For automated tests, is the Idle code currently organized in such a way that we can code the following without actually running Idle or showing anything on the screen: create an edit widget or window with some text, create an associated dialog box, set and unset text and options in the box, call an 'action' function, and then check in the edit window that the 'correct' text is highlighted and that the cursor is where it 'should' be? (This of course requires exact specification of 'correct' and 'should'.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths
Vhati added the comment: The 2013-04-08 patch worked on Windows XP. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17656 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17511] Idle find function closes after each find operation
Sarah added the comment: 'Find Again' switched to 'Find Next' -- Added file: http://bugs.python.org/file29740/issue_17511_FindNext.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17668] re.split loses characters matching ungrouped parts of a pattern
Matthew Barnett added the comment: It's not a bug. The documentation says Split string by the occurrences of pattern. If capturing parentheses are used in pattern, then the text of all groups in the pattern are also returned as part of the resulting list. You're splitting on r'^(.*)$', but not capturing the '', therefore it's excluded. If you want the '' included, then put it inside the capture group too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17668] re.split loses characters matching ungrouped parts of a pattern
R. David Murray added the comment: Thanks for the report, but as Matt said it doesn't look like there is any bug here. The behavior you report is what the docs say it is, and it seems to me that your most useful suggestion would discard the information about the group match, making specifying groups in the separator pointless. -- nosy: +r.david.murray resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17668] re.split loses characters matching ungrouped parts of a pattern
Tomasz J. Kotarba added the comment: Hi Matthew, Thanks for such a quick reply. I know I can get the by putting it in grouping parentheses. That's not the issue here. The documentation you quoted says that it splits the string by the occurrences _OF_PATTERN_ and that texts of all groups are _ALSO_ returned as _PART_ of the resulting list. It does not say anywhere (nor does it even suggest that) that parts of the pattern not grouped with parentheses are REMOVED. That said, I did not report this issue to split hairs (I would rather split strings with regular expressions ;)) and perform liguistic analysis of the current documentation (which is not set in stone and has been changed before). I did that because I spotted an issue which slightly limits usefulness of re.split() and suggested a potential improvement which would solve the problem and make re.split() even better than it already is. Whether the powers that be do something with this and improve re.split() is of course not my decision. Cheers, T -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17512] backport of the _sysconfigdata.py module (issue 13150) breaks the build on darwin
Roundup Robot added the comment: New changeset be3b4aa2ad28 by doko in branch '2.7': - Issue #13150, #17512: sysconfig no longer parses the Makefile and config.h http://hg.python.org/cpython/rev/be3b4aa2ad28 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17512 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13150] Most of Python's startup time is sysconfig
Roundup Robot added the comment: New changeset be3b4aa2ad28 by doko in branch '2.7': - Issue #13150, #17512: sysconfig no longer parses the Makefile and config.h http://hg.python.org/cpython/rev/be3b4aa2ad28 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13150 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17668] re.split loses characters matching ungrouped parts of a pattern
Tomasz J. Kotarba added the comment: Hi R. David Murray, Thanks for your reply. I just explained in my previous message to Matthew that documentation does actually support my view (i.e. it is an issue according to the documentation). Re. the issue you mentioned (discarding information concerning group matching) that (plus maintaining the compatibility with legacy code) is why I suggested adding a new optional argument to re.split. Apropos discrading information, the current behaviour results in discarding information about parts of the string not enclosed in grouping parentheses. Cheers, T -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17668] re.split loses characters matching ungrouped parts of a pattern
Tomasz J. Kotarba added the comment: Marking as open till I get your response. I hope you reconsider. -- resolution: invalid - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15194] libffi-3.0.11 update
Matthias Klose added the comment: 3.0.13 is now in 2.7.4, 3.2.4, 3.3.1 and the trunk. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15194 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17666] Extra gzip headers breaks _read_gzip_header
Serhiy Storchaka added the comment: Oh-oh-h, it's my fault. Thank you, Peter, for your report and the proposed fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17477] update the bsddb module do build with db 5.x versions
Matthias Klose added the comment: was released with 2.7.4. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17477 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17668] re.split loses characters matching ungrouped parts of a pattern
R. David Murray added the comment: re.split('-', 'abc-def-jlk') ['abc', 'def', 'jlk'] re.split('(-)', 'abc-def-jlk') ['abc', '-', 'def', '-', 'jlk'] Does that make it a bit clearer? Maybe we need an actual example in the docs. -- assignee: - docs@python components: +Documentation nosy: +docs@python stage: committed/rejected - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17666] Extra gzip headers breaks _read_gzip_header
Roundup Robot added the comment: New changeset 29f0836c0456 by Serhiy Storchaka in branch '2.7': Close #17666: Fix reading gzip files with an extra field. http://hg.python.org/cpython/rev/29f0836c0456 New changeset f78d2605f452 by Serhiy Storchaka in branch '3.3': Close #17666: Fix reading gzip files with an extra field. http://hg.python.org/cpython/rev/f78d2605f452 New changeset cd5e3adc6fc1 by Serhiy Storchaka in branch 'default': Close #17666: Fix reading gzip files with an extra field. http://hg.python.org/cpython/rev/cd5e3adc6fc1 -- nosy: +python-dev resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17655] Use writev() function in the io module
STINNER Victor added the comment: I get similar Fedora 18 (Linux kernel 3.8.1), ext4 filesystem: $ rm -f writev.out; sync; sleep 5; ./copy_write copy+write: 1s576530. $ rm -f writev.out; sync; sleep 5; ./writev writev: 1s686619. I agree to close the issue. At least this issue can be used later is someone else ask why Python is not using writev() ;-) -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17655 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17668] re.split loses characters matching ungrouped parts of a pattern
Tomasz J. Kotarba added the comment: I agree that introducing an example like that plus making some slight changes in wording would be a welcome change to the docs to clearly explain the current behaviour. Still, I maintain it would be useful to give users the option I described to allow them decide what output they get (i.e. also get texts matching the whole pattern and/or those matching the pattern and groups (e.g. pattern returned as kind of group 0)). As I said though, I realise that it is not for me to decide so I am just suggesting it to the powers that be. Cheers, T -- components: -Documentation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17615] String comparison performance regression
Roundup Robot added the comment: New changeset cc74062c28a6 by Victor Stinner in branch 'default': Issue #17615: Expand expensive PyUnicode_READ() macro in unicode_compare(): http://hg.python.org/cpython/rev/cc74062c28a6 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17668] re.split loses characters matching ungrouped parts of a pattern
R. David Murray added the comment: As you pointed out, you can already get that behavior by enclosing the entire split expression in a group. I don't see that there is any functionality missing here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17650] There is no exception correspond to errno EROFS
Georg Brandl added the comment: Antoine will have to decide on this, but IMO now that we released the PEP 3151 set in Python 3.3, we should not continue adding new builtin exceptions in every release. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17650 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17615] String comparison performance regression
Roundup Robot added the comment: New changeset db4a1a3d1f90 by Victor Stinner in branch 'default': Issue #17615: Add tests comparing Unicode strings of different kinds http://hg.python.org/cpython/rev/db4a1a3d1f90 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17650] There is no exception correspond to errno EROFS
Antoine Pitrou added the comment: A bit in detail: - ENOTCONN is a programming error, so there's no use actually catching it (you should fix the bug instead when you encounter it) - EINVAL could be a candidate, but unfortunately it would clash quite nastily with ValueError and lead to confusion; therefore I think it's better not wrapping it -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17650 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17660] mock.patch could whitelist builtins to not need create=True
Michael Foord added the comment: I don't think that's a particular issue. In general you only need to use create=True if a name is *not* available in a namespace. Builtin names are odd in that you can use them in a namespace even though they don't exist there - so you have to *remember* to use create=True even though the name *is* available. So this issue is about fixing that quirk. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17660 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17615] String comparison performance regression
Roundup Robot added the comment: New changeset d3185be3e8d7 by Victor Stinner in branch 'default': Issue #17615: Comparing two Unicode strings now uses wmemcmp() when possible http://hg.python.org/cpython/rev/d3185be3e8d7 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17615] String comparison performance regression
STINNER Victor added the comment: Neil.Hodgson wrote: The patch fixes the performance regression on Windows. The 1:1 case is better than either 3.2.4 or 3.3.1 downloads from python.org. Other cases are close to 3.2.4, losing at most around 2%. Nice, but make sure that your are using the same compiler with the same options (ex: make sure that you are compiling in Release mode). Neil.Hodgson wrote: Perhaps taking a systematic approach to naming would allow Py_UCS1 to be deduced from PyUnicode_1BYTE_KIND and so avoid repeating the information in the case selector and macro invocation. I don't know how to do that in C. Anyway, I prefer to have a more explicit call to a simple macro than magic implicit arguments. Optimizations sometimes make the code harder to read (a good example: the whole PEP 393)... -- I wrote specialized functions to compare strings for each combination of Unicode kinds, and I added a fast path using wmemcmp() when possible. I don't see other speedup. On Linux, Comparing astral strings in Python 3.4 is now 3 times faster than Python 3.2 and 3.3. I achieved my goal, I can close the issue :-D -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17615] String comparison performance regression
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17664] ssl.SSLError has errno value of None
Paul Wiseman added the comment: Ah ok, thanks for clearing that up. I thought there'd have been a socket.error with ETIMEDOUT raised as the underlying exception, similar to if it times out during the non-ssl part of the request -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12181] SIGBUS error on OpenBSD (sparc64)
Federico Schwindt added the comment: New version hopefully good and ready for inclusion. Please note that the tests are still broken and need to be addressed (bignum and sys.maxsize passed to ident and data respectively). Thanks. -- Added file: http://bugs.python.org/file29741/patch-Modules_selectmodule_c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16427] Faster hash implementation
STINNER Victor added the comment: fast_hash_3.patch is a litte bit (6%) slower for Unicode string shorter than 10 characters, but much faster for string equal or longer than 100 characters (up to 10x faster). I used the str type and disabled its cache (_PyUnicode_HASH(self) = x; in unicode_hash()) to run my benchmark. Summary | original | patched ---++--- Length 1 | 231 ns (*) | 244 ns (+6%) Length 3 | 238 ns (*) | 253 ns (+6%) Length 10 | 254 ns (*) | 251 ns Length 20 | 280 ns (*) | 256 ns (-8%) Length 100 | 528 ns (*) | 321 ns (-39%) Length 10 ** 4 | 32 us (*) | 9.49 us (-70%) Length 10 ** 8 | 329 ms (*) | 104 ms (-68%) ---++--- Total | 329 ms (*) | 104 ms (-68%) -- Added file: http://bugs.python.org/file29742/bench_hash.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16427] Faster hash implementation
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file29743/bench_hash.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16427] Faster hash implementation
STINNER Victor added the comment: Does anyone know if fast_hash_3.patch may reduce the quality of the hash function? (May the patched hash function produce more collisions? The Avalanche effect thing.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17669] Segfault caused by
Changes by Frank Hamand frankham...@hotmail.com: -- components: Interpreter Core, Windows nosy: fhamand priority: normal severity: normal status: open title: Segfault caused by type: crash versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17669] Segfault caused by weird combination of imports and yield from
New submission from Frank Hamand: I've found a very strange bug in python 3.3 It's taken me around an hour just to narrow it down to a small case where it happens. I cannot for the life of me figure out the exact cause. It seems to have something to do with yield from. I've attached a case which reproduces this. Run python3.3 test.py, it should segfault on linux, stopped responding on windows. Tested with OS: Linux Debian-60-squeeze-32-minimal 2.6.32-5-686-bigmem PY: Python 3.3.1rc1 (default, Mar 30 2013, 21:44:39) OS: Windows 7 64 bit PY: Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 NOTES: If you get rid of import logging in generators.py, it only crashes if there's no __pycache__ -- title: Segfault caused by - Segfault caused by weird combination of imports and yield from Added file: http://bugs.python.org/file29744/segfault.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17669] Segfault caused by weird combination of imports and yield from
Frank Hamand added the comment: The file contents so people dont have to download the zip: generators.py: --- def subgen(): yield def other_gen(self): move = yield from subgen() game.py: --- class Game(object): def __init__(self): self.gen = self.first_gen() next(self.gen) def first_gen(self): while True: from generators import \ other_gen yield from other_gen(self) test.py: --- from game import Game Game() -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17626] set's __isub__ doesn't support non-sets.
Raymond Hettinger added the comment: Confirmed. This is by design. Guido has long lamented that the += operator for lists would accept any iterable. This led to a number of surprises: s= ['hello']; s += 'world' # Oops! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17626 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17626] set's __isub__ doesn't support non-sets.
Antoine Pitrou added the comment: I actually like that list.__iadd__ accepts any iterable, it's a rather nice piece of duck-typing. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17626 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17669] Segfault caused by weird combination of imports and yield from
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17670] expandabs() weirdness
New submission from Alfredo Solano Martínez: I stumbled upon this by chance. Is the following behaviour by design? s = 'a\tb' s.expandtabs(1) == s.expandtabs(2) True In fact: s.expandtabs(1) 'a b' # 1 space s.expandtabs(2) 'a b' # 1 space s.expandtabs(3) 'a b' # 2 spaces s.expandtabs(4) 'a b' # 3 spaces It seems to be an off-by-one difference from 2 onwards. Tested with python versions 2.7.4, 3.2.4 and 3.3.1 on a Linux x86_64 machine. -- components: Library (Lib) messages: 186358 nosy: asolano priority: normal severity: normal status: open title: expandabs() weirdness type: behavior versions: Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17670 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17615] String comparison performance regression
Neil Hodgson added the comment: Including the wmemcmp patch did not improve the times on MSC v.1600 32 bit - if anything, the performance was a little slower for the test I used: a=['C:/Users/Neil/Documents/λ','C:/Users/Neil/Documents/η']156 specialised: [0.9125948707773204, 0.8990815272107868, 0.9055365478250721] wmemcmp: [0.9287715478844594, 0.926606017373151, 0.9155132192031097] Looking at the assembler, there is a real call to wmemcmp which adds some time and wmemcmp does not seem to be optimized compared to a simple loop. However, the use of memcmp for 1:1 is a big win. Replacing the memcmp with COMPARE(Py_UCS1, Py_UCS1) shows memcmp is 45% faster on 100 character strings. memcmp doesn't generate a real call: instead there is an inline unrolled (4 bytes per iteration) loop. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17671] io.BufferedRWPair can use uninitialized members
New submission from Amaury Forgeot d'Arc: This segfaults on all Python versions: io.BufferedRWPair.__new__(io.BufferedRWPair).read() The various _forward_call methods should check that the reader and writer objects are correctly initialized. Not NULL, at the very least. -- components: IO messages: 186360 nosy: amaury.forgeotdarc, pitrou priority: normal severity: normal status: open title: io.BufferedRWPair can use uninitialized members type: crash versions: Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15518] Provide test coverage for filecmp.dircmp.report methods.
Changes by Chris Calloway c...@chriscalloway.org: Removed file: http://bugs.python.org/file29682/issue-15518-1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15518 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com