[issue1559549] ImportError needs attributes for module and file name

2011-03-18 Thread Filip Gruszczyński
Changes by Filip Gruszczyński grusz...@gmail.com: Removed file: http://bugs.python.org/file21020/1559549_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559549

[issue1559549] ImportError needs attributes for module and file name

2011-03-18 Thread Filip Gruszczyński
Changes by Filip Gruszczyński grusz...@gmail.com: Removed file: http://bugs.python.org/file21031/1559549_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559549

[issue1559549] ImportError needs attributes for module and file name

2011-03-18 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Ok, here is a patch created using mq. I have a problem, however. I managed to solve following situation: try: raise ImportError('failed import' module_name='somemodule') except ImportError as e: print(e.module_name) that would

[issue11371] Localization of error messages in getopt

2011-03-16 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Bump! Hi Eric, there was no negative feedback for two weeks. How about commiting the patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11371

[issue6584] gzip module has no custom exception

2011-03-15 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I had some time today, so I managed to fix the patch. I hope now everything is ok. -- Added file: http://bugs.python.org/file21209/6584_3.patch ___ Python tracker rep...@bugs.python.org http

[issue1559549] ImportError needs attributes for module and file name

2011-03-15 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I didn't know about this mq extension. I will do a proper patch with a test after friday. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559549

[issue6584] gzip module has no custom exception

2011-03-14 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Bump! How about commiting this patch? Or maybe there is something missing? I'll be happy to fix it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6584

[issue6584] gzip module has no custom exception

2011-03-14 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I'll be very happy to fix this after Friday. Thanks for your comments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6584

[issue8933] Invalid detection of metadata version

2011-03-12 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Here is patch for distutils2. Or maybe you would prefer a patch made by hg export? -- Added file: http://bugs.python.org/file21095/disutils2_8933.patch ___ Python tracker rep

[issue8933] Invalid detection of metadata version

2011-03-10 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Bump! How about applying this patch, Eric? Or maybe there is something else, that needs to be done. If so, I'll be happy to do it. -- ___ Python tracker rep...@bugs.python.org http

[issue8933] Invalid detection of metadata version

2011-03-10 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Sure :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8933 ___ ___ Python-bugs-list

[issue1559549] ImportError needs attributes for module and file name

2011-03-07 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I am sorry again for those mistakes, it's all completely new to me. I have fixed those issues and created new patch. Using hg export, that now spans over two commits. Is it the way those patches should be provided, or should I gather

[issue1559549] ImportError needs attributes for module and file name

2011-03-06 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: This is a draft of a patch. I have only used this new ImportError api in once place, so it would work with following code: try: ... import nosuchmodule ... except ImportError as e: ... print(e.module) ... nosuchmodule I have

[issue8841] GetoptError strings should be localized

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Here is a small patch. Could you advise me, how can I test it now? Or is it an issue, that doesn't require writing new tests? -- keywords: +patch Added file: http://bugs.python.org/file20970/8841.patch

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
New submission from Filip Gruszczyński grusz...@gmail.com: In http://bugs.python.org/issue8841 Eric asked to open a new ticket about localisation of getopt error messages. I attach a patch. -- files: 8841.patch keywords: patch messages: 129865 nosy: eric.araujo, gruszczy priority

[issue8841] getopt errors should be specialized

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Here it is: http://bugs.python.org/issue11371 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8841

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Yes, I have run ./python -m test -v test_getopt and it was ok. Running xgettext --from-code utf-8 getopt.py produces no output. -- ___ Python tracker rep...@bugs.python.org http

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Cool, thanks for all your advice. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11371

[issue1559549] ImportError needs attributes for module and file name

2011-03-02 Thread Filip Gruszczyński
Changes by Filip Gruszczyński grusz...@gmail.com: -- nosy: +gruszczy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559549 ___ ___ Python-bugs

[issue8933] Invalid detection of metadata version

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I'll get down to it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8933 ___ ___ Python

[issue8933] Invalid detection of metadata version

2011-03-01 Thread Filip Gruszczyński
Changes by Filip Gruszczyński grusz...@gmail.com: Removed file: http://bugs.python.org/file20942/8933.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8933

