[issue23497] textwrap.dedent doesn't work properly with embedded strings containing linefeeds

2015-02-21 Thread Ned Deily
Ned Deily added the comment: If you do not want the `\n` to be interpreted as a linefeed, you need to use a raw string literal, like: a = r''' ... 'my_key' : r'my value which contains \n character' ... ''' print(dedent(a)) 'my_key' : r'my value which contains \n character' --

Re: Design thought for callbacks

2015-02-21 Thread Chris Angelico
On Sun, Feb 22, 2015 at 1:04 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Marko Rauhamaa wrote: Grant Edwards invalid@invalid.invalid: the polite thing to do is to delete references to it when you're done with it. I disagree with that recommendation. You should do the

Re: How to design a search engine in Python?

2015-02-21 Thread subhabangalore
On Sunday, February 22, 2015 at 11:08:47 AM UTC+5:30, Denis McMahon wrote: On Sat, 21 Feb 2015 21:02:34 -0800, subhabangalore wrote: Thank you for your suggestion. But I was looking for a small tutorial of algorithm of the whole engine. I would try to check it build individual modules and

Re: Algorithm for Creating Supersets of Smaller Sets Based on Common Elements

2015-02-21 Thread TommyVee
TommyVee wrote in message news:Bg5Gw.1344030$no4.494...@fx19.iad... Start off with sets of elements as follows: 1. A,B,E,F 2. G,H,L,P,Q 3. C,D,E,F 4. E,X,Z 5. L,M,R 6. O,M,Y Note that sets 1, 3 and 4 all have the element 'E' in common, therefore they are related and form the following

[issue23497] textwrap.dedent doesn't work properly with embedded strings containing linefeeds

2015-02-21 Thread Myles Dear
New submission from Myles Dear: The textwrap.dedent function does not work when the string to dedent itself contains embedded strings that contain newline characters. https://docs.python.org/3.4/library/textwrap.html?highlight=dedent#textwrap.dedent states that this function can be used to

[issue23498] Expose http.cookiejar.split_header_words()

2015-02-21 Thread Martin Panter
New submission from Martin Panter: I propose to document the split_header_words() so that it can be used to parse various kinds of HTTP-based header fields. Perhaps it should live in a more general module like “http”, or “email.policy.HTTP” (hinted in Issue 3609). Perhaps there is also room

[issue3609] does parse_header really belong in CGI module?

2015-02-21 Thread Martin Panter
Martin Panter added the comment: I opened Issue 23498 about exposing split_header_words() or similar. So this issue can focus on moving parse_header() to an email.policy.HTTP method or whatever. RTSP 1.0 and its Transport header is defined in RFC 2326:

Re: How to design a search engine in Python?

2015-02-21 Thread Steven D'Aprano
subhabangal...@gmail.com wrote: Dear Group, I am trying to build a search engine in Python. How to design a search engine in Python? First, design a search engine. Then, write Python code to implement that search engine. To do this, I have read tutorials and working methodologies from

Re: Design thought for callbacks

2015-02-21 Thread Marko Rauhamaa
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: Marko Rauhamaa wrote: Grant Edwards invalid@invalid.invalid: the polite thing to do is to delete references to it when you're done with it. I disagree with that recommendation. You should do the natural thing and not care who holds

Re: Design thought for callbacks

2015-02-21 Thread Marko Rauhamaa
Grant Edwards invalid@invalid.invalid: the polite thing to do is to delete references to it when you're done with it. I disagree with that recommendation. You should do the natural thing and not care who holds references to who. Marko -- https://mail.python.org/mailman/listinfo/python-list

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-21 Thread Russell Keith-Magee
Changes by Russell Keith-Magee freakboy3...@gmail.com: -- nosy: +freakboy3742 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496 ___ ___

[issue23152] fstat64 required on Windows

2015-02-21 Thread STINNER Victor
STINNER Victor added the comment: You didn't reply to my question on getfilesize(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23152 ___ ___

Re: Design thought for callbacks

2015-02-21 Thread Ian Kelly
On Sat, Feb 21, 2015 at 1:57 PM, Grant Edwards invalid@invalid.invalid wrote: On 2015-02-21, Cem Karan cfkar...@gmail.com wrote: On Feb 21, 2015, at 12:42 AM, Chris Angelico ros...@gmail.com wrote: On Sat, Feb 21, 2015 at 1:44 PM, Cem Karan cfkar...@gmail.com wrote: In order to inform users

