[issue43692] Raise SyntaxError on implicit string concatentation in list

2021-04-01 Thread Carsten Docktor
Carsten Docktor added the comment: I'd consider this a bug, because I find it quite error prone. But I get the point that it might be currently used. Thank you for your response. I'll rely on third party checkers for this. -- resolution: -> rejected stage: ->

[issue43692] Raise SyntaxError on implicit string concatentation in list

2021-04-01 Thread Carsten Docktor
New submission from Carsten Docktor : I recently found several bugs, which came from the "feature" shown below. Is python supposed to use string concatenation in a list environment like this? Why would this be appreciated? ## Expected Behavior The example below should raise a Synta

[issue42173] Drop Solaris support

2020-10-30 Thread Carsten Grzemba
Carsten Grzemba added the comment: Please continue support for Solaris/IllumOS! For build resources on the most recent Solaris platforms you can contact opencsw.org. -- nosy: +cgrzemba ___ Python tracker <https://bugs.python.org/issue42

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2019-08-26 Thread Carsten Fuchs
Change by Carsten Fuchs : -- nosy: +Carsten Fuchs ___ Python tracker <https://bugs.python.org/issue36792> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37515] `open("aux.txt", "w")` fails unexpectedly with FileNotFoundError on Windows

2019-07-06 Thread Carsten
Carsten added the comment: This is a good explanation. Indeed Windows complains if I manually want to create a file "aux.txt" ("This device name is not allowed"). If I want to copy-paste such a file from within a zip-file (Windows Explorer can open zip files) I get

[issue37515] `open("aux.txt", "w")` fails unexpectedly with FileNotFoundError on Windows

2019-07-06 Thread Carsten
New submission from Carsten : I maintain a package which includes a package named "aux.py". I could not install it on my windows machine via pip and others had the same problem also with windows. I tracked down the problem to `io.open`. On my Windows 7 System with Python 3.7.1 fro

[issue28837] 2to3 does not wrap zip correctly

2016-11-30 Thread Carsten
New submission from Carsten: The following Python 2.7 code is not converted correctly to Python 3 by 2to3: c = [(1, 10), (2, 20)] # get a tuple with the first entries of every tuple in c, # i.e. (1, 2) x = zip(*c)[0] print x The result is c = [(1, 10), (2, 20)] # get a tuple with the

