stijn added the comment:
New here, but I think this is the correct issue to get info about this unicode
problem. On the windows console:
> chcp
Active code page: 437
> type utf.txt
Привет
> chcp 65001
Active code page: 65001
> type utf.txt
Привет
> python --version
stijn added the comment:
Drekin: you're right for both input and output. Using encoding with plain
open() works just fine and using the latest win-unicode-console does give
correct output for the second example as well. Thanks!
--
___
P
Stijn Hoop added the comment:
I hereby put my patch in the public domain and/or under any desired
copyright license as required by the Python project to accept it.
Regards,
Stijn Hoop
On Fri, 22 Oct 2021 21:03:26 +
Richard van den Berg wrote:
> Richard van den Berg added
&g
Stijn Hoop added the comment:
Still seeing this on Fedora 18 / Python 2.7.3.
I only have loopback in /etc/hosts
[TUE\shoop@pclin281] <~> cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain loca
Stijn Hoop added the comment:
OK, fair enough.
>From reading sources, it appears that hostname is using getaddrinfo(3) on
>kernelhostname with hints->ai_flags & AI_CANONNAME, while Lib/socket.py simply
>uses gethostbyaddr(kernelhostname), and falls back on kernelhostname in
Stijn Hoop added the comment:
Attached is a very lightly tested patch that matches hostname -f behaviour on
my system. I suspect this should be OK but it definitely needs more testing
than just my system...
--
keywords: +patch
Added file: http://bugs.python.org/file29919/python2.7
Stijn Hoop added the comment:
OK, dumping my current findings here, as I'm still not sure what the expected
results should be.
First of all, Lib/socket.py calls gethostbyaddr with a name. As in, gethostby
_ADDR_ with a name.
This works because Modules/socketmodule.c internally uses seti
Stijn Hoop added the comment:
So after a good nights sleep: does it not make sense to use the canonical
hostname iff the name argument is not present / empty? Otherwise, fall back to
the documented steps? That way extra API is avoided, and I can't think of a
case where you would rather
New submission from Stijn van Drongelen <[EMAIL PROTECTED]>:
In the current revision of 2to3 (63319), somebody forgot a comma at the
end of line 27 of lib2to3/fix_imports.py, resulting in a syntax error.
--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
New submission from Stijn van Drongelen <[EMAIL PROTECTED]>:
In the current revision of 2to3 (63319), somebody forgot a comma at the
end of line 27 of lib2to3/fix_imports.py, resulting in a syntax error.
--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
Stijn van Drongelen <[EMAIL PROTECTED]> added the comment:
Reproducable with Python3.0rc1 on Debian lenny, only when nscd is running.
Not a Python bug.
--
nosy: +Tinctorius
versions: +Python 3.0
___
Python tracker <[EMAIL PROTECTE
New submission from Stijn van Drongelen :
I have two files, named time.py and time_.py, with the same contents:
def foo():
"""Returns 1.
>>> foo()
1
"""
return 1
When I run
python3 -m doctest -v
Stijn van Drongelen added the comment:
Reproducible in Python 3.8.7 and 3.9.1.
--
versions: +Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue42
13 matches
Mail list logo