[issue9253] argparse: optional subparsers

2013-04-09 Thread paul j3
paul j3 added the comment: I think this problem arises from a change made in http://bugs.python.org/issue10424 Changeset to default (i.e. development) is http://hg.python.org/cpython/rev/cab204a79e09 Near the end of _parse_known_args it removes a: if positionals: self.error(_('too

[issue12181] SIGBUS error on OpenBSD (sparc64)

2013-04-09 Thread Federico Schwindt
Federico Schwindt added the comment: >> Please note that the tests are still broken and need to be addressed (bignum >> and sys.maxsize passed to ident and data respectively). > > If you could fill a separate issue for that, it would be great. I will but once this is committed. It'd make things

[issue17670] expandtabs() weirdness

2013-04-09 Thread Alfredo Solano Martínez
Alfredo Solano Martínez added the comment: It does, thank you. Maybe hat example could be added to the docuentation? -- ___ Python tracker ___ ___

[issue17666] Extra gzip headers breaks _read_gzip_header

2013-04-09 Thread Peter
Peter added the comment: Reopening: The same regression issue affects Python 3.2.4 as well, so if the fix could be committed to that branch as well that would be great. Long term, I infer that there are no GZIP files in the test suite which use the GZIP header to store metadata (otherwise this

[issue12181] SIGBUS error on OpenBSD (sparc64)

2013-04-09 Thread Charles-François Natali
Charles-François Natali added the comment: >> If you could fill a separate issue for that, it would be great. > > I will but once this is committed. It'd make things easier. No problem. >> BTW, there are other OpenBSD-specific issues on the report, and we >> don't have that many contributors (A

[issue17673] add `copy_from` argument to temporaryfile

2013-04-09 Thread Antoine Pitrou
New submission from Antoine Pitrou: It is sometimes useful to create a temporary file as a copy of an existing file (especially e.g. in tests, when you want to mutate the temp file but not the original). I would suggest adding a `copy_from` argument to TemporaryFile and NamedTemporaryFile, whi

[issue12181] SIGBUS error on OpenBSD (sparc64)

2013-04-09 Thread Federico Schwindt
Federico Schwindt added the comment: This patch was made against 2.7.4. I've checked 3.3.1 and it obviously doesn't work as PyInt* are gone. I'll update the patch later today so it can be used everywhere. -- ___ Python tracker

[issue17666] Extra gzip headers breaks _read_gzip_header

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Adding Georg for 3.2. -- nosy: +georg.brandl, pitrou ___ Python tracker ___ ___ Python-bugs-list mai

[issue17666] Extra gzip headers breaks _read_gzip_header

2013-04-09 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes resolution: fixed -> stage: committed/rejected -> commit review ___ Python tracker ___ _

[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-09 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue17648] test_urllib2 convert doctests to unittest

2013-04-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c9b36969abc by Senthil Kumaran in branch '3.3': #17648 - convert test_urllib2.py doctests to unittests http://hg.python.org/cpython/rev/5c9b36969abc -- ___ Python tracker

[issue17648] test_urllib2 convert doctests to unittest

2013-04-09 Thread Senthil Kumaran
Senthil Kumaran added the comment: Changed in active branches (3.3 and default). -- status: open -> closed ___ Python tracker ___ ___

[issue17648] test_urllib2 convert doctests to unittest

2013-04-09 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue17674] All examples for concurrent.futures fail with "BrokenProcessPool"

2013-04-09 Thread gjwebber
New submission from gjwebber: Running on Windows XP 32-bit. Uninstalled Python 2.7, installed Python 3.3. I asked a question on stack overflow, detailing the problem and supplying example code and Traceback here: http://stackoverflow.com/questions/15900366/all-example-concurrent-futures-code-is

[issue17674] All examples for concurrent.futures fail with "BrokenProcessPool"

2013-04-09 Thread gjwebber
gjwebber added the comment: Forgot to mention, the posted code works for another SO user on Debian and OS X. -- ___ Python tracker ___ ___

[issue17672] ssl unclean shutdown

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think your patch is right: - calling unwrap() already shuts down the SSL layer; this is the right way to do it and is documented as such: "Performs the SSL shutdown handshake, which removes the TLS layer from the underlying socket, and returns the unde

[issue17675] show addresses in socket.__repr__

2013-04-09 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': This is useful, for example, when running tests as "python3 -Wa" and you bump into: ResourceWarning: unclosed With this we'd get: If desirable, I will add some tests. -- components: Library (Lib) files: socket-repr.patch keywords: patch messa

[issue17675] show addresses in socket.__repr__

2013-04-09 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue17674] All examples for concurrent.futures fail with "BrokenProcessPool"

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is not the example code. The example code uses a main() function which is guarded by a "if" block: if __name__ == '__main__': main() See http://docs.python.org/2/library/multiprocessing.html#windows for explanations. Also, perhaps the concurrent.fut