[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2014-12-27 Thread Carsten Grohmann
Changes by Carsten Grohmann : -- nosy: +cgrohmann ___ Python tracker <http://bugs.python.org/issue23102> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17067] Examples in documentation for 3.x in 23.1.3.4. Deferred translations are rather weak

2013-01-28 Thread Carsten Klein
New submission from Carsten Klein: The examples for the topic presented are rather weak. In fact, they merely present do nothing replacements for an actually working, deferred localization mechanism or some sort of prototypical implementation thereof. As such I propose that they be replaced

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2012-12-30 Thread Carsten Klein
Carsten Klein added the comment: I have created a patch for Python 2.7.3 that fixes the issue for that release, too. -- Added file: http://bugs.python.org/file28499/python2.7.3.diff ___ Python tracker <http://bugs.python.org/issue16

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-29 Thread Carsten Klein
Carsten Klein added the comment: However, hinting inspect to use a different format when serializing the default values for existing keyword parameters of methods or functions seems to be a good idea and +1 by me for that. Personally, I'd rather have the decorator based solution than havi

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-29 Thread Carsten Klein
Carsten Klein added the comment: Here are some links into the sources: Python/ast.c, ast_for_atom(), line 1872ff. Python/ast.c, parsenumber(), line 3632ff. -- ___ Python tracker <http://bugs.python.org/issue16

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-29 Thread Carsten Klein
Carsten Klein added the comment: The problem with this is that at the time that pydoc gets the information via inspect, the numbers have already been parsed as long or double and the original notation is no longer available. This is due to the fact that during build of the AST node for the

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2012-12-29 Thread Carsten Klein
Changes by Carsten Klein : Added file: http://bugs.python.org/file28478/issue16806.diff ___ Python tracker <http://bugs.python.org/issue16806> ___ ___ Python-bugs-list m

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2012-12-29 Thread Carsten Klein
Changes by Carsten Klein : Removed file: http://bugs.python.org/file28477/issue1680.diff ___ Python tracker <http://bugs.python.org/issue16806> ___ ___ Python-bugs-list m

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2012-12-29 Thread Carsten Klein
Changes by Carsten Klein : -- title: col_offset is -1 for multiline string expressions resembling docstrings -> col_offset is -1 and lineno is wrong for multiline string expressions ___ Python tracker <http://bugs.python.org/issu

[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-29 Thread Carsten Klein
Carsten Klein added the comment: Please see the attached patch that will resolve the issue. It also includes a test case in test_ast.py. What the patch does is as follows: - tok_state is extended by two fields, namely first_lineno and multi_line_start - first_lineno will be set by tok_get

[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-28 Thread Carsten Klein
Carsten Klein added the comment: In addition, the reported lineno will be set to the last line of the multi line string instead of the first line where parsing the parse began parsing the string. -- ___ Python tracker <http://bugs.python.

[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-28 Thread Carsten Klein
Carsten Klein added the comment: Please note that, regardless of the indent level, the col_offset for multi line str expressions will always be -1. -- ___ Python tracker <http://bugs.python.org/issue16

[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-28 Thread Carsten Klein
New submission from Carsten Klein: Given an input module such as class klass(object): """multi line comment continued on this line """ """single line comment""" """ Another multi line

[issue11159] Sax parser crashes if given unicode file name

2012-12-08 Thread Carsten Grohmann
Changes by Carsten Grohmann : -- nosy: +cgrohmann ___ Python tracker <http://bugs.python.org/issue11159> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16394] Improving tee() memory footprint

2012-11-03 Thread Carsten Milkau
Changes by Carsten Milkau : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python ___ Python tracker <http://bugs.python.org/issu

[issue16394] Improving tee() memory footprint

2012-11-03 Thread Carsten Milkau
Carsten Milkau added the comment: Oh great! Then I can use it as-is. How about reassigning the issue to documentation (for clarifying the inefficiency warning)? -- ___ Python tracker <http://bugs.python.org/issue16

[issue16394] Improving tee() memory footprint

2012-11-03 Thread Carsten Milkau
Carsten Milkau added the comment: No. The sample code is a demonstration how to do it, it's by no means a full-fledged patch. The drawback of the current implementation is that if you tee n-fold, and then advance one of the iterators m times, it fills n queues with m references each,

[issue16394] Improving tee() memory footprint

2012-11-03 Thread Carsten Milkau
New submission from Carsten Milkau: The memory footprint of itertools.tee can be reduced substantially by using a shared buffer for the child iterators (see sample code). If local queues are desired for efficient threading support, they can be combined with a global queue, allowing to

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-10-02 Thread Carsten Klein
Carsten Klein added the comment: The change was introduced in r30 (Python/symtable.c @ near where it reads /* Special-case super: it counts as a use of __class__ */) which now enforces that a class that calls super on init will have the correct class information present. I do not think that

[issue11788] Decorator class with optional arguments and a __call__ method gets not called when there are no arguments

2011-04-06 Thread Carsten Klein
Carsten Klein added the comment: Ok, looks like a valid work around to me. However, IMO it is not the same as with decorator functions. These will be called and will return the correct result, whereas the decorator class will instead return an instance of self instead of being called when no

[issue11788] Decorator class with optional arguments and a __call__ method gets not called when there are no arguments

2011-04-06 Thread Carsten Klein
Carsten Klein added the comment: I think it is, actually, considering @foo @bar class A: pass with foo and bar being both decorator classes, the chained call foo(bar(A)) will return and instance of foo instead of A With decorator classes you need to actually do this

[issue11789] Extend upon metaclass/type class documentation, here: zope.interface and usage of instances of classes as base classes

2011-04-06 Thread Carsten Klein
New submission from Carsten Klein : In zope.interface, you have something the following construct: class InterfaceBase: pass Interface = InterfaceBase() Using the above Interface as a derivation base for your own classes, will make that instance a type derived class: class IFoo

[issue11788] Decorator class with optional arguments and a __call__ method gets not called when there are no arguments

2011-04-06 Thread Carsten Klein
Carsten Klein added the comment: will fail decorating the class since y... actually means that instead of an instance of class y, an instance of the decorator class will be returned, with y being lost along the way... -- ___ Python tracker <h

[issue11788] Decorator class with optional arguments and a __call__ method gets not called when there are no arguments

2011-04-06 Thread Carsten Klein
New submission from Carsten Klein : Scenario: class deco(object): def __init__(self, optional = False): self._optional = optional def __call__(self, decorated): decorated.optional = self._optional return decorated @deco class y(object): pass will fail decorating the class

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Changes by Carsten Klein : -- nosy: -carsten.kl...@axn-software.de ___ Python tracker <http://bugs.python.org/issue11774> ___ ___ Python-bugs-list mailin

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Actually I logged in using carsten.kl...@axn-software.de and the tracker changed my login name to that... Will issue a bug against the tracker... -- nosy: +carsten.klein ___ Python tracker <http://bugs.python.

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Changes by Carsten Klein : -- nosy: +carsten.klein -carsten.kl...@axn-software.de ___ Python tracker <http://bugs.python.org/issue2193> ___ ___ Python-bugs-list m

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: I wonder how this happened... Thanks for the finding! -- ___ Python tracker <http://bugs.python.org/issue11774> ___ ___ Pytho

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Ah, I see, thanks for the input. Will close this then. -- ___ Python tracker <http://bugs.python.org/issue11774> ___ ___ Pytho

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Nope, it only happens on issue [issue2193] Cookie Colon Name Bug but not for this one. -- ___ Python tracker <http://bugs.python.org/issue11

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: It seems that it only happens when commenting upon an existing issue. -- ___ Python tracker <http://bugs.python.org/issue11

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
New submission from Carsten Klein : Currently I am receiving duplicates of the notification mails by your issue tracker. -- messages: 133062 nosy: carsten.kl...@axn-software.de priority: normal severity: normal status: open title: Issue tracker sends notification mails twice

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Perhaps the best solution would be for the Python cookie module to gracefully adapt to servers not quoting cookie values as is required by the RFCs and make these quoted-strings instead? -- ___ Python tracker <h

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Ups forgot to also mention the production rule for token, which is defined in the HTTP RFC RFC2616: token = 1* separators

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Guess you are right... I did overlook the quoted-string reference in the RFC: av-pair = attr ["=" value]; optional value attr= token value = word word= token | quo

[issue2193] Cookie Colon Name Bug

2011-02-03 Thread Carsten Klein
Carsten Klein added the comment: Besides that, BM is wrong in the assumption that *who ever he is* Davi M. Kristol states that the colon is a valid character. There is no such notion in the article. In fact, DMK repeats the definition found in the original RFC on cookies, which also was

[issue2193] Cookie Colon Name Bug

2011-02-03 Thread Carsten Klein
Carsten Klein added the comment: if you'd take a close look at the following lines accepted as part of the patch for stripping out unwanted/non standard cookies over trac: +try: +old_set(key, real_value, coded_value) +except Cookie

[issue2193] Cookie Colon Name Bug

2011-01-28 Thread Carsten Klein
Carsten Klein added the comment: One more: if you look closer at the accepted patch by CMLENZ over @ t.e.o., you will find: if self.req.headers_in.has_key('Cookie'): -self.incookie.load(self.req.headers_in['Cookie']) +#self.incookie.load

[issue2193] Cookie Colon Name Bug

2011-01-28 Thread Carsten Klein
Carsten Klein added the comment: Personally I believe that this is WONTFIX. Why? Because, the original RFC states that the colon is part of the unwanted characters, regardless of whether Perl or other similar implementations ignore the standard. Besides that, and most important: The

[issue410547] os.statvfs support for Windows

2011-01-09 Thread Carsten Koch
Carsten Koch added the comment: Here is what I am doing now: ... if sys.platform == "win32": import win32file else: import statvfs ... def get_free_space(path = '.'): """ Determine the free space in bytes for the given path. ""

[issue10813] Suppress adding decimal point for places=0 in moneyfmt()

2011-01-06 Thread Carsten Grohmann
Carsten Grohmann added the comment: Setting dp to an empty string is only a workaround from my perspective. I get the value of the places parameter from a configuration instance and have to implement an additional check "places == 0" every time I call the original moneyfmt(). To r

[issue10813] Suppress adding decimal point for places=0 in moneyfmt()

2011-01-03 Thread Carsten Grohmann
New submission from Carsten Grohmann : Hi, the documentation of the decimal module contains a small recipe called moneyfmt() for format decimal values. It's very usefull. I'd like to suggest a small improvement because the output is incorrect with given dp="." (d

[issue9680] Add in declaration order support for the dictionary passed in to the meta class __init__ and __new__ methods

2010-08-25 Thread Carsten Klein
New submission from Carsten Klein : Example class Meta(type): def __new__(cls, name, bases, locals): print repr(locals.keys()) class Test(object): __metaclass__ = Meta A = 1 B = 2 C = 3 D = 4 E = 5 The above will yield the keys in a somewhat random order

[issue9659] frozenset, when subclassed will yield warning upon call to super(...).__init__(iterable)

2010-08-25 Thread Carsten Klein
Carsten Klein added the comment: Thanks for the information. Where is this documented? I cannot find it in the official Python docs... TIA. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9659] frozenset, when subclassed will yield warning upon call to super(...).__init__(iterable)

2010-08-22 Thread Carsten Klein
New submission from Carsten Klein : Example class a(frozenset): def __init__(self, iterable): super(a, self).__init__(iterable) i = a([1,2,3]) > __main__:3: DeprecationWarning: object.__init__() takes no parameters > a([1, 2, 3]) This might be due to the fact that the fro

[issue3185] Documentation of time.time() differs from source documentation

2008-06-23 Thread Carsten Grohmann
Carsten Grohmann <[EMAIL PROTECTED]> added the comment: "current local unix seconds" means seconds since the Epoch in local timezone. I've attached a small example to show that is no difference between the time returned by time.localtime() and time.time(). So I assume

[issue3185] Documentation of time.time() differs from source documentation

2008-06-23 Thread Carsten Grohmann
New submission from Carsten Grohmann <[EMAIL PROTECTED]>: The current python documentation of the time module (http://docs.python.org/lib/module-time.html) means that time.time() returns the "seconds since the epoch, in UTC". But in the current source documentation of the t

[issue2648] decimal receipe moneyfmt suppress leading 0

2008-04-17 Thread Carsten Grohmann
New submission from Carsten Grohmann <[EMAIL PROTECTED]>: The current version of the receipe moneyfmt doesn't have a leading "0" for 1 < value < -1. The attached patch adds a new parameter "zero". The parameter is empty per default and can set to &quo

[issue1087] py3k os.popen result is not iterable, patch attached

2007-09-02 Thread Carsten Haese
Changes by Carsten Haese: __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1087> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mai

[issue1087] py3k os.popen result is not iterable, patch attached

2007-09-02 Thread Carsten Haese
Changes by Carsten Haese: -- components: Library (Lib) severity: normal status: open title: py3k os.popen result is not iterable, patch attached type: behavior versions: Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1063] Small typo in properties example

2007-08-30 Thread Carsten Grohmann
New submission from Carsten Grohmann: The example for property() contains a typo / small bug: class C(object): def __init__(self): self.__x = None [...] should be: class C(object): def __init__(self): self._x = None [...] Source: http://docs.python.org/lib/built-in-funcs.html