Re: Slices time complexity

2015-05-21 Thread Chris Angelico
On Thu, May 21, 2015 at 5:35 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: You don't need huge. On any algorithm where slices are being used you will have to account for the linear complexity. You seem to be dismissive of this fact, but it can have tremendous performance

[issue24250] Optimization for strcpy(..., ) in file 'install.c'

2015-05-21 Thread Paul Moore
Paul Moore added the comment: The patch looks fine to me, although I don't think you need the comment showing the old code. The new code is perfectly clear on its own. -- nosy: +paul.moore ___ Python tracker rep...@bugs.python.org

Re: Slices time complexity

2015-05-21 Thread Steven D'Aprano
On Thursday 21 May 2015 05:51, Mario Figueiredo wrote: On Wed, 20 May 2015 03:07:03 +1000, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: [...] But, really... if you're serious about dealing with huge arrays of data, you want something like numpy, not Python lists. You don't

Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence

2015-05-21 Thread Steven D'Aprano
On Thursday 21 May 2015 15:34, chaotic@gmail.com wrote: So I was trying to dir /s /b using python. Now since the file's path name is computed using other part of the code, I am feeding in a variable here and somehow it does not seem to work.. :( Intent is to run following command from

[issue24257] Incorrect use of PyObject_IsInstance

2015-05-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyObject_IsInstance() is used incorrectly for testing if Python object is an instance of specified builtin type before direct access to internals of object. This is not correct, because PyObject_IsInstance() checks the __class__ attribute that can be

[issue24180] PEP 492: Documentation

2015-05-21 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: Removed file: http://bugs.python.org/file39448/async_docs_v1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24180 ___

[issue24180] PEP 492: Documentation

2015-05-21 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: Added file: http://bugs.python.org/file39449/async_docs_v1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24180 ___

[issue24256] threading.Timer is not a class

2015-05-21 Thread Ned Deily
Ned Deily added the comment: This is really a duplicate of Issue5831 which ended up being closed as a duplicate of Issue10968. The resolution of the latter issue was to change threading.Timer in Python 3.3 to actually be a class, a new feature. But it appears that along the way the issue of

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-21 Thread Nick Coghlan
Nick Coghlan added the comment: Why the switch to WriteUnraisable? Unlike __del__ methods and similar operations that may be invoked at arbitrary points, there's nothing stopping us from emitting an exception here - indeed, we're *already* handling an exception. Getting a hard failure on

[issue24180] PEP 492: Documentation

2015-05-21 Thread Yury Selivanov
New submission from Yury Selivanov: Please find attached a docs patch for PEP 492 changes. I'd really appreciate if someone can review it / help me with it. I think it's important to have at least some documentation shipped with beta-1, so that people start testing the feature. --

[issue24255] Replace debuglevel-related logic with logging

2015-05-21 Thread Demian Brecht
New submission from Demian Brecht: Far too many times have I wished that changing the logging output in http.client was controllable through logging configuration rather than code changes modifying a connection's debuglevel. It would be nice if the http package was brought up to date and had

Re: Slices time complexity