[issue17676] spwd uses -1 for empty attributes

2013-04-09 Thread Alex Waite
New submission from Alex Waite: spwd uses -1 rather than '' for empty attributes. This is different from the behaviour in the pwd module, and makes it more difficult to generate a new, valid shadow entry. In my opinion, simply doing a ':'.join(str(val) for val in rec) should result in a valid

[issue16427] Faster hash implementation

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, the quality of the hash function is clearly reduced: >>> hash("abcdefgh") & 0xff 206 >>> hash("abcdefgi") & 0xff 206 >>> hash("abcdefgj") & 0xff 206 >>> hash("abxx") & 0xff 206 >>> hash("aa11") & 0xff 206 >>> hash("aa12") & 0xff 206 Now to kn

[issue17677] Invitation to connect on LinkedIn

2013-04-09 Thread Bruce Frederiksen
New submission from Bruce Frederiksen: LinkedIn Python, I'd like to add you to my professional network on LinkedIn. - Bruce Bruce Frederiksen Information Technology and Services Professional Tampa/St. Petersburg, Florida Area Confirm that you know Bruce Frederiksen: https://www.

[issue17678] DeprecationWarning fix on cookiejar module since Python 3.3

2013-04-09 Thread Wei-Cheng Pan
Changes by Wei-Cheng Pan : -- components: Library (Lib) files: cookiejar_fix_deprecated_method_calls.patch keywords: patch nosy: Wei-Cheng.Pan priority: normal severity: normal status: open title: DeprecationWarning fix on cookiejar module since Python 3.3 versions: Python 3.3 Added file

[issue17677] Invitation to connect on LinkedIn

2013-04-09 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mai

[issue16427] Faster hash implementation

2013-04-09 Thread STINNER Victor
STINNER Victor added the comment: > (dicts and sets have a sophisticated probing algorithm which takes into > account the whole hash value, not the masked one). Correct, so your specific example should not be a problem since the whole hash value is different for the 6 hash values. > Now to kno

[issue16427] Faster hash implementation

2013-04-09 Thread Charles-François Natali
Charles-François Natali added the comment: Note that the patch uses type punning through a union: while GCC allows this, it's not allowed by ANSI (although since we're using a char [], it's somewhat a grey area). An aggresive compiler could optimiza the read/write away. -- nosy: +neolo

[issue17678] DeprecationWarning fix on cookiejar module since Python 3.3

2013-04-09 Thread Wei-Cheng Pan
New submission from Wei-Cheng Pan: Please ignore previous typo patch. This is the correct version -- Added file: http://bugs.python.org/file29753/cookiejar_fix_deprecated_method_calls.patch ___ Python tracker ___

[issue17678] DeprecationWarning fix on cookiejar module since Python 3.3

2013-04-09 Thread Wei-Cheng Pan
Changes by Wei-Cheng Pan : Removed file: http://bugs.python.org/file29752/cookiejar_fix_deprecated_method_calls.patch ___ Python tracker ___

[issue17679] sysconfig generation uses some env variables multiple times

