[issue46807] Wrong class __annotations__ when field name and type are equal

2022-02-20 Thread Konstantin
New submission from Konstantin : In [18]: class Str(str): ...: pass In [19]: class Class: ...: Str: str ...: ...: ...: Class.__annotations__ Out[19]: {'Str': str} In [20]: class Class: ...: Str: str = "" ...: ...: ...: C

[issue44395] email.message as_string() not writing unixfrom

2021-06-11 Thread Konstantin Ryabitsev
New submission from Konstantin Ryabitsev : When using as_string(unixfrom=True), the "From " line is not always printed. The behaviour is correct for as_bytes(). Test case: import email.message msg = email.message.EmailMessage() msg.set_payload('Hello World\n') ms

[issue42787] email.utils.getaddresses improper parsing of unicode realnames

2020-12-30 Thread Konstantin Ryabitsev
New submission from Konstantin Ryabitsev : What it currently does: >>> import email.utils >>> email.utils.getaddresses(['Shuming [范書銘] ']) [('', 'Shuming'), ('', ''), ('', '范書銘'), ('', '&#x

[issue37402] Fatal Python error: Cannot recover from stack overflow issues on Python 3.6 and 3.7

2019-06-26 Thread konstantin danilov
konstantin danilov added the comment: Same error, python3.7. I have attached minifyed code version. It runs into infinite recursion due to __setattr__ call inside 'with' statement on top of same object. As result: > python /tmp/text.py Fatal Python error: Cannot recover from s

[issue37277] http.cookies.SimpleCookie does not parse attribute without value (rfc2109)

2019-06-14 Thread Konstantin Enchant
New submission from Konstantin Enchant : Very strange case but https://www.ietf.org/rfc/rfc2109.txt (see 4.1 Syntax: General) defines that "= value" is optional for attribute-value pairs for header Cookie. And SimpleCookie fully broken if meets attribute without valu

[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2017-07-05 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: Terry J. Reedy wrote: > Is this still relevant or should it be closed? Should be closed. > On Win10, I created a short script юникод.py using Save As from IDLE. > > py -2 юникод.py produces > C:\Programs\Python27\python.exe: can't

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Konstantin Enchant
Konstantin Enchant added the comment: Yes. Case: # --- class A: def f(self): nonlocal __x # --- must raises SyntaxError like case: # --- class A: def f(self): nonlocal x >> SyntaxError: no binding for nonlocal &#x

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Konstantin Enchant
Konstantin Enchant added the comment: The problem happens only when "nonlocal __something" in a class method. In your case f2() isn't class method. More interesting behavior with underscores - https://gist.github.com/sirkonst/6eff6

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Konstantin Enchant
New submission from Konstantin Enchant: Code: # --- __obj = object() class Foo: def f1(self): nonlocal __obj f = Foo() f.f1() # <-- segmentation fault # --- -- messages: 257174 nosy: Konstantin Enchant prior

[issue24754] argparse add_argument with action="store_true", type=bool should not crash

2015-08-22 Thread Konstantin Molchanov
Konstantin Molchanov added the comment: Although I agree that specifying type with store_true or store_false is unnecessary, this shouldn't really be an error like this. Why not just ignore type if it can't be utilized? The error message implies the usage of add_argument is erroneou

[issue24136] document PEP 448: unpacking generalization

2015-07-12 Thread Konstantin Molchanov
Changes by Konstantin Molchanov : Added file: http://bugs.python.org/file39919/replace_sequence_with_iterable.diff ___ Python tracker <http://bugs.python.org/issue24

[issue24136] document PEP 448: unpacking generalization

2015-07-12 Thread Konstantin Molchanov
Konstantin Molchanov added the comment: I've updated the Calls syntax reference in reference/expressions and the assignment object description in reference/simple_stmts. Please tell me if I'm generally doing OK. If I'm not, please guide me to the right direction. -- A

[issue24136] document PEP 448: unpacking generalization

2015-07-07 Thread Konstantin Molchanov
Konstantin Molchanov added the comment: @vadmium thanks for the assistance! I'll kick off with the reference then. P.S. Am I the only one who doesn't receive any emails from the tracker? I never got the registration link or a follow-up notification from this issue. Am I missing

[issue24136] document PEP 448

2015-07-06 Thread Konstantin Molchanov
Konstantin Molchanov added the comment: Hi! I'd like to update the docs with the examples of the new syntax usage. This is my first contribution to the Python docs, so I'd like to ask for some assistance. I'm going to start with adding an example to the tutorial (https://docs

[issue21323] CGI HTTP server not running scripts from subdirectories

2014-07-06 Thread Konstantin S. Solnushkin
Konstantin S. Solnushkin added the comment: Hi, I am curious about the fate of this issue -- whether it will be recognised as a bug (possibly a regression bug). Remember, it worked in Python 3.3 but stopped working in 3.4. -- ___ Python tracker

[issue21785] __getitem__ and __setitem__ try to be smart when invoked with negative slice indices

2014-06-17 Thread Konstantin Tretyakov
Konstantin Tretyakov added the comment: Aha, I see. I knew I'd get bitten by not explicitly subclassing (object) one day. In any case, adding a reference to this issue into the docs of __getitem__ and __setitem__ would probably save someone some hours of utter confusion in the f

[issue21785] __getitem__ and __setitem__ try to be smart when invoked with negative slice indices

2014-06-17 Thread Konstantin Tretyakov
Konstantin Tretyakov added the comment: Do note that things are not as simple as "slices with negative indices are treated differently from scalar negative indicies". Namely, behaviour differs whether you use [] or .__getitem__, and whether you use [a:b] or [slice(a,b)]. This doe

[issue21785] __getitem__ and __setitem__ try to be smart when invoked with negative slice indices

2014-06-16 Thread Konstantin Tretyakov
New submission from Konstantin Tretyakov: Consider the following example: class A: def __getitem__(self, index): return True If you invoke A()[-1], everything is fine. However, if you invoke A()[-1:2], you get an "AttributeError: A instance has no attribute '__len__&#x

[issue21323] CGI HTTP server not running scripts from subdirectories

2014-04-21 Thread Konstantin S. Solnushkin
New submission from Konstantin S. Solnushkin: Somewhere between Python 3.3 and 3.4, a bug was introduced that forbids the "http.server" module, working in CGI server mode, to run scripts residing in subdirectories. This will break existing software that relies on this featur

[issue21177] ValueError: byte must be in range(0, 256)

2014-04-10 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: To clarify few things: - Yes, I know that 256 doesn't fit into byte. I was checking how bytes/bytearray are handling overflow. - I know that range() is a half-open interval. Yet this error message still gave me a "wtf" moment because I di

[issue21177] ValueError: byte must be in range(0, 256)

2014-04-08 Thread Konstantin Zemlyak
New submission from Konstantin Zemlyak: Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> bytearray([256]) Traceback (most rec

[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: Some more fun stuff with command-line (I'm cutting output to few essential lines for easier reading): e:\cpython\PCbuild\py.exe юникод.py ... Called with command line: .py run_child: about to run '"C:\Program Files (x86)\Python33\pyt

[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: There is something weird with my proposed fix. Right after submitting a bug with patch I've updated pythons on my system - 2.7.5 to 2.7.6, 3.3.2 to 3.3.3, and installed 3.4.0b1 - both 32- and 64-bit. Then my fixed py.exe stopped working. Then I

[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: I don't care much about debug output though it probably should be fixed. The point is that changing text mode of stdout has a weird side effect of fixing command-line arguments when invoking interactively from cm

[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak
Changes by Konstantin Zemlyak : Removed file: http://bugs.python.org/file33247/pylauncher-fix-launcing-unicode-filenames.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: Sorry, fixed whitespaces in the patch. -- Added file: http://bugs.python.org/file33248/pylauncher-fix-launcing-unicode-filenames.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak
New submission from Konstantin Zemlyak: Running `py.exe юникод.py` in cmd window fails: E:\>set PYLAUNCH_DEBUG=1 E:\>py юникод.py launcher build: 32bit launcher executable: Console File 'C:\Users\Zart\AppData\Local\py.ini' non-existent Using global configuration file 'C:\W

[issue17562] Invitation to connect on LinkedIn

2013-03-27 Thread Konstantin
New submission from Konstantin: LinkedIn I'd like to add you to my professional network on LinkedIn. - Konstantin Konstantin Aslanidi Author of opentradingsystem.com Greater New York City Area Confirm that you know Konstantin Aslanidi: https://www.linkedin.com/e/-3qcne3-hes

[issue16340] Decoding error due to byte-compiling venv scripts at install time

2012-10-28 Thread Konstantin Zemlyak
Changes by Konstantin Zemlyak : -- title: Decoding error at install time when byte-compiling venv scripts -> Decoding error due to byte-compiling venv scripts at install time ___ Python tracker <http://bugs.python.org/issu

[issue16340] Decoding error at install time when byte-compiling venv scripts

2012-10-27 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: Not at all. I have installed Python into "C:\Program Files (x86)\Python33". Also made a copy into "D:\Python33" and got the same results. The problem is in file contents (pyc/pyo files are binary, utf-8 fails to decode the

[issue16340] Decoding error in venv when byte-compiling stdlib

2012-10-27 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: Also current title is a bit wrong, since decoding error happens in runtime each time venv is invoked, while the source of the problem happens while byte-compiling stdlib at install time once. -- ___ Python

[issue16340] Decoding error in venv when byte-compiling stdlib

2012-10-27 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: If option to precompile python files is checked in installer, pydoc.py gets compiled into binary files Lib\venv\scripts\nt\__pycache__\pydoc.cpython33.pyc and Lib\venv\scripts\nt\__pycache__\pydoc.cpython33.pyo

[issue16340] Error: 'utf-8' codec can't decode byte 0x9e in position 0: invalid start byte

2012-10-27 Thread Konstantin Zemlyak
New submission from Konstantin Zemlyak: When installing python 3.3 under windows and checking "Compile .py files to byte code after installation" Lib/venv/scripts/nt/pydoc.py gets precompiled as well. This causes venv module to abort with "Error: 'utf-8' codec c

[issue11397] os.path.realpath() may produce incorrect results

2012-01-12 Thread Konstantin Nikitin
Changes by Konstantin Nikitin : -- nosy: +stromsund ___ Python tracker <http://bugs.python.org/issue11397> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11039] Use of 'L' specifier is inconsistent when printing long integers

2011-01-28 Thread Konstantin Osipov
New submission from Konstantin Osipov : I'm using a 64 bit system, but the issue is as well repeatable on 32 bit systems: kostja@shmita:~$ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits"

[issue3766] socket.socket.recv broken (unbearably slow)

2010-12-31 Thread Konstantin Osipov
Konstantin Osipov added the comment: I was able to observe the same issue: I'm using Python 2.6.5 on Ubuntu 10.0.4 LTS. My system is 64 bit Intel Core I7, Quad core, Linux kernel 2.6.32-generic x86_64, Ubuntu EGLIBC 2.11.1-0ubuntu7.5. A simple client TCP socket, which sends 35 bytes ov

[issue9942] Allow memory sections to be OS MERGEABLE

2010-10-27 Thread Konstantin Svist
Konstantin Svist added the comment: This issue sounds very interesting to me for a somewhat different reason. My problem is that I'm trying to run multiple processes on separate CPUs/cores with os.fork(). In short, the data set is the same (~2GB) and the separate processes do whatever

[issue9320] os.environ is global for threads

2010-07-21 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: Environment variables have always been process-wide. It doesn't deserve any special mention in threads documentation. -- nosy: +zart ___ Python tracker <http://bugs.python.org/i

[issue9092] static behavior of local variables

2010-06-27 Thread Konstantin
New submission from Konstantin : In [12]: def func(x=[]) : : L=x : L.append('a') : return L : In [13]: func() Out[13]: ['a'] In [14]: func() Out[14]: ['a', 'a'] In [15]: func() Out[15]: ['a', 'a&#x

[issue3244] multipart/form-data encoding

2010-06-26 Thread Konstantin Pelepelin
Konstantin Pelepelin added the comment: Did you test it against server-side form-data parser implementation? It will be useless if it won't work with most widespread implementations: PHP's and at least some others (consider some popular python web frameworks). MIME-compliance is

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: > Using the remote shell, those VS2008 env vars are not set and > so the build fails. Seems it doesn't load user profile. > The output is: > > VS2008 product dir: None - Software\Microsoft\VisualStudio\9.0 > VS2008 product dir: No

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: Tried msvc9compiler-py27.patch. find_vcvarsall() still works with the same result, while distutils.msvc9compiler.VS_BASE has been changed. :: >>> distutils.msvc9compiler.find_vcvarsall(9.0) u'c:\\Program Files (x86)\\Mi

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: 64-bit Windows, 64-bit cmd.exe, 64-bit python, not patched:: D:\>"c:\Program Files\Python27\python.exe" Python 2.7rc1 (r27rc1:81787, Jun 6 2010, 20:03:36) [MSC v.1500 64 bit (AMD64)] on win32 Type "

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Konstantin Zemlyak
Konstantin Zemlyak added the comment: Win2003 x64, VS2008, vanilla python 2.7rc1 amd64 from python.org. Building python packages with C extensions works fine. Tested on simplejson, jinja2 (with enabled speedups) and PIL. -- nosy: +zart ___ Python

[issue7021] subprocess.Popen doesn't work without "executable="

2009-09-29 Thread Konstantin M. Khankin
Konstantin M. Khankin added the comment: Sorry, it's my fault. I must write it as list, not as string -- status: open -> closed ___ Python tracker <http://bugs.python.or

[issue7021] subprocess.Popen doesn't work without "executable="

2009-09-29 Thread Konstantin M. Khankin
Konstantin M. Khankin added the comment: And I still can't make it works. Now sendmail is called but says that "Recipient addresses must be specified on the command line or via the - -- ___ Python tracker <http://bugs.python.

[issue7021] subprocess.Popen doesn't work without "executable="

2009-09-29 Thread Konstantin M. Khankin
New submission from Konstantin M. Khankin : I'm need to call sendmail. So I wrote: http://paste.org.ru/?imuoia os.stat there is to confirm that python can have access to sendmail executable That code returned an exception: http://paste.org.ru/?jbxadp But documentation says, that I can