[issue13099] Sqlite3 & turkish locale

2011-10-04 Thread Thomas Kluyver
New submission from Thomas Kluyver : When using sqlite3 with the Turkish locale, cursor.lastrowid is not accessible after an insert statement if "INSERT" is upper case. I believe that the cause is that the detect_statement_kind function [1] calls the locale-dependent C function tolo

[issue13099] Sqlite3 & turkish locale

2011-10-04 Thread Thomas Kluyver
Thomas Kluyver added the comment: What form does the test need to be in? There's a script at the redhat bug I linked that demonstrates the issue. Do I need to turn it into a function? A patch for the existing test suite? -- type: beh

[issue13099] Sqlite3 & turkish locale

2011-10-04 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks, Antoine. Should I still try to write a regression test for it? -- ___ Python tracker <http://bugs.python.org/issue13

[issue13692] 2to3 mangles from . import frobnitz

2012-01-01 Thread Thomas Kluyver
Thomas Kluyver added the comment: A couple of things to note: - This was with the Python 3.1 implementation of 2to3 - the problem doesn't appear with the Python 3.2 version. - The import statement in question was inside a method definition. I wonder if the extra two dots correspond t

[issue9969] tokenize: add support for tokenizing 'str' objects

2011-05-31 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker <http://bugs.python.org/issue9969> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11679] readline interferes with characters beginning with byte \xe9