[issue23199] libpython27.a in amd64 release is 32-bit

2015-02-21 Thread Daniel Franke
Daniel Franke added the comment: I've downloaded and installed python-2.7.9.amd.msi and spent some hours trying to understand the myriad of i386/x86-64 related linker errors I get when attempting to build an extension module. Now that I found this report I can at least stop doubting my

[issue23496] Steps for Android Native Build of Python 3.4.2

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

Re: Design thought for callbacks

2015-02-21 Thread Chris Angelico
On Sun, Feb 22, 2015 at 3:38 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: But you are using it. You might not be using it by name, but you are using it via the callback function. What did you expect, that Python should read your mind and somehow intuit that you still care

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-21 Thread Paul Moore
Paul Moore added the comment: As an alternative, virtualenv could be changed to create a pyvenv.cfg file with the interpreter version like pyvenv does. Seems pretty simple and unproblematic to me and it might actually be useful to know the interpreter version without running it in other

[issue13637] binascii.a2b_* functions could accept unicode strings

2015-02-21 Thread R. David Murray
R. David Murray added the comment: Ah, yes, I see. Sorry for the confusion, I misread that part of the discussion and did not look at that part of the docs. (I find that note confusing...it seems to imply that a2b only accepts ascii. But that's a different issue and I don't feel strongly

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-21 Thread Wolfgang Maier
Wolfgang Maier added the comment: So, with the current patch users could still not use the py launcher from a virtual environment with scripts that are supposed to work under UNIX :( Correct. That's not the problem this PEP is intended to solve. Granted :) Another PEP could be written

Re: pypandoc and restructured text

2015-02-21 Thread alb
Hi Chris, Chris Angelico ros...@gmail.com wrote: [] Thanks a lot for the hint. Maybe I should seriously think about upgrading the whole distro. It's just that Gnome3 really sucks to my taste and I'm not in the mood to look for another Desktop Environment...(maybe I should go back to CDE).

Re: Algorithm for Creating Supersets of Smaller Sets Based on Common Elements

2015-02-21 Thread Mark Lawrence
On 21/02/2015 19:46, TommyVee wrote: Start off with sets of elements as follows: 1. A,B,E,F 2. G,H,L,P,Q 3. C,D,E,F 4. E,X,Z 5. L,M,R 6. O,M,Y Note that sets 1, 3 and 4 all have the element 'E' in common, therefore they are related and form the following superset: A,B,C,D,E,F,X,Z Likewise,

Re: Algorithm for Creating Supersets of Smaller Sets Based on Common Elements

2015-02-21 Thread Steven D'Aprano
TommyVee wrote: Start off with sets of elements as follows: 1. A,B,E,F 2. G,H,L,P,Q 3. C,D,E,F 4. E,X,Z 5. L,M,R 6. O,M,Y Note that sets 1, 3 and 4 all have the element 'E' in common, therefore they are related and form the following superset: A,B,C,D,E,F,X,Z Sounds to me like

Re: Design thought for callbacks

2015-02-21 Thread Steven D'Aprano
Chris Angelico wrote: On Sun, Feb 22, 2015 at 1:04 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Marko Rauhamaa wrote: Grant Edwards invalid@invalid.invalid: the polite thing to do is to delete references to it when you're done with it. I disagree with that

Re: How to design a search engine in Python?

2015-02-21 Thread subhabangalore
On Sunday, February 22, 2015 at 10:12:39 AM UTC+5:30, Steven D'Aprano wrote: wrote: Dear Group, I am trying to build a search engine in Python. How to design a search engine in Python? First, design a search engine. Then, write Python code to implement that search engine.

Re: How to design a search engine in Python?

2015-02-21 Thread Denis McMahon
On Sat, 21 Feb 2015 21:02:34 -0800, subhabangalore wrote: Thank you for your suggestion. But I was looking for a small tutorial of algorithm of the whole engine. I would try to check it build individual modules and integrate them. I was getting some in google and youtube, but I tried to

[issue23152] fstat64 required on Windows

2015-02-21 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23152 ___

[issue23199] libpython27.a in amd64 release is 32-bit

2015-02-21 Thread Steve Dower
Steve Dower added the comment: I posted these commands above (modulo version number). If you have MinGW and binutils then it should Just Work, but I'm not very experienced with the range of installations you could have, so you may need to track down the gendef and dlltool tools: gendef -

[issue23152] fstat64 required on Windows

2015-02-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset a824c40e8fc0 by Steve Dower in branch 'default': Issue #23152: Renames time_t_to_FILE_TIME to _Py_time_t_to_FILE_TIME, removes unused struct win32_stat and return value https://hg.python.org/cpython/rev/a824c40e8fc0 --

Re: Design thought for callbacks

2015-02-21 Thread Steven D'Aprano
Marko Rauhamaa wrote: Grant Edwards invalid@invalid.invalid: the polite thing to do is to delete references to it when you're done with it. I disagree with that recommendation. You should do the natural thing and not care who holds references to who. I don't understand this. What is the

Re: Design thought for callbacks

2015-02-21 Thread Frank Millman
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote in message news:54e8af1b$0$12976$c3e8da3$54964...@news.astraweb.com... Frank Millman wrote: I tried something similar a while ago, and I did find a gotcha. The problem lies in this phrase - if they are no longer alive, they are

Re: 'Lite' Databases (Re: sqlite3 and dates)

2015-02-21 Thread Ned Deily
In article 871tljepea@jester.gateway.pace.com, Paul Rubin no.email@nospam.invalid wrote: Ned Deily n...@acm.org writes: (though I don't know why anyone would want to fork it). Same reason lots of people have forked Postgres. Or you might just want to customize it. Well, for

Re: 'Lite' Databases (Re: sqlite3 and dates)

2015-02-21 Thread Paul Rubin
Ned Deily n...@acm.org writes: Same reason lots of people have forked Postgres. Or you might just want to customize it. Well, for whatever reason one might have, one can: it's public domain software. Yes, but unlike with most FOSS software, your version has much lower quality assurance than

[issue15955] gzip, bz2, lzma: add option to limit output size

2015-02-21 Thread Martin Panter
Martin Panter added the comment: The new bzip parameter still needs documenting in the library reference. However I reviewed the doc string, C code, and tests, and I can’t find anything wrong. -- ___ Python tracker rep...@bugs.python.org

Re: 'Lite' Databases (Re: sqlite3 and dates)

2015-02-21 Thread Sibylle Koczian
Am 20.02.2015 um 15:16 schrieb Dennis Lee Bieber: The middle-ground is probably something like the embedded version of Firebird (pity there has been no updated book -- The Firebird Book came out in 2004, v1.5 while 2.5 is current [Whoops, looks like there /is/ an update, print-on-demand

[issue23436] xml.dom.minidom.Element.ownerDocument is hiden

2015-02-21 Thread R. David Murray
R. David Murray added the comment: It looks like the __slots__ declaration on Node was missed when the other slots changes were made (by MvL in 3931f043b79a). Note that the Node base class (xml.dom.Node) has a __slots__ declaration, but it was added after MvL's patch (by Florent in

Re: try pattern for database connection with the close method

2015-02-21 Thread Peter Otten
Mario Figueiredo wrote: Hello all, I'm using the following pattern for db access that requires me to close the connection as soon as it is not needed: import sqlite3 as lite try: db = lite.connect('data.db') except lite.DatabaseError:

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 9:36 AM, Chris Angelico ros...@gmail.com wrote: On Sun, Feb 22, 2015 at 1:07 AM, Cem Karan cfkar...@gmail.com wrote: I agree about closures; its the only way they could work. When I was originally thinking about the library, I was trying to include all types of

Re: Design thought for callbacks

2015-02-21 Thread Chris Angelico
On Sun, Feb 22, 2015 at 2:45 AM, Cem Karan cfkar...@gmail.com wrote: OK, so if I'm reading your code correctly, you're breaking the cycle in your object graph by making the GUI the owner of the callback, correct? No other chunk of code has a reference to the callback, correct? Correct. The

[issue23148] Missing the charset parameter in as_encoded_word()

2015-02-21 Thread R. David Murray
R. David Murray added the comment: Same comment as the fold bug...I need to find time to work out a test case (or for someone else to do so). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23148

[issue21793] httplib client/server status refactor

2015-02-21 Thread Demian Brecht
Demian Brecht added the comment: Well, I’m not entirely sure how I came to the conclusion that errors were a problem (other than not spending enough time walking through it) and of course you’re right about the coercion handling it just fine. I’ve removed the explicit conversion in the code

Re: Design thought for callbacks

2015-02-21 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: On Sat, Feb 21, 2015 at 1:44 PM, Cem Karan cfkar...@gmail.com wrote: In order to inform users that certain bits of state have changed, I require them to register a callback with my code. The problem is that when I store these callbacks, it naturally creates a

[issue22113] memoryview and struct.pack_into

2015-02-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: I suppose this is okay. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22113 ___ ___ Python-bugs-list

Re: try pattern for database connection with the close method

2015-02-21 Thread Ian Kelly
On Sat, Feb 21, 2015 at 5:22 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 21/02/2015 02:42, Mario Figueiredo wrote: Hello all, I'm using the following pattern for db access that requires me to close the connection as soon as it is not needed: import sqlite3 as lite

Re: try pattern for database connection with the close method

2015-02-21 Thread Peter Otten
Ian Kelly wrote: On Sat, Feb 21, 2015 at 5:22 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 21/02/2015 02:42, Mario Figueiredo wrote: Hello all, I'm using the following pattern for db access that requires me to close the connection as soon as it is not needed: import

[issue23322] parser module docs missing second example

2015-02-21 Thread Sahil Chelaramani
Sahil Chelaramani added the comment: A patch for this bug. Please let me know if I have to change something. First patch, please be kind :) -- keywords: +patch nosy: +SahilC Added file: http://bugs.python.org/file38196/mywork.patch ___ Python

[issue23492] Argument Clinic: improve generated parser for 1-argument functions

2015-02-21 Thread Stefan Behnel
Stefan Behnel added the comment: Serhiy, I suggest you look at the code that Cython generates for its functions. It has been extensively profiled and optimised (years ago), so generating the same code for the argument clinic should yield the same performance. And while I don't have exact

Re: try pattern for database connection with the close method

2015-02-21 Thread Ian Kelly
On Sat, Feb 21, 2015 at 8:27 AM, Peter Otten __pete...@web.de wrote: Ian Kelly wrote: On Sat, Feb 21, 2015 at 5:22 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: try: with lite.connect('data.db') as db: try: db.execute(sql, parms) except lite.IntegrityError:

[issue23492] Argument Clinic: improve generated parser for 1-argument functions

2015-02-21 Thread Larry Hastings
Larry Hastings added the comment: Stefan: Serhiy's patch only affects functions taking a single positional-only parameter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23492 ___

[issue23224] LZMADecompressor object is only initialized in __init__

2015-02-21 Thread Martin Panter
Martin Panter added the comment: Similar situation in the bzip module: BZ2Decompressor.__new__(BZ2Decompressor).decompress(bytes()) Segmentation fault (core dumped) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23224

[issue23495] The writer.writerows method should be documented as accepting any iterable (not only a list)

2015-02-21 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23495 ___ ___ Python-bugs-list

[issue9179] Lookback with group references incorrect (two issues?)

2015-02-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset b78195af96f5 by Serhiy Storchaka in branch 'default': Issues #814253, #9179: Group references and conditional group references now https://hg.python.org/cpython/rev/b78195af96f5 New changeset 5387095b8675 by Serhiy Storchaka in branch '2.7': Issues

[issue814253] Grouprefs in lookbehind assertions

2015-02-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset b78195af96f5 by Serhiy Storchaka in branch 'default': Issues #814253, #9179: Group references and conditional group references now https://hg.python.org/cpython/rev/b78195af96f5 New changeset 5387095b8675 by Serhiy Storchaka in branch '2.7': Issues

[issue9179] Lookback with group references incorrect (two issues?)

2015-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Only warnings are raised in 2.7 and 3.4, so it will not break third party code that works by accident. In 3.5 only references to groups defined outside of lookbehind assertion work, so the behavior is compatible with regex. --

[issue9179] Lookback with group references incorrect (two issues?)

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

Re: Python path on windows

2015-02-21 Thread Gisle Vanem
Dave Angel wrote: Finally, when py.exe starts, it reads that first (shebang) line, and decides which python interpreter to actually use. py.exe? Do you mean python.exe? Is there a way to make python.exe ignore all Shebang lines in all scripts? I had many generated .py-files with:

[issue14285] Traceback wrong on ImportError while executing a package

2015-02-21 Thread Martin Panter
Martin Panter added the comment: The relevant code is in the _get_module_details() function at Lib/runpy.py:101. There are a few of things going on: 1. The code is calling importlib.util.find_spec(package.__main__), and handles various kinds of exceptions by wrapping them in an ImportError,

[issue23252] Add support of writing to unseekable file in zipfile

2015-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please make a review of the documentation part of the patch David? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23252

Re: Design thought for callbacks

2015-02-21 Thread Steven D'Aprano
Frank Millman wrote: I tried something similar a while ago, and I did find a gotcha. The problem lies in this phrase - if they are no longer alive, they are automatically removed from the WeakSet, preventing me from accidentally calling them when they are dead. I found that the reference

[issue13637] binascii.a2b_* functions could accept unicode strings

2015-02-21 Thread R. David Murray
R. David Murray added the comment: I think this doc change was incorrect. The current document is supposed to provide the correct historical information. So changed in 3.3: accept ASCII input (and just ignore the fact that 3.1 also accepted ascii, since we pretty much prefer to ignore the

[issue23152] fstat64 required on Windows

2015-02-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f6f4aa0d80f by Steve Dower in branch 'default': Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on Windows. https://hg.python.org/cpython/rev/4f6f4aa0d80f -- nosy: +python-dev ___

Re: Accessible tools

2015-02-21 Thread Bryan Duarte
Eric, Although I would most likely enjoy the former option I feel the latter would be most appropriate for contacting you. Thanks for getting back to me and explaining some of this. I will contact you off list for sure so as not to fill up the lists mailboxes with this topic. I will say that

[issue16840] Tkinter doesn't support large integers

2015-02-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28551/tkinter_bignum.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16840 ___

[issue16840] Tkinter doesn't support large integers

2015-02-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file31420/tkinter_bignum_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16840 ___

[issue16840] Tkinter doesn't support large integers

2015-02-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file35280/tkinter_bignum_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16840 ___

[issue16840] Tkinter doesn't support large integers

2015-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch now supports wideInt if PY_LONG_LONG is not defined or is not equal to Tcl_WideInt. getint() also now supports big integers (currently it returns ambiguous result for values outside the range of C signed int). As far as this issue causes

[issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8

2015-02-21 Thread Steve Dower
Steve Dower added the comment: Attached a patch to 3.5 that resolves this, and I'll backport to 3.4. I haven't got access to Windows 7 or 8 right now to test it, but it's fine on Vista without the patch and 8.1 with the patch. It'd be great if people could help check exactly which version of

[issue22834] Unexpected FileNotFoundError when current directory is removed

2015-02-21 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22834 ___ ___ Python-bugs-list

[issue23152] fstat64 required on Windows

2015-02-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 307713759a62 by Steve Dower in branch 'default': Issue #23152: Renames attribute_data_to_stat to _Py_attribute_data_to_stat https://hg.python.org/cpython/rev/307713759a62 -- ___ Python tracker

[issue23492] Argument Clinic: improve generated parser for 1-argument functions

2015-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Serhiy, I suggest you look at the code that Cython generates for its functions. It has been extensively profiled and optimised (years ago), so generating the same code for the argument clinic should yield the same performance. Thanks, I'll look on it.

Re: try pattern for database connection with the close method

2015-02-21 Thread Peter Otten
Ian Kelly wrote: On Sat, Feb 21, 2015 at 8:27 AM, Peter Otten __pete...@web.de wrote: Ian Kelly wrote: On Sat, Feb 21, 2015 at 5:22 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: try: with lite.connect('data.db') as db: try: db.execute(sql, parms) except

Re: Design thought for callbacks

2015-02-21 Thread Steven D'Aprano
Cem Karan wrote: On Feb 21, 2015, at 8:15 AM, Chris Angelico ros...@gmail.com wrote: On Sun, Feb 22, 2015 at 12:13 AM, Cem Karan cfkar...@gmail.com wrote: OK, so it would violate the principle of least surprise for you. Interesting. Is this a general pattern in python? That is,

[issue22113] memoryview and struct.pack_into

2015-02-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4d8e37e54a7d by Serhiy Storchaka in branch '2.7': Issue #22113: struct.pack_into() now supports new buffer protocol (in https://hg.python.org/cpython/rev/4d8e37e54a7d -- nosy: +python-dev ___ Python

[issue23314] Disabling CRT asserts in debug build

2015-02-21 Thread Steve Dower
Steve Dower added the comment: Having run some more tests, it may be that the only regular problem is in the test for inherited file descriptors. I've attached a patch for tf_inherit_check.py that will prevent assert dialogs. It's not pretty, but it avoids touching the interpreter internals.

[issue2889] curses for windows (alternative patch)

2015-02-21 Thread Taylor Marks
Taylor Marks added the comment: Python is supposed to be cross platform. This has been a major incompatibility issue between Windows and *nix and you think this patch, which has been ready for nearly 7 years now, should simply get discarded because the fix is available from pip? I think

Re: Accessible tools

2015-02-21 Thread Tim Chase
On 2015-02-21 10:21, Bryan Duarte wrote: those of us who rely on screen readers to interact with our computers have a few things we do, and tend to not do. [snip] While my experience has shown most of your items to be true, I'd contend that • Do not, have access to debugging tools. is

Re: Design thought for callbacks

2015-02-21 Thread Marko Rauhamaa
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: Other than that, I cannot see how calling a function which has *not* yet been garbage collected can fail, just because the only reference still existing is a weak reference. Maybe the logic of the receiving object isn't prepared for the

Re: Best practice: Sharing object between different objects

2015-02-21 Thread Paul Rubin
pfranke...@gmail.com writes: ADC, DAC components. As I said, I would like to derive the corresponding classes from one common class, let's say I2CDevice, so that they can share the same bus connection (I don't want to do a import smbus, ..., self.bus = smbus.SMBus(1) all the time). I don't

Re: Accessible tools

2015-02-21 Thread Bryan Duarte
Tim, I am also on the blind linux list. I do not often post there as I predominately use a Mac and the Unix terminal but I am using Linux Kali on the side for some side tinkering and learning. I would use Linux a lot more if the screen reader was not so robotic... Would you be willing to be

[issue23152] fstat64 required on Windows

2015-02-21 Thread STINNER Victor
STINNER Victor added the comment: The name of attribute_data_to_stat() and other shared functions must be prefixed by _Py. +/* Return size of file in bytes; 0 if unknown or INT_MAX if too big */ static off_t getfilesize(FILE *fp) Hum since we have a type able yo store the file size and the

[issue23152] fstat64 required on Windows

2015-02-21 Thread Steve Dower
Steve Dower added the comment: The caller to getfilesize is only using it to check whether it's small enough to load the file into memory all at once, so too big is an okay response (that function is in marshal.c and not used anywhere else). The error label just returns back to the

[issue22113] memoryview and struct.pack_into

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

[issue23492] Argument Clinic: improve generated parser for 1-argument functions

2015-02-21 Thread Larry Hastings
Larry Hastings added the comment: lgtm -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23492 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16840] Tkinter doesn't support large integers

2015-02-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: I'm all for fixing random test failures. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16840 ___ ___

Best practice: Sharing object between different objects

2015-02-21 Thread pfranken85
Hello! I have a best-practice question: Imagine I have several hardware devices that I work with on the same I2C bus and I am using the python smbus module for that purpose. The individual devices are sensors, ADC, DAC components. As I said, I would like to derive the corresponding classes

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 12:42 AM, Chris Angelico ros...@gmail.com wrote: On Sat, Feb 21, 2015 at 1:44 PM, Cem Karan cfkar...@gmail.com wrote: In order to inform users that certain bits of state have changed, I require them to register a callback with my code. The problem is that when I store

Re: pypandoc and restructured text

2015-02-21 Thread Fabien
On 21.02.2015 14:39, alb wrote: Do you know of anyway to install wheezy packages on squeeze? No need for a new distro. Use virtualenv, this is simple and great: http://simononsoftware.com/virtualenv-tutorial-part-2/ Cheers, Fabien -- https://mail.python.org/mailman/listinfo/python-list

[issue23495] The writer.writerows method should be documented as accepting any iterable (not only a list)

2015-02-21 Thread R. David Murray
R. David Murray added the comment: Seems reasonable to me. Do you want to prepare patches? The doc patch should be separate, since it applies to all active versions, but the code change to dictwriter would go only into 3.5. -- stage: - needs patch versions: -Python 3.2, Python

Re: try pattern for database connection with the close method

2015-02-21 Thread Mark Lawrence
On 21/02/2015 02:42, Mario Figueiredo wrote: Hello all, I'm using the following pattern for db access that requires me to close the connection as soon as it is not needed: import sqlite3 as lite try: db = lite.connect('data.db') except

Re: Python path on windows

2015-02-21 Thread Mark Lawrence
On 21/02/2015 11:05, Gisle Vanem wrote: Dave Angel wrote: Finally, when py.exe starts, it reads that first (shebang) line, and decides which python interpreter to actually use. py.exe? Do you mean python.exe? py.exe or pyw.exe come with the Python launcher on Windows and work out which

Re: Design thought for callbacks

2015-02-21 Thread Mark Lawrence
On 21/02/2015 05:41, Frank Millman wrote: Cem Karan cfkar...@gmail.com wrote in message news:33677ae8-b2fa-49f9-9304-c8d937842...@gmail.com... Hi all, I'm working on a project that will involve the use of callbacks, and I want to bounce an idea I had off of everyone to make sure I'm not

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 8:15 AM, Chris Angelico ros...@gmail.com wrote: On Sun, Feb 22, 2015 at 12:13 AM, Cem Karan cfkar...@gmail.com wrote: OK, so it would violate the principle of least surprise for you. Interesting. Is this a general pattern in python? That is, callbacks are owned by

Re: Python path on windows

2015-02-21 Thread Dave Angel
On 02/21/2015 06:05 AM, Gisle Vanem wrote: Dave Angel wrote: Finally, when py.exe starts, it reads that first (shebang) line, and decides which python interpreter to actually use. py.exe? Do you mean python.exe? Reread my post, or read Mark's reply to yours. The job of py.exe or pyw.exe

Re: Design thought for callbacks

2015-02-21 Thread Devin Jeanpierre
On Fri, Feb 20, 2015 at 9:42 PM, Chris Angelico ros...@gmail.com wrote: No, it's not. I would advise using strong references - if the callback is a closure, for instance, you need to hang onto it, because there are unlikely to be any other references to it. If I register a callback with you, I

[issue23147] Possible error in _header_value_parser.py

2015-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If I had a test case, I would write the patch. But I'm not experienced in the email package. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23147 ___

[issue23147] Possible error in _header_value_parser.py

2015-02-21 Thread R. David Murray
R. David Murray added the comment: Yes, I assumed that you didn't have a test case. I was explaining why I hadn't done anything with this issue :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23147

Re: Design thought for callbacks

2015-02-21 Thread Chris Angelico
On Sun, Feb 22, 2015 at 12:13 AM, Cem Karan cfkar...@gmail.com wrote: OK, so it would violate the principle of least surprise for you. Interesting. Is this a general pattern in python? That is, callbacks are owned by what they are registered with? In the end, I want to make a library

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 12:41 AM, Frank Millman fr...@chagford.com wrote: Cem Karan cfkar...@gmail.com wrote in message news:33677ae8-b2fa-49f9-9304-c8d937842...@gmail.com... Hi all, I'm working on a project that will involve the use of callbacks, and I want to bounce an idea I had off of

Re: pypandoc and restructured text

2015-02-21 Thread alb
Hi Wolfgang, Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de wrote: [] I have pandoc 1.12.2.1 and it recognizes the figure directive just fine (tested with html output so I cannot say anything about LaTeX). This reminds me that I need to move sooner or later from squeeze to wheezy...

Re: pypandoc and restructured text

2015-02-21 Thread Chris Angelico
On Sun, Feb 22, 2015 at 12:39 AM, alb al.bas...@gmail.com wrote: Hi Wolfgang, Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de wrote: [] I have pandoc 1.12.2.1 and it recognizes the figure directive just fine (tested with html output so I cannot say anything about LaTeX). This

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 8:37 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 21/02/2015 05:41, Frank Millman wrote: Cem Karan cfkar...@gmail.com wrote in message news:33677ae8-b2fa-49f9-9304-c8d937842...@gmail.com... Hi all, I'm working on a project that will involve the use of callbacks,

  1   2   >