2013-04-09 Thread Bohuslav "Slavek" Kabrda
New submission from Bohuslav "Slavek" Kabrda: When compiling Python 3.3.1, I noticed that some variables like LDFLAGS or CFLAGS in sysconfig have some flags multiple times. (Which BTW breaks distutils.tests.{test_sysconfig_compiler_vars,test_sysconfig_module}) This is caused by interpretation

[issue17674] All examples for concurrent.futures fail with "BrokenProcessPool"

2013-04-09 Thread gjwebber
gjwebber added the comment: As mentioned in the previously linked post, I copy-pasted the example code shown here: http://docs.python.org/dev/library/concurrent.futures.html#processpoolexecutor-example Which resulted in exactly the same error as the 'more simple' example I provided. There is

[issue17680] self is lost if methods are callable objects

2013-04-09 Thread Roman Rader
New submission from Roman Rader: Some strange behavior is observed while method in object substitutes with callable object. For example: - class Meth(object): def __call__(*args, **kwargs): print (args, kwargs) class X(object): def some_metho

[issue17674] All examples for concurrent.futures fail with "BrokenProcessPool"

2013-04-09 Thread gjwebber
gjwebber added the comment: Just ran the example code linked here again for my own sanity: http://docs.python.org/dev/library/concurrent.futures.html#processpoolexecutor-example Exactly the same thing happened. Here is the Traceback: Traceback (most recent call last): File "", line 420, in run

[issue17680] self is lost if methods are callable objects

2013-04-09 Thread Christian Heimes
Christian Heimes added the comment: Your callable object has to implement the descriptor protocol. Otherwise the object isn't wrapped in a method object. http://docs.python.org/2/howto/descriptor.html Please ask on the Python user list if you still need more information. -- nosy: +chr

[issue17678] DeprecationWarning fix on cookiejar module since Python 3.3

2013-04-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset b3d5621511db by Senthil Kumaran in branch '3.3': #17678: Fix DeprecationWarning in the http/cookiejar.py by changing the usage http://hg.python.org/cpython/rev/b3d5621511db New changeset 79387f3bcc92 by Senthil Kumaran in branch 'default': #17678: R

[issue17678] DeprecationWarning fix on cookiejar module since Python 3.3

2013-04-09 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the patch. Realized that is_third_party method does not have test coverage. Hence this was not detected by our test runs. Increasing the coverage may be a TODO. -- assignee: -> orsenthil nosy: +orsenthil resolution: -> fixed stage: -> co

[issue17672] ssl unclean shutdown

2013-04-09 Thread Hiroaki Kawai
Hiroaki Kawai added the comment: Please run the test so that you'll see the problem. 2013/4/9 Antoine Pitrou > > Antoine Pitrou added the comment: > > I don't think your patch is right: > > - calling unwrap() already shuts down the SSL layer; this is the right way > to do it and is documented

[issue17666] Extra gzip headers breaks _read_gzip_header

2013-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The committed patch contains a simple test for gzip file with an extra field. When we add the feature to create gzip files with an extra field, this test can be extended. -- ___ Python tracker

[issue17672] ssl unclean shutdown

2013-04-09 Thread Charles-François Natali
Charles-François Natali added the comment: > sometimes RST was sent over the network instead of FIN Your client sends data, but the server never reads it: when a TCP socket is closed while there's still data in the input socket buffer, a RST is sent instead of a FIN. That's normal behaviour.

[issue17672] ssl unclean shutdown

2013-04-09 Thread Hiroaki Kawai
Hiroaki Kawai added the comment: Client gets an exception in reading the socket, not in writing. Please run the test code and see what happens. 2013/4/9 Charles-François Natali > > Charles-François Natali added the comment: > > > sometimes RST was sent over the network instead of FIN > > Your

[issue17674] All examples for concurrent.futures fail with "BrokenProcessPool"

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, can someone else confirm the issue on Windows? -- nosy: +brian.curtin, sbt, tim.golden ___ Python tracker ___ __

[issue17672] ssl unclean shutdown

2013-04-09 Thread Charles-François Natali
Charles-François Natali added the comment: > Client gets an exception in reading the socket, not in writing. Please run > the test code and see what happens. Of course it gets ECONNRESET on subsequent recv(), that's how TCP works. Just make your handler read from the socket and it won't happen

