[issue1205] urllib fail to read URL contents, urllib2 crash Python

2007-09-26 Thread jos


jos
 added the comment:

Firefox 2.0.0.7 and Safari 2.0.4 can who this page.

In my opinion, Python urllib should be more practical and
provide a way to read this kind of page.

"In general, an implementation must be conservative
in its sending behavior, and liberal in its receiving behavior."
[RFC 791 3.2]

--
nosy: +josm

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1205>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1205] urllib fail to read URL contents, urllib2 crash Python

2007-09-27 Thread jos


jos
 added the comment:

Attached a patch for this problem.
This one just ignores the buggy chunk-size and close the connection.
As gagenellina said earlier, this might not be a good way
to fix this, but I could not come up with better solution.

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1205>
__

httplib.diff
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1276] LookupError: unknown encoding: X-MAC-JAPANESE

2007-10-13 Thread jos

New submission from 
jos
:

When I compile Python-3.0a1 on Mac OS X with Japanese locale,
I've got LookupError like below.

==
running build_scripts
creating build/scripts-3.0
Traceback (most recent call last):
  File "./setup.py", line 1572, in 
main()
  File "./setup.py", line 1567, in main
'Lib/smtpd.py']
  File "/private/tmp/Python-3.0a1/Lib/distutils/core.py", line 148, in setup
dist.run_commands()
  File "/private/tmp/Python-3.0a1/Lib/distutils/dist.py", line 943, in
run_commands
self.run_command(cmd)
  File "/private/tmp/Python-3.0a1/Lib/distutils/dist.py", line 963, in
run_command
cmd_obj.run()
  File "/private/tmp/Python-3.0a1/Lib/distutils/command/build.py", line
106, in run
self.run_command(cmd_name)
  File "/private/tmp/Python-3.0a1/Lib/distutils/cmd.py", line 317, in
run_command
self.distribution.run_command(command)
  File "/private/tmp/Python-3.0a1/Lib/distutils/dist.py", line 963, in
run_command
cmd_obj.run()
  File
"/private/tmp/Python-3.0a1/Lib/distutils/command/build_scripts.py", line
51, in run
self.copy_scripts()
  File
"/private/tmp/Python-3.0a1/Lib/distutils/command/build_scripts.py", line
82, in copy_scripts
first_line = f.readline()
  File "/private/tmp/Python-3.0a1/Lib/io.py", line 1259, in readline
decoder = self._decoder or self._get_decoder()
  File "/private/tmp/Python-3.0a1/Lib/io.py", line , in _get_decoder
make_decoder = codecs.getincrementaldecoder(self._encoding)
  File "/private/tmp/Python-3.0a1/Lib/codecs.py", line 951, in
getincrementaldecoder
decoder = lookup(encoding).incrementaldecoder
LookupError: unknown encoding: X-MAC-JAPANESE
make: *** [sharedmods] Error 1
==

This problem happens for lack of appropriate codec
so also occurs in apps using getdefaultencoding.

After patching Tools/unicode/Makefile and
running make generates build/mac_japanese.py, mac-japanese codec.

--
components: Build, Demos and Tools, Library (Lib), Macintosh, Unicode
files: x_mac_japanese.diff
messages: 56386
nosy: josm
severity: normal
status: open
title: LookupError: unknown encoding: X-MAC-JAPANESE

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1276>
__

x_mac_japanese.diff
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1533] Bug in range() function for large values

2007-11-30 Thread jos

jos added the comment:

Is this a bug?
  print range(MyInt(2**64), MyInt(2**64+10)) 
produced
 TypeError: range() integer start argument expected, got instance.

print range(int(MyInt(2**64)), int(MyInt(2**64+10)))
should work.

--
nosy: +josm

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1533>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1205] urllib fail to read URL contents, urllib2 crash Python

2007-12-01 Thread jos

jos added the comment:

included torriem's fix.

IMHO, there is no clear solution for this
because this is due to HTTP server's "bug"
and a bug is the one that you can't predict accurately...

Added file: http://bugs.python.org/file8841/httplib.py.diff

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1205>
__

httplib.py.diff
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1706039] Added clearerr() to clear EOF state

2007-12-01 Thread jos

jos added the comment:

Any chance to get this fix commmited in?

--
type:  -> behavior

_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1706039>
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44595] round() gives wrong result

2021-07-09 Thread Jos Dechamps


New submission from Jos Dechamps :

round(0.3368655,6) returns 0.336865 instead of 0.336866

--
messages: 397238
nosy: dechamps
priority: normal
severity: normal
status: open
title: round() gives wrong result
type: behavior

___
Python tracker 
<https://bugs.python.org/issue44595>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24589] Wrong behavior for list of lists

2015-07-08 Thread Jos Dechamps

New submission from Jos Dechamps:

After creating a list of lists, changing one element, leads to changes of all 
the elements:

>>> v=[[]]*10
>>> v
[[], [], [], [], [], [], [], [], [], []]
>>> v[3].append(3)
>>> v
[[3], [3], [3], [3], [3], [3], [3], [3], [3], [3]]
>>> 
>>> v=[[]]*10
>>> v
[[], [], [], [], [], [], [], [], [], []]
>>> v[3] += [3]
>>> v
[[3], [3], [3], [3], [3], [3], [3], [3], [3], [3]]
>>>

--
components: Interpreter Core
messages: 246450
nosy: dechamps
priority: normal
severity: normal
status: open
title: Wrong behavior for list of lists
type: behavior
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue24589>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12873] 2to3 incorrectly handles multi-line imports from __future__

2015-10-17 Thread Jos de Kloe

Jos de Kloe added the comment:

still having this issue with 2to3 from python-tools-2.7.8-11 as packaged by 
Fedora 21.
Any progress since 2011?

--
nosy: +jdekloe

___
Python tracker 
<http://bugs.python.org/issue12873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com