[issue6081] str.format_from_mapping()

2010-03-23 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have created a new patch, that should be satisfying now. There is help (though it is quite small, I tried to mimic those that were already in unicode.c) and tests. Right now format_using_mapping is called like this: format_using_mapping(mapping, *args

[issue8256] TypeError: bad argument type for built-in operation

2010-03-28 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: The bug is triggered by input, not by print. The exact place is _PyUnicode_AsStringAndSize, where unicode check happens. Then print checks PyError_Occured and catches this error. Either this error should not be raised or should be cleared input finishes

[issue8256] TypeError: bad argument type for built-in operation

2010-03-29 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: The problem occurs in line in bltinmodule.c: po = PyUnicode_AsEncodedString(stringpo, _PyUnicode_AsString(stdout_encoding), NULL); Where _PyUnicode_AsString returns NULL, since stdout_encoding is Py_None and that

[issue8256] TypeError: bad argument type for built-in operation

2010-03-29 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have written a small patch, that solves the problem, but is disgusting. Could anyone tell me, how I can get some default encoding from Python internals (I have no idea where to look) and return it inside _PyUnicode_AsStringAndSize? Anyway, now when the

[issue8256] TypeError: bad argument type for built-in operation

2010-03-29 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Ok, I have found Py_FileDefaultSystemEncoding and use it, however I had to cast it to (char *), because it's a const char *. Maybe I could do it better? -- Added file: http://bugs.python.org/file16689/8256_2.

[issue8256] TypeError: bad argument type for built-in operation

2010-03-30 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have read, that I shouldn't directly use Py_FileSystemDefaultEncoding and rather use PyUnicode_GetDefaultEncoding, so I have changed the code a little. -- Added file: http://bugs.python.org/file16700/8256_3.

[issue8256] TypeError: bad argument type for built-in operation

2010-03-30 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : Removed file: http://bugs.python.org/file16688/8256_1.patch ___ Python tracker <http://bugs.python.org/issue8256> ___ ___ Python-bug

[issue8256] TypeError: bad argument type for built-in operation

2010-03-30 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : Removed file: http://bugs.python.org/file16689/8256_2.patch ___ Python tracker <http://bugs.python.org/issue8256> ___ ___ Python-bug

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-03-31 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Are you saying, that for example for this: grusz...@gruszczy-laptop:~/Programs/logbuilder$ ./logbuilder --help Usage: logbuilder [options] repo Options: --version show program's version number and exit -h, --helpshow this

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-03 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'll take a look at optparse code and try to provide a patch. But first holidays must finish and I must come back to ma usual residence, where I have programming environment. -- ___ Python tracker

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-19 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Patch for optparse with tests. If it's ok, I'll sit down to argparse. -- keywords: +patch Added file: http://bugs.python.org/file16985/4256_1.patch ___ Python tracker <http://bugs.python.

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-19 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I guess I am using my English too little, that's why I am using polish expressions too often. What I meant was of course, that I will do argparse patch too. I haven't provided docs for --help-options yet, becuase it is not clear to me, it is a

[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-19 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Ok, here comes patch for argparse too. -- Added file: http://bugs.python.org/file16996/4256_2.patch ___ Python tracker <http://bugs.python.org/issue4

[issue4256] optparse/argparse: provide a simple way to get a programmatically useful list of options

2010-04-21 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'll be happy to both fix things pointed by Steven and try some other approach, if that's required, but I would rather do it after a consesus is reached, so I don't have to do the same stuff several times (changing argparse tests requ

[issue4256] optparse/argparse: provide a simple way to get a programmatically useful list of options

2010-05-09 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: So, is there any decision here, so that I could get down to providing better patch? -- ___ Python tracker <http://bugs.python.org/issue4

[issue8256] TypeError: bad argument type for built-in operation

2010-05-09 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Bump! Is there anything happening about this bug? Is my patch any good or should I try to work on something different? -- ___ Python tracker <http://bugs.python.org/issue8

[issue8256] TypeError: bad argument type for built-in operation

2010-05-10 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'll try to code a small test this evening. -- ___ Python tracker <http://bugs.python.org/issue8256> ___ ___ Pytho

[issue8256] TypeError: bad argument type for built-in operation

2010-05-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Amaury, could you elaborate a little more on this? I am pretty new to all this and I would happily write the patch, if only you could give me some clue on how I should approach this. -- ___ Python tracker

[issue13521] Make dict.setdefault() atomic

2012-01-15 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: No more double lookup. -- Added file: http://bugs.python.org/file24244/13521_27_3.patch ___ Python tracker <http://bugs.python.org/issue13

[issue11694] xdrlib raises ConversionError in inconsistent way

2012-01-15 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Bump! It's almost 3 months since I posted the patch, so I would like to remind about this bug. -- ___ Python tracker <http://bugs.python.org/is

[issue13896] shelf doesn't work with 'with'

2012-01-28 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : It would be cool if use could use with to manage shelf object and forget about close. -- messages: 152159 nosy: gruszczy priority: normal severity: normal status: open title: shelf doesn't work with

[issue13896] shelf doesn't work with 'with'

2012-01-28 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : -- keywords: +patch Added file: http://bugs.python.org/file24347/13896.patch ___ Python tracker <http://bugs.python.org/issue13

[issue13896] shelf doesn't work with 'with'

2012-01-29 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Oh, I haven't noticed that. Using contextlib.closing solves my problem. Thanks. -- ___ Python tracker <http://bugs.python.org/is

[issue13896] Make shelf instances work with 'with' as context managers

2012-02-04 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: closing was solving my problem, but I'll be happy on working on this patch, if you think it's useful after all. I don't think the stage should be test needed, since the patch has tests (I know

[issue8706] accept keyword arguments on all base type methods and builtins

2012-02-26 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I don't know if this is exactly what you want, but this is an early patch. -- keywords: +patch nosy: +gruszczy Added file: http://bugs.python.org/file24644/8706.patch ___ Python tracker <http://bugs.py

[issue8706] accept keyword arguments on all base type methods and builtins

2012-02-26 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: With tests. -- Added file: http://bugs.python.org/file24650/8706_2.patch ___ Python tracker <http://bugs.python.org/issue8

[issue13521] Make dict.setdefault() atomic

2012-02-26 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Fixed both issues. -- Added file: http://bugs.python.org/file24652/13521_27_4.patch ___ Python tracker <http://bugs.python.org/issue13

[issue11807] Documentation of add_subparsers lacks information about parametres

2012-02-26 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Bump! I would like to remind about this issue and patch. -- ___ Python tracker <http://bugs.python.org/issue11807> ___ ___

[issue11841] packaging.version: Bug when comparing versions with rc marker

2012-02-27 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I prefer to be humble and trust core devs, when I post some patch to a codebase I don't know very well. I am glad you managed to reproduce it and I could help :-) -- ___ Python tracker <http://bugs.py

[issue8706] accept keyword arguments on all base type methods and builtins

2012-02-27 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Do you think I should put everything into a single patch or rather slowly add new patches with different methods or method groups? I would rather split it into several patches, I think it is easier to manage them, especially that this one is quite huge

[issue8706] accept keyword arguments on all base type methods and builtins

2012-02-27 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I would stay away from methods that accept just a single argument. For those that accept more, I think it's reasonable to allow keyword args. -- ___ Python tracker <http://bugs.python.org/i

[issue13896] Make shelf instances work with 'with' as context managers

2012-10-05 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Crap, it was so long ago, that I honestly don't remember why I added this if. It made sense back then. -- ___ Python tracker <http://bugs.python.org/is

[issue7394] sqlite3: some OperationalError exceptions should be ProgrammingError (PEP 249)

2009-11-30 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have created some naive patch, that makes sqlite module raise ProgrammingError for SQLITE_ERROR code. But I don't know, whether it might raise ProgrammingError in situation, when OperationalError should be. Sqlite docs says: #define SQLITE_

[issue9525] webbrowser: open new tab in unobtrusive way

2010-08-05 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : webbrowser module doesn't allow to open url in an unobtrusive way. Right now if browser is minimized it is brought to the top. Furthermore if you browser is already in the top, new tab is opened and user is moved to this top. It would be useful, i

<    1   2