[issue17674] All examples for concurrent.futures fail with "BrokenProcessPool"

2013-04-09 Thread Brian Curtin
Brian Curtin added the comment: The example code works for me on 3.3.0 on Windows 8. I'd have to find a VM to try out XP like gjwebber - will look later. -- ___ Python tracker _

[issue17681] Work with an extra field of gzip files

2013-04-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Gzip files can contains an extra field and some applications use this for extending gzip format. The current GzipFile implementation ignores this field on input and doesn't allow to create a new file with an extra field. I propose to save an extra field da

[issue16427] Faster hash implementation

2013-04-09 Thread STINNER Victor
STINNER Victor added the comment: > Note that the patch uses type punning through a union What is the standard and portable way to cast an array of bytes to size_t? 2013/4/9 Charles-François Natali : > > Charles-François Natali added the comment: > > Note that the patch uses type punning throug

[issue17672] ssl unclean shutdown

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Client gets an exception in reading the socket, not in writing. Yes, it does, and the exception bears the error code SSL_ERROR_EOF (8), which is expected here. The question is: why would you expect reading *not* to raise an exception while the remote end of

[issue17672] ssl unclean shutdown

2013-04-09 Thread Hiroaki Kawai
Hiroaki Kawai added the comment: As an interface of ssl socket, server does not have to read, just write some data. The client side should be able to read the bytes that ther server sent. The problem is that client will sometimes raise an unexpected SSLError in reading the ssl socket because serv

[issue17672] ssl unclean shutdown

2013-04-09 Thread Charles-François Natali
Charles-François Natali added the comment: > As an interface of ssl socket, server does not have to read, just write > some data. > The client side should be able to read the bytes that ther server sent. The > problem is that client will sometimes raise an unexpected SSLError in > reading the ssl

[issue17672] ssl unclean shutdown

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > As an interface of ssl socket, server does not have to read, just > write > some data. > The client side should be able to read the bytes that ther server > sent. Please re-read your own code. The server does: +def handle(self): +s

[issue17672] ssl unclean shutdown

2013-04-09 Thread Hiroaki Kawai
Hiroaki Kawai added the comment: The error looks like : SSLError(8, '_ssl.c:1363: EOF occurred in violation of protocol') But why we see "in violation of protocol" here? 2013/4/10 Antoine Pitrou > > Antoine Pitrou added the comment: > > > Client gets an exception in reading the socket, not in

[issue17536] update browser list with additional browser names

2013-04-09 Thread Matthias Klose
Matthias Klose added the comment: in http://mail.python.org/pipermail/python-dev/2013-April/125205.html Guido made the suggestion: """ But perhaps we could change the focus for 2.7 development a bit: instead of fixing bugs (or bickering about whether something is a bug fix or a new feature) we

[issue17682] _io is missing in Setup.dist in 2.7.x

2013-04-09 Thread Matthias Klose
New submission from Matthias Klose: _io is missing in Setup.dist in 2.7.x. just adding it, copied the file list from the setup.py, leaving it commented out. -- components: Build messages: 186430 nosy: doko priority: normal severity: normal status: open title: _io is missing in Setup.dis

[issue17536] update browser list with additional browser names

2013-04-09 Thread Matthias Klose
Matthias Klose added the comment: consider that chrome is your only browser installed, then the module should work as well. -- ___ Python tracker ___ ___

[issue17536] update browser list with additional browser names

2013-04-09 Thread Senthil Kumaran
Senthil Kumaran added the comment: Doko: I am not strongly against the 2.7 patch. Given the last point you made providing the context from BDFL and also some of Eric's points, going ahead with your 2.7 patch seems OK to me. So +1 -- ___ Python track

[issue17682] _io is missing in Setup.dist in 2.7.x

2013-04-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 075bbf701d0b by doko in branch '2.7': - Issue #17682: Add the _io module to Modules/Setup.dist (commented out). http://hg.python.org/cpython/rev/075bbf701d0b -- nosy: +python-dev ___ Python tracker