2015-05-21 Thread Marko Rauhamaa
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: On Wednesday 20 May 2015 19:56, Bartc wrote: But simple data such as small integers and floats are passed by value. Bigger data is 'sort of' passed by reference, but not full reference (the details are a bit messy, but if an object

Re: Looking for direction

2015-05-21 Thread 20/20 Lab
Your the second to recommend this to me. I ended up picking it up last week. So I need to sit down with it. I was able to get a working project. However, I dont fully grasp the details on how. So the book will help I'm sure. Thank you. On 05/20/2015 05:50 AM, darnold via Python-list

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Ned Deily
Ned Deily added the comment: FWIW, the random segfault seems to be triggered by hash randomization. If I disable randomization, it does not seem to fail: for i in `seq 1 20`; do PYTHONHASHSEED=1 ./python -m test.regrtest -m test_basic test_configparser ; done Presumably, the --forever

[issue24252] IDLE removes elements from tracebacks.

2015-05-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: The two additional entries are the last two. In this case, they are needed because KeyError pertains to the dict lookup in the last line self.breaks[filename]. Mistaken in this particular case or not, the deletion is intentional. Run.print_exception has

Trac 1.0.6 Released

2015-05-21 Thread Ryan Ollos
Trac 1.0.6 Released === Trac 1.0.6, the sixth maintenance release for the current stable branch, is now available! You will find this release at the usual places: http://trac.edgewall.org/wiki/TracDownload#LatestStableRelease https://pypi.python.org/pypi/Trac/1.0.6.post2

[issue24256] threading.Timer is not a class

2015-05-21 Thread John Runyon
New submission from John Runyon: the documentation (https://docs.python.org/2/library/threading.html#threading.Timer) lists threading.Timer as a class. It is not, which means that (for example) you can not use it in isinstance(). threading._Timer is a class. threading.Timer(...).__class__ is

Re: subprocess.Popen zombie

2015-05-21 Thread Thomas Rachel
Am 20.05.2015 um 18:44 schrieb Robin Becker: not really, it's just normal to keep event routines short; the routine which beeps is after detection of the cat's entrance into the house and various recognition schemes have pronounced intruder :) You could add a timed cleanup routine which

[issue24115] Unhandled error results of C API functions

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch adds handling of error results of following functions: PyObject_IsTrue(), PyObject_Not(), PyObject_IsInstance(), PyObject_RichCompareBool(), _PyDict_Contains(). All these functions usually return 0 or 1, but also can return -1 in the case of

[issue24180] PEP 492: Documentation

2015-05-21 Thread Nick Coghlan
Nick Coghlan added the comment: Patch looks worth merging to me. Some minor questions/quibbles: Asynchronous iterator question: should the typical pattern for those be: def __aiter__(self): return self def __await__(self): return self Did we put the ABC's in the right

Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence

2015-05-21 Thread Peter Otten
Steven D'Aprano wrote: Also, this only looks in the C:.../XYZ directory. I think that Python 3.4 or better will accept a ** wildcard instead of * to look in subdirectories too. Unfortunately that's Python 3.5. You are ahead of time. Actually, I think you don't need the shell argument. Try

Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence

2015-05-21 Thread Tim Golden
On 21/05/2015 09:07, Steven D'Aprano wrote: On Thursday 21 May 2015 15:34, chaotic@gmail.com wrote: So I was trying to dir /s /b using python. Now since the file's path name is computed using other part of the code, I am feeding in a variable here and somehow it does not seem to work..

[issue24258] BZ2File objects do not have name attribute

2015-05-21 Thread Jozef Sivek
New submission from Jozef Sivek: Unlike GzipFile the BZ2File does not have defined name attribute. The reading of this attribute results in: AttributeError: 'BZ2File' object has no attribute 'name'. This is truly missing feature and wrong behaviour, compare:

[issue24254] Make class definition namespace ordered by default

2015-05-21 Thread Eric Snow
Eric Snow added the comment: Here's a patch that drops adding __definition_order__. You can get the same effect by adding `__definition_order__ = list(locals())` at the bottom of your class definition. The benefit of having `__definition_order__` is that the information is automatically

[issue20438] inspect: Deprecate getfullargspec?

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Please see the new patch. So it's time to deprecate getargspec with a warning (was softly deprecated in 3.0). getfullargspec() and getcallargs() deprecation is documented. I also want to deprecate formatargspec() and formatargvalues(), but Signature does

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Daniel. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15836 ___ ___

[issue24237] PEP 479: missing DeprecationWarning when generator_stop is not used

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, I've updated the patch to address all PendingDeprecationWarnings related to the PEP 479 in the test suite. -- Added file: http://bugs.python.org/file39457/gen_stop_warn.patch ___ Python tracker

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread Tim Golden
Tim Golden added the comment: Tests failed on Windows probably because of NamedTemporaryFile -- nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21916 ___

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread arachnegl
arachnegl added the comment: Thanks Tim for testing on Windows and suggesting the change. -- nosy: +gregorylo...@gmail.com versions: +Python 3.4 Added file: http://bugs.python.org/file39458/test_turtle.patch ___ Python tracker rep...@bugs.python.org

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread Tim Golden
Tim Golden added the comment: @RDM I'm sitting with Greg at a London Python session and we've run through these tests on 3.4/3.5. I know you were reviewing this code at PyCon. Are you happy for me to commit from here? -- ___ Python tracker

[issue23985] Crash when deleting slices from duplicated bytearray

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 274c1b0a2494 by Serhiy Storchaka in branch '2.7': Issue #23985: Fixed integer overflow in iterator object. Original patch by https://hg.python.org/cpython/rev/274c1b0a2494 New changeset 5b86a1abc8c3 by Serhiy Storchaka in branch '3.4': Issue

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2015-05-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15836 ___

[issue22939] integer overflow in iterator object

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Clement. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22939

[issue23699] Add a macro to ease writing rich comparisons

2015-05-21 Thread Stefan Krah
Stefan Krah added the comment: NotImplemented is a non-error return value that's used when the objects cannot be compared, e.g. when the function receives Py_LT but the objects are unorderable. Getting a value outside {Py_EQ, ...} is a hard error that cannot occur in a correct program.

[issue24250] Optimization for strcpy(..., ) in file 'install.c'

2015-05-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- priority: normal - low stage: - patch review versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24250 ___

[issue24056] Expose closure generator status in function repr()

2015-05-21 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: Added file: http://bugs.python.org/file39461/issue24056_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24056 ___

[issue24056] Expose closure generator status in function repr()

2015-05-21 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: Removed file: http://bugs.python.org/file39460/issue24056_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24056 ___

python paho mqtt thread

2015-05-21 Thread Luca Sanna
hi , I try to run this code MQTT but I can not read the messages in the topic , can you help me ? thanks class MyMQTTClass(Thread): #def __init__(self, clientid=None): clientid=None _mqttc = mqtt.Client(clientid) #_mqttc.on_message = mqtt_on_message #_mqttc.on_connect =

[issue22107] tempfile module misinterprets access denied error on Windows

2015-05-21 Thread Paul Moore
Paul Moore added the comment: I'm not sure I follow. Isn't the point of this patch to try again in certain cases of a PermissionError, where currently the code breaks out of the loop early? How can the result be worse than the current behaviour? Suerly sometimes (maybe not always) it works

[issue24180] PEP 492: Documentation

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Hi Berker, thanks for the review. I think all your edits are reasonable, so I've just committed your patch as is. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24180

[issue24260] TabError behavior doesn't match documentation

2015-05-21 Thread Evgeny Kapun
New submission from Evgeny Kapun: In the documentation, it is said: Indentation is rejected as inconsistent if a source file mixes tabs and spaces in a way that makes the meaning dependent on the worth of a tab in spaces; a TabError is raised in that case. But that's not true. For

[issue23898] inspect() changes in Python3.4 are not compatible with objects that implement special __bool__, __eq__

2015-05-21 Thread mike bayer
mike bayer added the comment: thanks for the merge! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23898 ___ ___ Python-bugs-list mailing list

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added comments on Rietveld. It looks the patch includes changes for non-relevant files. -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21916

[issue22107] tempfile module misinterprets access denied error on Windows

2015-05-21 Thread Tim Golden
Tim Golden added the comment: My reluctance to commit the os.access patch is because it will cause such a behaviour change in a function which has been pretty stable for a long while. It'll certainly be more correct, but at the undoubted expense of breaking someone's long-working code.

[issue24258] BZ2File objects do not have name attribute

2015-05-21 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24258 ___ ___ Python-bugs-list mailing

[issue24250] Optimization for strcpy(..., ) in file 'install.c'

2015-05-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: I agree with vadmium and also note that many compilers (though I don't know about MSVC) can optimize the strcpy call away. -- nosy: +benjamin.peterson resolution: - works for me status: open - closed ___ Python

[issue24180] PEP 492: Documentation

2015-05-21 Thread Berker Peksag
Berker Peksag added the comment: Hi Yury, Here is a post commit review. I've mostly removed some additional PEP 492 mentions and made a couple of trivial changes. -- nosy: +berker.peksag Added file: http://bugs.python.org/file39462/issue24180.diff

[issue24180] PEP 492: Documentation

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5691d2d2d0a4 by Yury Selivanov in branch 'default': Issue 24180: Fixes by Berker Peksag. https://hg.python.org/cpython/rev/5691d2d2d0a4 -- ___ Python tracker rep...@bugs.python.org

[issue23973] PEP 484 implementation

2015-05-21 Thread Guido van Rossum
Guido van Rossum added the comment: New patch. -- Added file: http://bugs.python.org/file39463/pep484.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23973 ___

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-21 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24259 ___ ___ Python-bugs-list mailing

[issue24250] Optimization for strcpy(..., ) in file 'install.c'

2015-05-21 Thread Martin Panter
Martin Panter added the comment: For the record, the file being patched is PC/bdist_wininst/install.c My opinion is the original is more readable, and unless this is some inner loop bottleneck here it seems like premature optimization. -- nosy: +vadmium

[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data

2015-05-21 Thread Martin Panter
Martin Panter added the comment: I left some new comments. However I remain concerned at how complicated and overloaded the API is becoming. It certainly makes it hard to review for correctness. I could easily have missed some corner case that is broken by the changes. There are a lot of odd

CFFI 1.0.1 released

2015-05-21 Thread Armin Rigo
Hi all, CFFI 1.0.1 final has now been released for CPython! CFFI is a (CPython and PyPy) module to interact with C code from Python. The main news from CFFI 0.9 is the new way to build extension modules: the out-of-line mode, where you have a separate build script. When this script is executed,

[issue24256] threading.Timer is not a class

2015-05-21 Thread John Runyon
John Runyon added the comment: Concise documentation isn't my forte, but my confusion would've been avoided with a note that for historical reasons, threading.Timer is actually a factory function for the underlying class threading._Timer or something along those lines. --

[issue22955] Pickling of methodcaller, attrgetter, and itemgetter

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2688655e431a by Serhiy Storchaka in branch 'default': Issue #22955: Fixed reference leak in attrgetter.repr(). https://hg.python.org/cpython/rev/2688655e431a -- ___ Python tracker rep...@bugs.python.org

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-21 Thread Thomas Güttler
New submission from Thomas Güttler: The Python tarfile library does not detect a broken tar. user@host$ wc -c good.tar 143360 good.tar user@host$ head -c 13 good.tar cut.tar user@host$ tar -tf cut.tar ... tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now Very

Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence

2015-05-21 Thread Tim Golden
On 21/05/2015 15:14, Grant Edwards wrote: On 2015-05-21, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: import glob print(glob.glob(c:/abc/def/ghjmain/features/XYZ/*filename)) Don't use backslashes \ as they have special meaning to Python. Use forward slashes and let Python

[issue24257] Incorrect use of PyObject_IsInstance

2015-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: is it the case that if the current check passes incorrectly one will always get a segfauilt or other error? Yes, that is the case. All four of these checks precede a reference to an structure member that depends on being an exact type or subtype. So,

Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence

2015-05-21 Thread Chris Angelico
On Fri, May 22, 2015 at 12:14 AM, Grant Edwards invalid@invalid.invalid wrote: On 2015-05-21, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: import glob print(glob.glob(c:/abc/def/ghjmain/features/XYZ/*filename)) Don't use backslashes \ as they have special meaning to Python.

Re: Slices time complexity

2015-05-21 Thread bartc
On Thursday, 21 May 2015 06:19:39 UTC+1, Steven D'Aprano wrote: On Wednesday 20 May 2015 19:56, Bartc wrote: What you *shouldn't* do is implement your own argument convention, (That's exactly what I did for my static language compiler which generates x64 code. The Win64 calling convention was

[issue24257] Incorrect use of PyObject_IsInstance

2015-05-21 Thread R. David Murray
R. David Murray added the comment: Is there any chance that these changes will break working code, or is it the case that if the current check passes incorrectly one will always get a segfauilt or other error? -- nosy: +r.david.murray ___ Python

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: Cool. The following gives consistent failures at certain seed values: for i in `seq 1 100`; do echo $i; PYTHONHASHSEED=$i ./python -m test.regrtest -m test_basic test_configparser ; done Through 100 I get segfaults with 7, 15, 35, 37, 39, 40, 42, 47, 50, 66,

Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence

2015-05-21 Thread Grant Edwards
On 2015-05-21, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: import glob print(glob.glob(c:/abc/def/ghjmain/features/XYZ/*filename)) Don't use backslashes \ as they have special meaning to Python. Use forward slashes and let Python convert them as needed. Interesting. I've

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: Thanks for looking into this, Ned. I've changed that size_t to ssize_t which I expect will quiet that clang warning you saw. I'm glad you pointed it out because it means that that branch was never executing! Unfortunately fixing that does not solve all my

[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data

2015-05-21 Thread Rolf Krahl
Rolf Krahl added the comment: Hi again, first of all, sorry for not contributing to the discussion for such a long time. I was quite busy lately. I tested the patch with Python 3.5.0a3. It works nicely for my use case. Thanks a lot! I have one issue though: urllib's HTTPHandler and

Re: No ttk in 2.7

2015-05-21 Thread Sturla Molden
Zachary Ware zachary.ware+pyl...@gmail.com wrote: The way I would do it is as follows: try: import tkinter as tk from tkinter import ttk except ImportError: import Tkinter as tk import ttk If I may suggest, just write it in Python3 first, then when it

Re: subprocess.Popen zombie

2015-05-21 Thread Ian Kelly
On May 21, 2015 12:41 AM, Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa...@spamschutz.glglgl.de wrote: Am 20.05.2015 um 18:44 schrieb Robin Becker: not really, it's just normal to keep event routines short; the routine which beeps is after detection of the cat's entrance into the

[issue24255] Replace debuglevel-related logic with logging

2015-05-21 Thread R. David Murray
R. David Murray added the comment: +1 -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24255 ___ ___ Python-bugs-list

Re: How to do integers to binary lists and back

2015-05-21 Thread Ian Kelly
On Thu, May 21, 2015 at 4:31 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: {foo:d}.format(foo=foo) '4567' {foo:b}.format(foo=foo) '1000111010111' Which since there's nothing else in the format string can be simplified to: format(foo, b) '1000111010111' --

How to do integers to binary lists and back

2015-05-21 Thread John Pote
Hi everyone. I recently had the problem of converting from an integer to its representation as a list of binary bits, each bit being an integer 1 or 0, and vice versa. E.G. 0x53 becomes [ 0, 1, 0, 1, 0, 0, 1, 1 ] This I wanted to do for integers of many tens, if not hundreds, of bits. Python

[issue24261] Add a command line flag to suppress default signal handlers

2015-05-21 Thread Evgeny Kapun
New submission from Evgeny Kapun: Currently, Python always changes handling of certain signals on startup: SIGPIPE is ignored, and SIGINT is handled by a function that raises KeyboardInterrupt exception. As a result, if the user presses Ctrl-C, a backtrace is printed to stderr. Some program

Re: How to do integers to binary lists and back

2015-05-21 Thread Ben Finney
John Pote johnhp...@o2.co.uk writes: I recently had the problem of converting from an integer to its representation as a list of binary bits, each bit being an integer 1 or 0, and vice versa. Is this a homework assignment? E.G. 0x53 becomes [ 0, 1, 0, 1, 0, 0, 1, 1 ] foo = 4567 foo

Re: How to do integers to binary lists and back

2015-05-21 Thread MRAB
On 2015-05-21 23:20, John Pote wrote: Hi everyone. I recently had the problem of converting from an integer to its representation as a list of binary bits, each bit being an integer 1 or 0, and vice versa. E.G. 0x53 becomes [ 0, 1, 0, 1, 0, 0, 1, 1 ] This I wanted to do for integers of many

[issue24261] Add a command line flag to suppress default signal handlers

2015-05-21 Thread R. David Murray
R. David Murray added the comment: See also issue 14228. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24261 ___ ___

[issue14228] Don't display traceback when import site is interrupted by CTRL+c

2015-05-21 Thread Evgeny Kapun
Changes by Evgeny Kapun abacabadabac...@gmail.com: -- nosy: +abacabadabacaba ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14228 ___ ___

[issue24257] Incorrect use of PyObject_IsInstance

2015-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, go ahead and apply your patch. The existing code is clearly wrong. -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24257

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-21 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24259 ___ ___ Python-bugs-list

[issue12319] [http.client] HTTPConnection.request not support chunked Transfer-Encoding to send data

2015-05-21 Thread Martin Panter
Martin Panter added the comment: This bug and Demian’s patch were originally about changing the low-level http.client.HTTPConnection class. I suggest opening a separate issue for changing urllib.request.urlopen() or similar, to avoid confusion. It should actually be possible to support

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: I've spent a bit of time exploring the segfault. Here's some data that might help relative to the configparser test. I put the following at the beginning of _odict_resize: Py_ssize_t len = PyObject_Size((PyObject *)od); if (len == 0)

[issue24261] Add a command line flag to suppress default signal handlers

2015-05-21 Thread Martin Panter
Martin Panter added the comment: I have often wished for Python to have two modes: 1. Programming development mode: something like “python -b -Wdefault”, enabling warnings, printing full trackbacks for SIGINT and EPIPE errors, etc. Also possibly catching SystemExit() when raised inside the

different types of inheritence...

2015-05-21 Thread zipher
Still considering distinguishing between different types of inheritance. Apart from object composition or mix-in style, I want to illustrate something regarding the arrow of inheritance. class super_dict(dict): def __init__(self, init={}, default_value=0, collision_function=None):

Re: textwrap.wrap() breaks non-breaking spaces

2015-05-21 Thread Roy Smith
In article mjaqqd$t0m$1...@news.albasani.net, Johannes Bauer dfnsonfsdu...@gmx.de wrote: so that textwrap.wrap() breks non-breaking spaces, is this a bug or intended behavior? I opened http://bugs.python.org/issue16623 on this a couple of years ago. Looks like it was being worked

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: Here are the last 10 frames from the backtrace (gdb): #0 0x005b15d0 in odictiter_iternext (di=optimized out) at Objects/odictobject.c:1888 #1 0x00453179 in PyIter_Next (iter=optimized out) at Objects/abstract.c:2760 #2 0x005881e7 in

Re: Best approach to create humongous amount of files

2015-05-21 Thread Cem Karan
On May 20, 2015, at 7:44 AM, Parul Mogra scoria@gmail.com wrote: Hello everyone, My objective is to create large amount of data files (say a million *.json files), using a pre-existing template file (*.json). Each file would have a unique name, possibly by incorporating time stamp

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: As far as I can tell there aren't any patterns that repeat across multiple seeds (which makes sense). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: The segfault happens at line 1888 of odictobject.c when it tries to Py_INCREF a NULL value. The problem is that the value that gets looked up for a presumably valid key is returned as NULL. So either the value is messed up, lookup is broken, or the wrong key is

[issue24262] logging.FileHandler.close() is not thread-safe

2015-05-21 Thread Gleb Dubovik
New submission from Gleb Dubovik: We're using FileHandler in combination with pytest plugin. Every time new test starts, new FileHandler is created and attached to the root logger, at the end of the test FileHandler is removed. This allows us to create per-test log files. There are some

[issue22107] tempfile module misinterprets access denied error on Windows

2015-05-21 Thread eryksun
eryksun added the comment: Shouldn't it be checking whether `file` (or `filename`) is a directory [1]? For example: except PermissionError: # This exception is thrown when a directory with # the chosen name already exists on windows. if _os.name == 'nt' and

Released: pip 7.0 and virtualenv 13.0

2015-05-21 Thread Donald Stufft
Hey, I'm happy to say that I've just cut the releases of pip 7.0 and virtualenv 13.0 and I have uploaded them to PyPI. For the full list of changes go visit the respective changelogs, however the biggest change here is that in pip 7.0 when pip finds and downloads a sdist, instead of installing

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Matthew Barnett
Matthew Barnett added the comment: FTR, in _odict_resize there's this: size_t i = _odict_get_index(od, _odictnode_KEY(node)); if (i 0) { Note that i is declared as unsigned and then tested whether it's negative. -- nosy: +mrabarnett ___

[issue16991] Add OrderedDict written in C

2015-05-21 Thread Eric Snow
Eric Snow added the comment: Yeah, Ned pointed that one out. I fixed it but haven't pushed the change. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___

PYTHONPATH when calling from ipython

2015-05-21 Thread Cecil Westerhof
I am looking into using ipython instead of bash. But when I call a python program from ipython PYTHONPATH is not set. So pythonscripts that need a module through PYTHONPATH will not work. I could do something like: !PYTHONPATH=~/Python/PythonLibrary python2 … But I find that a little bit

[issue22107] tempfile module misinterprets access denied error on Windows

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a risk of race condition. One process can create a directory `file`, then other process fails to create a file with the same name `file`, then the first process removes directory `file`, then the second process handles PermissionError. The same is

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm making a review. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21916 ___ ___

[issue24056] Expose closure generator status in function repr()

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, Berker, please find an updated patch attached (with support for coroutines). Big +1 on the idea, BTW. -- Added file: http://bugs.python.org/file39460/issue24056_2.diff ___ Python tracker

[issue24004] avoid explicit generator type check in asyncio

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: This issue was resolved in https://github.com/python/asyncio/commit/3a09a93277afc2cdb43badf92a2c85c2789813f6. -- resolution: - fixed stage: - resolved status: open - closed versions: -Python 3.4 ___ Python

[issue23898] inspect() changes in Python3.4 are not compatible with objects that implement special __bool__, __eq__

2015-05-21 Thread Yury Selivanov
Yury Selivanov added the comment: Merged. Thanks for the bug report and patch, Mike! -- assignee: - yselivanov resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue22939] integer overflow in iterator object

2015-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset d6179accca20 by Serhiy Storchaka in branch '2.7': Fixed issue number for issue #22939. https://hg.python.org/cpython/rev/d6179accca20 New changeset 7fa2f4afcf5a by Serhiy Storchaka in branch '3.4': Fixed issue number for issue #22939.

[issue23985] Crash when deleting slices from duplicated bytearray

2015-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, it was related to issue22939. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23985 ___ ___

[issue21916] Create unit tests for turtle textonly

2015-05-21 Thread R. David Murray
R. David Murray added the comment: Yes, I don't need to be involved further (unless you need help from me on something :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21916 ___

  1   2   >