[issue8933] Invalid detection of metadata version

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Patch with tests. Hope this is enough. -- Added file: http://bugs.python.org/file20956/8933.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8933

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I'd be happy to provide a patch. How about extending getopt api to something like this: optlist, args = getopt.getopt(['-b'], 'e', not_recognized=no %s option, mate!) GetoptError: no -b option, mate! Or maybe you should provide

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: One more solution. Maybe getopt should expose variables that hold error messages (rather than have them hardcoded in the code), that can be simply substituted by the user before he runs getopt? But I don't really like this one

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I understand I should do something similar to what is done in argparse: from gettext import gettext as _, ngettext ... message = ngettext('conflicting option string: %s', 'conflicting option strings: %s

[issue11140] threading.Lock().release() raises _thread.error, not RuntimeError

2011-02-27 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Test for releasing unacquired lock and aliasing exception. -- keywords: +patch nosy: +gruszczy Added file: http://bugs.python.org/file20936/11140.patch ___ Python tracker rep...@bugs.python.org

[issue5979] strptime() gives inconsistent exceptions

2011-02-27 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: But this is exactly how strptime in C. Consider this: #include time.h #include stdio.h #include stdlib.h #include string.h int main(){ char buf[255]; struct tm tm; memset(tm, 0, sizeof(tm)); strptime(123, %m%d

[issue8933] Invalid detection of metadata version

2011-02-27 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Here is a simple patch, that sets metadata version in PKG-INFO to 1.1, if finds classifier or download_url parametres in setup. If it's any good, I'll try to write a test. If not, I'll be happy to get some advice on how to provide

[issue11174] add argparse formatting option to display type names for metavar

2011-02-26 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: First draft of patch with this functionality. Test, patch and docs are included. I'll gladly work further on this, so I would appreciate some advice and suggestions. -- keywords: +patch nosy: +gruszczy Added file: http

[issue9525] webbrowser: open new tab in unobtrusive way

2010-08-05 Thread Filip Gruszczyński
New submission from Filip Gruszczyński grusz...@gmail.com: 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

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

2010-05-11 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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

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

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

[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 grusz...@gmail.com added the comment: So, is there any decision here, so that I could get down to providing better patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4256

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

2010-05-09 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org

[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 grusz...@gmail.com 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

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

2010-04-19 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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 rep...@bugs.python.org

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

2010-04-19 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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

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

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

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

2010-04-03 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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

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

2010-03-31 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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, --help

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

2010-03-30 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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.patch

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

2010-03-30 Thread Filip Gruszczyński
Changes by Filip Gruszczyński grusz...@gmail.com: Removed file: http://bugs.python.org/file16688/8256_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8256

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

2010-03-30 Thread Filip Gruszczyński
Changes by Filip Gruszczyński grusz...@gmail.com: Removed file: http://bugs.python.org/file16689/8256_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8256

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

2010-03-29 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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

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

2010-03-29 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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

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

2010-03-29 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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.patch

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

2010-03-28 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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

[issue6081] str.format_from_mapping()

2010-03-23 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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

[issue6081] str.format_from_mapping()

2010-03-19 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Could you point me, where to add tests and documentation? I would happily add those. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6081

[issue6081] str.format_from_mapping()

2010-03-19 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Ok, unfortunately this code won't work for certain tests. Take those: self.assertEqual(My name is {0}.format('Fred'), My name is Fred) We pass only one argument, which is a dict and this won't satisfy such test. We need to think

[issue6081] str.format_from_mapping()

2010-03-18 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I have created a small patch, that adds method that formats using a dict. It's the first time I have written anything in python implementation, so I would very appreciate any advice. Change allows the following: m = Mapping(a='b

[issue6081] str.format_from_mapping()

2010-03-18 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: My first intention was simply to push mapping from args to kwargs, just like Eric suggested, but that didn't help with __missing__, only with accepting a dict instead of pushing keyword arguments. I didn't like explicitly asking

[issue6584] gzip module has no custom exception

2010-03-16 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I have created a small patch, that introduces BadGzipFile exception. It is a subclass of IOError, so it would be backward compatible and will be still caught by old code, but this way is distinct from IOError. -- keywords

[issue6584] gzip module has no custom exception

2010-03-16 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Modified patch with test, that catches both BadGzipFile and IOError exceptions. -- Added file: http://bugs.python.org/file16566/6584_2.patch ___ Python tracker rep...@bugs.python.org http

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

2009-11-30 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com 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

[issue3262] re.split doesn't split with zero-width regex

2008-07-07 Thread Filip Salomonsson
Changes by Filip Salomonsson [EMAIL PROTECTED]: -- nosy: +filip ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3262 ___ ___ Python-bugs-list mailing

[issue1618] locale.strxfrm can't handle non-ascii strings

2007-12-13 Thread Filip Salomonsson
New submission from Filip Salomonsson: locale.strxfrm currently does not handle non-ascii strings: $ ./python Python 3.0a2 (py3k:59482, Dec 13 2007, 21:27:14) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2 Type help, copyright, credits or license for more information. import locale

<    1   2