[issue17682] _io is missing in Setup.dist in 2.7.x

2013-04-09 Thread Matthias Klose
Changes by Matthias Klose : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ P

[issue17672] ssl unclean shutdown

2013-04-09 Thread Hiroaki Kawai
Hiroaki Kawai added the comment: Ah, sorry I understood now. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17672] ssl unclean shutdown

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The error looks like : SSLError(8, '_ssl.c:1363: EOF occurred in > violation > of protocol') > But why we see "in violation of protocol" here? Because the SSL layer wasn't shutdown cleanly: the TCP connection was closed while the SSL layer was still active. Yo

[issue17511] Idle find function closes after each find operation

2013-04-09 Thread Sarah
Sarah added the comment: I agree that discussion is a good idea. Personally, though, I don't want to make the user hit ^F once to set the key and use ^G to find it again. It works well and, for a more advanced user, is great, but it adds to what a user must learn to get up and running in Pyth

[issue17672] ssl unclean shutdown

2013-04-09 Thread Hiroaki Kawai
Hiroaki Kawai added the comment: I think creating an ssl socket from existing socket from an instance generated by library routine, and replace that socket with ssl socket is very common usage. Injecting wrap_socket is very easy. But injecting unwrap call is not easy. In python 2.6, I got a plai

[issue17672] ssl unclean shutdown

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, closing the issue then. -- resolution: -> rejected status: open -> closed ___ Python tracker ___ __

[issue16427] Faster hash implementation

2013-04-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: > > Note that the patch uses type punning through a union > > What is the standard and portable way to cast an array of bytes to size_t? I'd expect just casting the pointer type before dereferencing: unsigned char *p; ... hash = (multiplier * hash) ^ *((Py_uh

[issue17675] show addresses in socket.__repr__

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: This sounds ok to me. It will indeed make things clearer in tests. -- ___ Python tracker ___ ___ Pyt

[issue16427] Faster hash implementation

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > pybench and perf.py can be used to measure performances of the patch. > The speedup may not be detected, but a slowdown would be detected at > least. The slowdown would only occur for specific, well-chosen patterns. Also it may make DoS attacks easier. (remem

[issue16427] Faster hash implementation

2013-04-09 Thread Charles-François Natali
Charles-François Natali added the comment: > I'd expect just casting the pointer type before dereferencing: > > unsigned char *p; > ... > hash = (multiplier * hash) ^ *((Py_uhash_t *)p); > > (don't use size_t, use Py_uhash_t) Is p guaranteed to be size_t aligned? If not, unaligned access can seg

[issue16427] Faster hash implementation

2013-04-09 Thread Charles-François Natali
Charles-François Natali added the comment: > Is p guaranteed to be size_t aligned? > If not, unaligned access can segfault (e.g. on Sparc IIRC). Apparently yes. -- ___ Python tracker __

[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps this would deserve a 2.7.5? -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mai

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-09 Thread Martin Morrison
Changes by Martin Morrison : -- nosy: +isoschiz ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue17566] Make importlib.abc.Loader.module_repr optional

2013-04-09 Thread Brett Cannon
Changes by Brett Cannon : -- components: +Library (Lib) -Documentation title: Document that importlib.abc.Loader.module_repr is abstract and thus needed by various other ABCs -> Make importlib.abc.Loader.module_repr optional versions: -Python 3.3 __

[issue17650] There is no exception correspond to errno EROFS

2013-04-09 Thread Andrew Svetlov
Andrew Svetlov added the comment: Ok. Antoine's comment is clean. Let's close the issue. -- status: pending -> closed ___ Python tracker ___ _

[issue17674] All examples for concurrent.futures fail with "BrokenProcessPool"

2013-04-09 Thread Richard Oudkerk
Richard Oudkerk added the comment: @gjwebber: How exactly are you running the program to get that traceback? The following lines make it look like you are doing something non-standard (as opposed to just saving the file and running it from the command line): File "", line 420, in run_nodebug

