[issue6081] str.format_from_mapping()

2010-03-18 Thread Filip Gruszczyński
Filip Gruszczyński 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 for __missin

[issue6081] str.format_from_mapping()

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

[issue6081] str.format_from_mapping()

2010-03-19 Thread Filip Gruszczyński
Filip Gruszczyński 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 sati

[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

[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 "licens

[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Filip Rembiałkowski
New submission from Filip Rembiałkowski : The doctest module does not compare multiline strings properly, as attached example proves. Tested on 2.7, 3.6 and 3.9.0a5+. (platform: Ubuntu 18.04). Related: https://stackoverflow.com/questions/60956015/unexpected-errors-while-testing-python3-code

[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Filip Rembiałkowski
Filip Rembiałkowski added the comment: @Serhiy, Thank you for feedback. Yes the "testme" function (indeed trivial) works as expected - both in interactive Python interpreter and in script file. If you go to Lib/doctest.py, search for "string-identical" and debug my exam

[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Filip Rembiałkowski
Filip Rembiałkowski added the comment: Actually, the behavior does not depend on leading spaces, and test case can be isolated even further. Sample is attached [doctest-bugs-2.py]. -- Added file: https://bugs.python.org/file49066/doctest-bugs-2.py

[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

[issue37305] Add MIME type for Web App Manifest

2019-06-16 Thread Filip Š
New submission from Filip Š : Web App Manifest ( https://w3c.github.io/manifest/ ) is "JSON-based manifest file that provides developers with a centralized place to put metadata associated with a web application". Although it is not required, it is recommended by W3C ( https://w3c

[issue37305] Add MIME type for Web App Manifest

2019-06-18 Thread Filip Š
Change by Filip Š : -- keywords: +patch pull_requests: +14036 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14199 ___ Python tracker <https://bugs.python.org/issu

[issue35393] Typo in documentation

2018-12-03 Thread Filip Bengtsson
New submission from Filip Bengtsson : There are 256 characters in the range 0–255. -- assignee: docs@python components: Documentation messages: 330975 nosy: autom, docs@python priority: normal pull_requests: 10114 severity: normal status: open title: Typo in documentation

[issue35393] Typo in documentation

2018-12-03 Thread Filip Bengtsson
Filip Bengtsson added the comment: https://github.com/python/cpython/pull/10876/commits/00f39c15a13377f3920c72267b2b78a043d9b8ab -- ___ Python tracker <https://bugs.python.org/issue35

[issue20906] Issues in Unicode HOWTO

2019-05-06 Thread Filip Bengtsson
Change by Filip Bengtsson : -- pull_requests: +13019 ___ Python tracker <https://bugs.python.org/issue20906> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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

[issue20898] Missing 507 response description

2014-03-16 Thread Filip Malczak
Filip Malczak added the comment: If we're getting out of original scope, then I wonder... Maybe we should keep only standard status codes here? If not, which should we support, and which not? What about custom Spring 420 Method Failure? One way to clean up mess here is to create

[issue16635] Interpreter not closing stdout/stderr on exit

2012-12-07 Thread Filip Zyzniewski
New submission from Filip Zyzniewski: When using a Python script as a unix pipe filter with its stdout redirected to a file: python script.py > /nfs/foo user is not notified of some writing problems on NFS, because these are sometimes reported on close(), and the interpreter never d

[issue16635] Interpreter not closing stdout/stderr on exit

2012-12-07 Thread Filip Zyzniewski
Filip Zyzniewski added the comment: If stdout was closed before closing stderr, then stdout problems could be reported, and that is what I would expect when using Python this way. os.fsync(1) helps, but only if preceeded by sys.stdout.flush() and it seems a bit cumbersome. Is there any

[issue19162] datetime.datetime.min.strftime('%Y') not working

2013-10-04 Thread Filip Zyzniewski
New submission from Filip Zyzniewski: The datetime class provides a min datetime object which is not formattable: on Python 2: $ python Python 2.7.3 (default, Apr 10 2013, 05:13:16) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "licens

[issue4037] doctest.py should include method descriptors when looking inside a class __dict__

2013-12-11 Thread Filip Zyzniewski
Filip Zyzniewski added the comment: It seems like there is also an issue with property classes defined in a different module. In the example below Foo.x uses standard property, and Foo.y uses prop imported from the prop module. This results in docstring for Foo.y to be missed: filip@klocek

[issue19989] Error while sending function code over queue (multiprocessing)

2013-12-15 Thread Filip Malczak
New submission from Filip Malczak: Ive been using YAPSY to load plugins in one process. In this process I tried to put them in queue, and in another process I read them from queue. There was a problem with non-existing type of plugin in consumer process, so I tried to serialize plugin

[issue20898] Missin 507 response description

2014-03-12 Thread Filip Malczak
New submission from Filip Malczak: I find it strange, that in http.client module we have variable: INSUFFICIENT_STORAGE = 507 yet in responses (dict mapping int codes to descriptions) 507 is missing. It's probably just mistake caused by short dev memory, fix is easy: add line

[issue20898] Missing 507 response description

2014-03-12 Thread Filip Malczak
Changes by Filip Malczak : -- title: Missin 507 response description -> Missing 507 response description ___ Python tracker <http://bugs.python.org/issu

[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

[issue24663] ast.literal_eval does not handle empty set literals

2015-07-18 Thread Filip Haglund
New submission from Filip Haglund: ast.literal_eval handles sets, if they contain at least one value, but does not handle empty ones, which are represented as `set()` since `{}` is already used by dicts. -- components: Library (Lib) messages: 246906 nosy: Filip Haglund priority

[issue24663] ast.literal_eval does not handle empty set literals

2015-07-18 Thread Filip Haglund
Filip Haglund added the comment: Okey, then this is not a bug. I can just handle this special case myself. Thanks! -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issu

[issue26077] Make slicing of immutable structures return a view instead of a copy

2016-01-10 Thread Filip Haglund
New submission from Filip Haglund: Slicing tuples returns a copy, which is O(n) time. This could be O(1) since tuples are immutable, by just pointing to the same data. This probably applies to other immutable structures as well, such as strings. -- components: Interpreter Core

[issue28154] Core dump after importing lxml in Python3.6b

2016-09-14 Thread Filip Stefanov
New submission from Filip Stefanov: fstefanov@lin-0360: ~/bin/python/vm/python3.6b/bin $ python Python 3.6.0b1 (default, Sep 14 2016, 11:15:36) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>&g

[issue28154] Core dump after importing lxml in Python3.6b

2016-09-14 Thread Filip Stefanov
Filip Stefanov added the comment: My source was out of date... You are right now is working fine Sorry for the time wasted. :) -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/i

<    1   2