2011-03-25 Thread Thomas Kluyver
New submission from Thomas Kluyver : To replicate, in Python 3.1 on Linux (utf-8 console): >>> print(chr(0x9000)) 退 Copy and paste this character into the prompt. It appears correctly (as a Chinese character). Then: >>> import readline >>> readline.parse_and_bind(&

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2021-03-23 Thread Thomas Kluyver
Change by Thomas Kluyver : -- nosy: +takluyver nosy_count: 4.0 -> 5.0 pull_requests: +23755 pull_request: https://github.com/python/cpython/pull/24997 ___ Python tracker <https://bugs.python.org/issu

[issue43806] asyncio.StreamReader hangs when reading from pipe and other process exits unexpectedly

2021-11-24 Thread Thomas Kluyver
Thomas Kluyver added the comment: In the example script, I believe you need to close the write end of the pipe in the parent after forking: cpid = os.fork() if cpid == 0: # Write to pipe (child) else: # Parent os.close(ctx) # Read from pipe This is the same with synchronous

[issue43805] multiprocessing.Queue hangs when process on other side dies

2021-11-24 Thread Thomas Kluyver
Thomas Kluyver added the comment: I think this is expected. The queue itself doesn't know that one particular process is meant to put data into it. It just knows that there's no data to get, so .get() blocks as the docs say it should. This doesn't apply to issue22393, because

[issue43805] multiprocessing.Queue hangs when process on other side dies

2021-12-06 Thread Thomas Kluyver
Thomas Kluyver added the comment: It's not my decision, so I can't really say. But the Queue API is pretty stable, and exists 3 times over in Python (the queue module for use with threads, in multiprocessing and in asyncio). So I'd guess that anyone wanting to add to that AP

[issue24916] In sysconfig, don't rely on sys.version format

2020-03-17 Thread Thomas Kluyver
Thomas Kluyver added the comment: Serhiy, I think you fixed the part that was actually likely to cause problems a few years ago in issue #25985 & commit 885bdc4946890f4bb80557fab80c3874b2cc4d39 . Using sys.version[:3] to get a short version like 3.8 was what I wanted to fix. People

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2017-05-22 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- pull_requests: +1806 ___ Python tracker <http://bugs.python.org/issue25532> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2017-05-22 Thread Thomas Kluyver
Thomas Kluyver added the comment: This was just reported in IPython as well (https://github.com/ipython/ipython/issues/10578 ). I've prepared a pull request based on Nick's proposal: https://github.com/python/cpython/pull/1717 -- nosy:

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2017-05-22 Thread Thomas Kluyver
Thomas Kluyver added the comment: I could go either way on that. It's not hard to imagine it as a recursive algorithm, and using the recursion limit provides a simple configuration escape hatch if someone has a desperate need for something wrapped 3000 times for some strange reason. B

[issue30639] inspect.getfile(obj) calls object repr on failure

2017-06-12 Thread Thomas Kluyver
New submission from Thomas Kluyver: This came up in IPython & Jedi: several functions in inspect end up calling getfile(). If the object is something for which it can't find the source file, it throws an error, the message for which contains the object's repr. This is prob

[issue30639] inspect.getfile(obj) calls object repr on failure

2017-06-12 Thread Thomas Kluyver
Thomas Kluyver added the comment: Not exactly a bug, but I think that an improvement is possible. My plan is to delay computing the repr until the error is formatted, so that code which catches the TypeError can carry on safely. I think this is more relevant for inspect than for many other

[issue30639] inspect.getfile(obj) calls object repr on failure

2017-06-12 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- pull_requests: +2186 ___ Python tracker <http://bugs.python.org/issue30639> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30639] inspect.getfile(obj) calls object repr on failure

2017-06-12 Thread Thomas Kluyver
Thomas Kluyver added the comment: Sure, I can do that if you want. The other thing I thought of was using object.__repr__, so the repr always shows like . -- ___ Python tracker <http://bugs.python.org/issue30

[issue30639] inspect.getfile(obj) calls object repr on failure

2017-06-12 Thread Thomas Kluyver
Thomas Kluyver added the comment: OK, I've updated the PR to do that. -- ___ Python tracker <http://bugs.python.org/issue30639> ___ ___ Python-bugs-list m

[issue33944] Deprecate and remove pth files

2019-03-07 Thread Thomas Kluyver
Thomas Kluyver added the comment: As a lurker on this issue: I think a lot of energy is being expended arguing about what is and isn't legitimate use cases, when there's actually more stuff that people agree about than not. I think this issue should be broken down into two, neithe

[issue36691] SystemExit & sys.exit : Allow both exit status and message

2019-04-21 Thread Thomas Kluyver
New submission from Thomas Kluyver : The SystemExit exception, and consequently the sys.exit() function, take a single parameter which is either an integer exit status for the process, or a message to print to stderr before exiting - in which case the exit status is implicitly 1. In

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-22 Thread Thomas Kluyver
Thomas Kluyver added the comment: It's not obvious to me why that change to finding the source file related to the warning should affect the format of the warning message printed. It might be something that could be fixed in the warning module. But I don't understand where it

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-24 Thread Thomas Kluyver
Thomas Kluyver added the comment: I'm still a bit confused why it gets escaped - as far as I know, the escaping only happens when you repr() a string, as the displayhook does automatically: >>> a = """ a ' single and " double quote """ &

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-24 Thread Thomas Kluyver
Thomas Kluyver added the comment: The 'single' option to compile() means it's run like at a REPL, calling displayhook if it's an expression returning a value. But warnings shouldn't go through the displayhook, as far as I know: >>> from contextlib impor

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-24 Thread Thomas Kluyver
Thomas Kluyver added the comment: D'oh, yes. I missed that the failing example was displaying the captured string through displayhook. It makes sense now. Thanks for patiently explaining. :-) -- ___ Python tracker <https://bugs.py

[issue32699] pythonXY._pth : unclear how .pth files are handled

2018-01-28 Thread Thomas Kluyver
New submission from Thomas Kluyver : Nicholas Tollervey has been getting Pynsist to use the new pythonXY._pth file to assemble sys.path. However, I'm not clear on how this behaves with .pth files. The docs on this (https://docs.python.org/3/using/windows.html#finding-modules ) appe

[issue32699] pythonXY._pth : unclear how .pth files are handled

2018-01-28 Thread Thomas Kluyver
Thomas Kluyver added the comment: I'd reword the second sentence like this: > Note that .pth files (without leading underscore) will be processed only if > this file specifies ``import site``. The current wording sounds (to me) like a guarantee that .pth files will still be handl

[issue32699] pythonXY._pth : unclear how .pth files are handled

2018-01-29 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks Steve, that looks good. -- ___ Python tracker <https://bugs.python.org/issue32699> ___ ___ Python-bugs-list mailin

[issue12486] tokenize module should have a unicode API

2018-03-11 Thread Thomas Kluyver
Thomas Kluyver added the comment: > Why not just bless the existing generate_tokens() function as a public API We're actually using generate_tokens() from IPython - we wanted a way to tokenize unicode strings, and although it's undocumented, it's been there for a number of

[issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator

2018-03-12 Thread Thomas Kluyver
Thomas Kluyver added the comment: Do you know what tool created the zip file? I can't find anything in the spec (https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT ) to say whether 0 is a valid value for the number of disks. -- nosy: +takl

[issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator

2018-03-12 Thread Thomas Kluyver
Thomas Kluyver added the comment: I found source code for some other projects handling the same data. They all seem to agree that it should be 1: - Golang's zip reading code: https://github.com/golang/go/blob/f7ac70a56604033e2b1abc921d3f0f6afc85a7b3/src/archive/zip/reader.go#L536-L538

[issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator

2018-03-12 Thread Thomas Kluyver
Thomas Kluyver added the comment: If every Windows 7 computer is generating zipfiles which are invalid in this way, that would be a pretty strong argument for Python (and other tools) to accept it. But if that was the case, I would also expect that there would be many more issues about it

[issue1692664] warnings.py gets filename wrong for eval/exec

2018-04-27 Thread Thomas Kluyver
Thomas Kluyver added the comment: Time for some bug archaeology! The reason given for not using frame.f_code.co_filename for warnings was that it can be wrong when the path of .pyc files changes. However, it looks like that was fixed in #1180193 (thanks for the pointer zseil), so I'd

[issue33375] warnings: get filename from frame.f_code.co_filename

2018-04-27 Thread Thomas Kluyver
New submission from Thomas Kluyver : The warnings module tries to find and show the line of code which is responsible for a warning, for the same reasons that tracebacks show a line of code from each stack frame. However, they work in quite different ways. Native tracebacks, the traceback

[issue1692664] warnings.py gets filename wrong for eval/exec

2018-04-27 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks Guido, the new issue is #33375. -- ___ Python tracker <https://bugs.python.org/issue1692664> ___ ___ Python-bugs-list m

[issue33375] warnings: get filename from frame.f_code.co_filename

2018-04-27 Thread Thomas Kluyver
Change by Thomas Kluyver : -- keywords: +patch pull_requests: +6318 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33375> ___ ___ Py

[issue33375] warnings: get filename from frame.f_code.co_filename

2018-05-03 Thread Thomas Kluyver
Thomas Kluyver added the comment: Hi Brett! If you get a moment, any review of the linked PR would be welcome. :-) https://github.com/python/cpython/pull/6622 -- ___ Python tracker <https://bugs.python.org/issue33

[issue33375] warnings: get filename from frame.f_code.co_filename

2018-05-03 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks! No rush, I just thought I'd take the opportunity when you added yourself to the nosy list. -- ___ Python tracker <https://bugs.python.org/is

[issue32247] shutil-copytree: Create dst folder only if it doesn't exist

2017-12-08 Thread Thomas Kluyver
Thomas Kluyver added the comment: This is documented: > The destination directory, named by dst, must not already exist https://docs.python.org/3/library/shutil.html#shutil.copytree I guess that avoids complications that might arise from merging a directory. -- nosy: +takluy

[issue12486] tokenize module should have a unicode API

2018-05-17 Thread Thomas Kluyver
Change by Thomas Kluyver : -- pull_requests: +6616 ___ Python tracker <https://bugs.python.org/issue12486> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9969] tokenize: add support for tokenizing 'str' objects

2018-05-17 Thread Thomas Kluyver
Thomas Kluyver added the comment: I've opened a PR for issue #12486, which would make the existing but undocumented 'generate_tokens' function public: https://github.com/python/cpython/pull/6957 I agree that it would be good to design a nicer API for this, but the perfect s

[issue28418] Raise Deprecation warning for tokenize.generate_tokens

2018-05-17 Thread Thomas Kluyver
Thomas Kluyver added the comment: I've opened a PR moving in the other direction (making this public rather than deprecating it): https://github.com/python/cpython/pull/6957 -- nosy: +takluyver ___ Python tracker <https://bugs.py

[issue12486] tokenize module should have a unicode API

2018-05-18 Thread Thomas Kluyver
Thomas Kluyver added the comment: I wouldn't say it's a good name, but I think the advantage of documenting an existing name outweighs that. We can start (or continue) using generate_tokens() right away, whereas a new name presumably wouldn't be available until Python 3.8 co

[issue12486] tokenize module should have a unicode API

2018-05-18 Thread Thomas Kluyver
Thomas Kluyver added the comment: I agree, it's not a good design, but it's what's already there; I just want to ensure that it won't be removed without a deprecation cycle. My PR makes no changes to behaviour, only to documentation and tests. This and issue 9969 have

[issue12486] tokenize module should have a unicode API

2018-05-18 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks - I had forgotten it, just fixed it now. -- ___ Python tracker <https://bugs.python.org/issue12486> ___ ___ Python-bug

[issue12486] tokenize module should have a unicode API

2018-05-28 Thread Thomas Kluyver
Thomas Kluyver added the comment: The tests on PR #6957 are passing now, if anyone has time to have a look. :-) -- ___ Python tracker <https://bugs.python.org/issue12

[issue12486] tokenize module should have a unicode API

2018-06-05 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks Carol :-) -- ___ Python tracker <https://bugs.python.org/issue12486> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33912] [EASY] test_warnings: test_exec_filename() fails when run with -Werror

2018-06-20 Thread Thomas Kluyver
Thomas Kluyver added the comment: Yes, this should be easy. I misunderstood how to use the catch_warnings context manager. I thought that catch_warnings itself set up the warnings filters you need. You actually need to do that with a separate call inside the with block, as shown here

[issue33944] Deprecate and remove pth files

2018-06-22 Thread Thomas Kluyver
Thomas Kluyver added the comment: I'm generally in favour of getting rid of .pth files. But I did accept a PR adding support for them in Flit to act as a substitute for symlinks on Windows, to achieve something like a 'development install'. I'm not sure what the alter

[issue33944] Deprecate and remove pth files

2018-06-22 Thread Thomas Kluyver
Thomas Kluyver added the comment: I don't want to use the execution features of .pth files, just their original functionality of adding extra directories to sys.path. I'd be very happy to see the arbitrary code execution 'feature' of .pth files go away. Windows suppor

[issue28418] Raise Deprecation warning for tokenize.generate_tokens

2018-09-23 Thread Thomas Kluyver
Thomas Kluyver added the comment: Yes, I think this can be closed now. -- ___ Python tracker <https://bugs.python.org/issue28418> ___ ___ Python-bugs-list mailin

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-10 Thread Thomas Kluyver
New submission from Thomas Kluyver : With the text 'abc€' copied to the clipboard, on Linux, where UTF-8 is the default encoding: Python 3.2.3 (default, Apr 12 2012, 21:55:50) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "lice

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-11 Thread Thomas Kluyver
Thomas Kluyver added the comment: On this computer, I see this from Tcl: $ wish % clipboard get abc\u20ac But here Python's following suit: >>> root.clipboard_get() 'abc\\u20ac' Which is odd, because as far as I know, my two computers run the same OS (U

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-11 Thread Thomas Kluyver
Thomas Kluyver added the comment: OK, after a quick bit of reading, I see why I'm confused: the clipboard actually works by requesting the text from the source program, so where you copy it from makes a difference. In my case, copying from firefox gives 'abc\\u20ac', and cop

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-11 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks, Ned. Does it seem like a good idea to test the windowing system like that, and default to UTF8_STRING if it's x11? So far, I've not found any case on X where STRING works but UTF8_STRING doesn't. If it seems reasonable, I'm ha

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-12 Thread Thomas Kluyver
Thomas Kluyver added the comment: Here's a patch that makes UTF8_STRING the default type for clipboard_get and selection_get when running in X11. -- keywords: +patch Added file: http://bugs.python.org/file25552/x11-clipboard-utf8.patch ___ P

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-13 Thread Thomas Kluyver
Thomas Kluyver added the comment: Indeed, and there don't seem to be any other tests for the clipboard functionality. -- ___ Python tracker <http://bugs.python.org/is

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-13 Thread Thomas Kluyver
Thomas Kluyver added the comment: But the encoding used seemingly depends on the source application - Geany (GTK 2, I think) seemingly sends UTF8 text anyway, whereas Firefox escapes the unicode character. So I don't think we can correctly decode the STRING value in all cases. T

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-13 Thread Thomas Kluyver
Thomas Kluyver added the comment: OK, I'll produce an updated patch. -- ___ Python tracker <http://bugs.python.org/issue14777> ___ ___ Python-bugs-list m

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-13 Thread Thomas Kluyver
Thomas Kluyver added the comment: As requested, the second version of the patch (x11-clipboard-try-utf8): - Caches the windowing system per object. The tk call to find the windowing system is made the first time clipboard_get or selection_get are called without specifying `type=`. - If using

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-13 Thread Thomas Kluyver
Thomas Kluyver added the comment: I'm happy to put the cache at the module level, but I'll give other people a chance to express their views before I dive into the code again. I imagine most applications would only call clipboard_get() on one item, so it wouldn't matter.

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-13 Thread Thomas Kluyver
Thomas Kluyver added the comment: The 3rd revision of the patch has the cache at the module level. It's a bit awkward, because there's no module level function to call to retrieve it (as far as I know), so it's exposed by objects which can call Tk. Also, serhiy pointed out a

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-15 Thread Thomas Kluyver
Thomas Kluyver added the comment: I've submitted the contributor agreement, though I've not yet heard anything back about it. -- ___ Python tracker <http://bugs.python.o

[issue14777] Tkinter clipboard_get() decodes characters incorrectly

2012-05-15 Thread Thomas Kluyver
Thomas Kluyver added the comment: ...And mere minutes after I said I hadn't heard anything, I've got the confirmation email. :-) -- ___ Python tracker <http://bugs.python.o

[issue14846] Change in error when sys.path contains a nonexistent folder (importlib)

2012-05-17 Thread Thomas Kluyver
New submission from Thomas Kluyver : I've come across a difference from 3.2 to 3.3 while running the IPython test suite. It occurs when a directory on sys.path has been used for an import, then deleted without being removed from sys.path. Previous versions of Python ignore the nonexi

[issue15856] inspect.getsource(SomeClass) doesn't show @decorators

2012-09-03 Thread Thomas Kluyver
New submission from Thomas Kluyver: Since bug #1006219 was fixed, inspect.getsource(func) has returned the source of a function including any decorators on the function. But doing the same with a class, the returned source doesn't include decorators. With functions, the co_firstl

[issue16349] Document whether it's safe to use bytes for struct format string

2012-10-28 Thread Thomas Kluyver
New submission from Thomas Kluyver: At least in CPython, format strings can be given as bytes, as an alternative to str. E.g. >>> struct.unpack(b'>hhl', b'\x00\x01\x00\x02\x00\x00\x00\x03') (1, 2, 3) Looking at the source code [1], this appears to be consciousl

[issue20778] ModuleFinder.load_module skips incorrect number of bytes in pyc files

2014-03-27 Thread Thomas Kluyver
Thomas Kluyver added the comment: For future reference, cx_Freeze ships its own copy of ModuleFinder, so it doesn't depend on the stdlib copy. This issue was fixed there some time around the release of Python 3.3. I realised recently that this is based on code in the stdlib, and I&#x

[issue21338] Silent mode for compileall

2014-04-23 Thread Thomas Kluyver
New submission from Thomas Kluyver: The compileall module's command line interface has a -q (quiet) flag which suppresses most of the output, but it still prints error messages. I'd like an entirely silent mode with no output. My use case is byte-compiling Python files as part of a

[issue21338] Silent mode for compileall

2014-04-23 Thread Thomas Kluyver
Thomas Kluyver added the comment: Patch attached. This works by making the -q flag countable, so you pass -qq to suppress all output. In the Python API, the quiet parameter has become an integer, so passing 2 is equivalent to -qq. This should be fully backwards compatible with passing True

[issue21338] Silent mode for compileall

2014-04-23 Thread Thomas Kluyver
Changes by Thomas Kluyver : Removed file: http://bugs.python.org/file35012/compileall_silent.patch ___ Python tracker <http://bugs.python.org/issue21338> ___ ___ Pytho

[issue21338] Silent mode for compileall

2014-04-23 Thread Thomas Kluyver
Thomas Kluyver added the comment: Sorry, I somehow attached an old version of the patch. This one should be correct. Steven: Redirection relies on a shell - the native 'run a process' interface that the installer uses can't do that. There are ways to work around this, bu

[issue21338] Silent mode for compileall

2014-04-23 Thread Thomas Kluyver
Changes by Thomas Kluyver : Removed file: http://bugs.python.org/file35013/compileall_silent.patch ___ Python tracker <http://bugs.python.org/issue21338> ___ ___ Pytho

[issue21338] Silent mode for compileall

2014-04-23 Thread Thomas Kluyver
Thomas Kluyver added the comment: Gah, still wrong. Trying again. -- Added file: http://bugs.python.org/file35014/compileall_silent.patch ___ Python tracker <http://bugs.python.org/issue21

[issue21338] Silent mode for compileall

2014-04-23 Thread Thomas Kluyver
Thomas Kluyver added the comment: In fact, I will probably end up working around this anyway, because I'll have to support versions of Python without this fix for some time. So I don't feel strongly that it needs to go in, but I will do any revisions or changes requested if peopl

[issue16467] frozen importlib required for extending Python interpreter not public

2012-11-13 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker <http://bugs.python.org/issue16467> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12967] IDLE RPC Proxy for standard IO streams lacks 'errors' attribute

2012-11-17 Thread Thomas Kluyver
Thomas Kluyver added the comment: It seems pretty arbitrary and newcomer-unfriendly to decide that Python doesn't support running setup.py inside IDLE. Exhibit A: confused newcomer trying to install distribute, getting unhelpful error message. http://stackoverflow.com/questions/133

[issue11679] readline interferes with characters beginning with byte \xe9

2012-11-19 Thread Thomas Kluyver
Thomas Kluyver added the comment: OK, thanks, and sorry for the noise. I've closed this issue. Looking at the readline manual, it looks like this is tied up with the options input-meta, output-meta and convert-meta. Fiddling around with .inputrc hasn't clarified exactly what they

[issue16544] Add external link to ast docs

2012-11-24 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks, I'm really glad to see that it's useful to others. I don't mind contributing it to Python, but I wonder if it's better to let it develop separately for a few months first - it's still very new, and I can improve it faster in

[issue16544] Add external link to ast docs

2012-11-24 Thread Thomas Kluyver
Thomas Kluyver added the comment: I think that putting the full content of GTS into the ast module docs would make it awkwardly long. Perhaps the bulk of it could become a howto, and GTS could be maintained separately as a showcase of examples

[issue16349] Document whether it's safe to use bytes for struct format string

2012-11-30 Thread Thomas Kluyver
Thomas Kluyver added the comment: I'm happy to put together a docs patch, but I don't have any indication of the right answer (is it a safe feature to use, or an implementation detail?) Is there another venue where I should raise th

[issue444582] Finding programs in PATH, adding shutil.which

2013-01-13 Thread Thomas Kluyver
Thomas Kluyver added the comment: The 'short circuit' appears to do what I'd consider the wrong thing when an executable file of the same name exists in the working directory. i.e. which('setup.py') can return 'setup.py', even though running 'setu

[issue16957] shutil.which() shouldn't look in working directory on unix-y systems

2013-01-13 Thread Thomas Kluyver
New submission from Thomas Kluyver: There's a 'short circuit' in shutil.which(), described as 'If we're given a full path which matches the mode and it exists, we're done here.' It also matches if an executable file of the same name is present in the working

[issue16957] shutil.which() shouldn't look in working directory on unix-y systems

2013-01-17 Thread Thomas Kluyver
Thomas Kluyver added the comment: I've added a patch with my suggested fix, as well as a test for this. test_shutil all passes on Linux - I haven't run the tests on Windows. -- keywords: +patch Added file: http://bugs.python.org/file28761/shutil_which

[issue16957] shutil.which() shouldn't look in working directory on unix-y systems

2013-01-18 Thread Thomas Kluyver
Thomas Kluyver added the comment: That makes sense - foo/setup.py can be run from the working directory, but you can't refer to subdirectories on $PATH like that. I've added a revised version of the patch. -- Added file: http://bugs.python.org/file28763/shutil_which_

[issue16957] shutil.which() shouldn't look in working directory on unix-y systems

2013-01-18 Thread Thomas Kluyver
Thomas Kluyver added the comment: Yes, as far as I know, ./script works in the same way as dir/script - from the current directory, but not from $PATH. The first test added is for the case I reported - which('script') shouldn't look in the current directory on Unix. The second

[issue8478] tokenize.untokenize first token missing failure case

2013-01-23 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker <http://bugs.python.org/issue8478> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16224] tokenize.untokenize() misbehaves when moved to "compatiblity mode"

2013-01-25 Thread Thomas Kluyver
Thomas Kluyver added the comment: I think this is a duplicate of #8478. -- nosy: +takluyver ___ Python tracker <http://bugs.python.org/issue16224> ___ ___ Pytho

[issue8478] tokenize.untokenize first token missing failure case

2013-01-25 Thread Thomas Kluyver
Thomas Kluyver added the comment: #16224 appears to be a duplicate. There seem to be several quite major issues with untokenize - see also #12691 - with patches made to fix them. Is there anything I can do to help push these forwards

[issue12691] tokenize.untokenize is broken

2013-01-28 Thread Thomas Kluyver
Thomas Kluyver added the comment: Is there anything I can do to push this forwards? I'm trying to use tokenize and untokenize in IPython, and for now I'm going to have to maintain our own copies of it (for Python 2 and 3), because I keep running into problems with the standard libr

[issue17061] tokenize unconditionally emits NL after comment lines & blank lines

2013-01-28 Thread Thomas Kluyver
New submission from Thomas Kluyver: The docs describe the NL token as "Token value used to indicate a non-terminating newline. The NEWLINE token indicates the end of a logical line of Python code; NL tokens are generated when a logical line of code is continued over multiple physical

[issue16509] sqlite3 docs do not explain check_same_thread

2013-01-28 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker <http://bugs.python.org/issue16509> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2013-02-12 Thread Thomas Kluyver
Thomas Kluyver added the comment: I've updated Nick's patch so that test_dis and test_peephole pass again, and added a prototype ByteCode class (without any docs or tests for now, to allow for API discussion). The prototype ByteCode is instantiated with any of the ob

[issue16509] sqlite3 docs do not explain check_same_thread

2014-07-16 Thread Thomas Kluyver
Thomas Kluyver added the comment: The module docs do mention "Older SQLite versions had issues with sharing connections between threads." Presumably that means that sharing the connection between threads is safe so long as you're not using 'older versions', but it w

[issue16509] sqlite3 docs do not explain check_same_thread

2014-07-16 Thread Thomas Kluyver
Thomas Kluyver added the comment: This page also looks relevant: sqlite can be compiled or used in three different threading modes. Presumably Python compiles/initialises it in the serialised mode, which makes it safe to use a connection from different threads. http://www.sqlite.org

[issue18395] Make _Py_char2wchar() and _Py_wchar2char() public

2014-07-17 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker <http://bugs.python.org/issue18395> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18395] Make _Py_char2wchar() and _Py_wchar2char() public

2014-07-17 Thread Thomas Kluyver
Thomas Kluyver added the comment: You seem to need wchar_t to call Py_Main and Py_SetProgramName. I think there's an example in the docs which is wrong, because it appears to pass a char* to Py_SetProgramName: https://docs.python.org/3.4/extending/embedding.html#very-high-level-embe

[issue22200] Remove distutils checks for Python version

2014-08-14 Thread Thomas Kluyver
New submission from Thomas Kluyver: We noticed the other day that distutils, despite being part of the standard library, checks the version of Python it's running under and has some different code paths - one of which is only taken for Python < 2.2. We haven't managed to figure

[issue22200] Remove distutils checks for Python version

2014-08-26 Thread Thomas Kluyver
Thomas Kluyver added the comment: I spotted a few others as well. When I get a bit less busy in a couple of weeks time, I intend to go through and make a bigger patch to clean things up. -- ___ Python tracker <http://bugs.python.org/issue22

[issue22346] asyncio documentation does not mention provisional status

2014-09-05 Thread Thomas Kluyver
New submission from Thomas Kluyver: >From PEP 411: """ A package will be marked provisional by a notice in its documentation page and its docstring. The following paragraph will be added as a note at the top of the documentation page: The package has been includ

  1   2   3   >