[issue8106] SSL session management

2013-04-09 Thread Wade
Changes by Wade : -- nosy: +WadeC ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman

[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2013-04-09 Thread Steve Dower
Steve Dower added the comment: I've added a patch that replaces query_vcvarsall() with an implementation that does not try and use the batch file. Instead, the functionality of the batch file (effectively, reading the base path from the registry and appending constants) is reproduced in Python

[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2013-04-09 Thread Steve Dower
Steve Dower added the comment: Adding patch for 2.7. -- Added file: http://bugs.python.org/file29755/msvccompiler9_27.diff ___ Python tracker ___ _

[issue17669] Segfault caused by weird combination of imports and yield from

2013-04-09 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue17093] Make importlib.abc more inheritance-friendly

2013-04-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e733e30edf6 by Brett Cannon in branch 'default': Issue #17093,17566,17567: Methods from classes in importlib.abc now raise/return http://hg.python.org/cpython/rev/8e733e30edf6 New changeset 7e91dc7221d5 by Brett Cannon in branch 'default': What's n

[issue17093] Make importlib.abc more inheritance-friendly

2013-04-09 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker ___

[issue17566] Make importlib.abc.Loader.module_repr optional

2013-04-09 Thread Brett Cannon
Brett Cannon added the comment: Fixed by http://hg.python.org/cpython/rev/8e733e30edf6 by raising NotImplementedError and relying on the fact that ModuleType.__repr__() swallows any exception. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___

[issue17567] Clarify importlib.abc.PathEntryFinder.find_loader() docs

2013-04-09 Thread Brett Cannon
Brett Cannon added the comment: Covered by http://hg.python.org/cpython/rev/8e733e30edf6 -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker _

[issue17675] show addresses in socket.__repr__

2013-04-09 Thread Charles-François Natali
Charles-François Natali added the comment: +1 from me. Any info that can help debugging is a good thing (calling getsockname() on an non-connected socket will raise an error that will get cacthed, but there's not much we can do about it). -- nosy: +neologix ___

[issue17675] show addresses in socket.__repr__

2013-04-09 Thread STINNER Victor
STINNER Victor added the comment: +1 for the idea, +1 for the need of tests. About the patch: you may use a try/except for getsockname(), and another for getpeername(). -- nosy: +haypo ___ Python tracker

[issue17615] String comparison performance regression

2013-04-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset b3168643677b by Victor Stinner in branch 'default': Issue #17615: On Windows (VS2010), Performances of wmemcmp() to compare Unicode http://hg.python.org/cpython/rev/b3168643677b -- ___ Python tracker

[issue17615] String comparison performance regression

2013-04-09 Thread STINNER Victor
STINNER Victor 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:" I tested my patch on Windows before the commit and I saw similar performances with and without wmemcmp(). I ch

[issue6696] Profile objects should be documented

2013-04-09 Thread Tom Pinckney
Tom Pinckney added the comment: Another update based on comments. Removed links to cProfile.py and _lsof.c. -- Added file: http://bugs.python.org/file29756/patch4.diff ___ Python tracker

[issue2771] Test issue

2013-04-09 Thread Test User Deily
Test User Deily added the comment: testing -- nosy: +testusernad -ezio.melotti, mark.dickinson ___ Python tracker ___ ___ Python-bugs-l

[issue17628] str==str: compare the first and last character before calling memcmp()

2013-04-09 Thread STINNER Victor
STINNER Victor added the comment: Because most people agree that checking first and/or last byte/character is not a good idea (may be slower), here is a new patch removing code checking first/last byte or character in bytes_richcompare() and unicode_eq(). It removes the usage of the "register"

[issue16850] Add "e" mode to open(): close-and-exec (O_CLOEXEC) / O_NOINHERIT

2013-04-09 Thread STINNER Victor
STINNER Victor added the comment: The PEP 433 and its issue #17036 replaces this issue, they are more generic. -- resolution: -> fixed status: open -> closed superseder: -> Implementation of the PEP 433: Easier suppression of file descriptor inheritance __

[issue16286] Use hash if available to optimize a==b and a!=b for bytes and str

2013-04-09 Thread STINNER Victor
STINNER Victor added the comment: "I will benchmark the overhead of memcmp() on short strings. We may check the first and last characters before calling memcmp() to limit the overhead of calling a function." I created the issue #17628 for this point. --

[issue16153] PyUnicode_FromFormatV() must fail if the format string is invalid

2013-04-09 Thread STINNER Victor
STINNER Victor added the comment: Barry wrote on python-dev mailing list: "If it's documented to behave that way, why would you still consider it a bug? The current behavior is clearly intentional, the function is working as intended, and there may be code out there that depends on this documente

[issue17615] String comparison performance regression

2013-04-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'd like to propose a code size reduction. If kind1 < kind2, swap(kind1, kind2) and swap(data1, data2). Set a variable swapped to 1 (not swapped) or -1 (swapped); then return either swapped or -swapped when a difference is found. With that, the actual compari

[issue17615] String comparison performance regression

2013-04-09 Thread STINNER Victor
STINNER Victor added the comment: "I'd like to propose a code size reduction. If kind1 < kind2, swap(kind1, kind2) and swap(data1, data2)." Yeah, I hesitated to implement this, but I forgot it later. Would you like to work on such change? -- ___ Py

[issue17628] str==str: compare the first and last character before calling memcmp()

2013-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Because most people agree that checking first and/or last > byte/character is not a good idea (may be slower), here is a new patch > removing code checking first/last byte or character in > bytes_richcompare() and unicode_eq(). You misunderstood. Checking the

[issue17677] Invitation to connect on LinkedIn

2013-04-09 Thread Ned Deily
Changes by Ned Deily : -- Removed message: http://bugs.python.org/msg186404 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue14439] Easier error diagnosis when bootstrapping the runpy module in main

2013-04-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 39b9b05c3085 by Victor Stinner in branch 'default': Close #14439: Python now prints the traceback on runpy failure at startup. http://hg.python.org/cpython/rev/39b9b05c3085 -- nosy: +python-dev resolution: -> fixed stage: -> committed/reje

[issue14439] Easier error diagnosis when bootstrapping the runpy module in main

2013-04-09 Thread STINNER Victor
STINNER Victor added the comment: Testing the patch manually is simple: add anything wrong in runpy.py and run "python -m base64". Output: --- Could not import runpy module --- Output with the patch: --- Could not import runpy module Traceback (most recent call last): File "/home/haypo/prog/

[issue17677] spam

2013-04-09 Thread Ned Deily
Changes by Ned Deily : -- nosy: -dangyogi title: Invitation to connect on LinkedIn -> spam ___ Python tracker ___ ___ Python-bugs-lis

[issue17679] sysconfig generation uses some env variables multiple times

2013-04-09 Thread Ned Deily
Ned Deily added the comment: There definitely are configurations where some values do get duplicated in CFLAGS and LDFLAGS. In my experience this is generally harmless for builds but, as you point out, it can break tests that expect particular values. It would be nice to clean this up.

[issue17679] sysconfig generation uses some env variables multiple times

2013-04-09 Thread Ned Deily
Changes by Ned Deily : -- versions: +Python 2.7, Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2013-04-09 Thread Chris Calloway
Changes by Chris Calloway : Removed file: http://bugs.python.org/file29749/issue-15518-1.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2013-04-09 Thread Chris Calloway
Chris Calloway added the comment: I replaced issue-15518-1.patch. I believe it now addresses all the concerns expressed thus far. If reviewed favorably, I will extend it to clean-up the pre-existing tests to address the concerns noted about them, especially since the filecmpdata directory adde

[issue17670] expandtabs() weirdness

2013-04-09 Thread Ned Deily
Ned Deily added the comment: That's a good point. Here's a patch for the documentation with a simplified example: >>> '01\t456\t89'.expandtabs(4) '01 456 89' What do others think: is an example useful and, if so, this example? -- assignee: -> docs@python components: +Do

  1   2   >