[issue2126] BaseHTTPServer.py

2008-02-16 Thread June Kim

Changes by June Kim:


--
components: Library (Lib)
nosy: juneaftn, rhettinger
severity: normal
status: open
title: BaseHTTPServer.py
type: behavior
versions: Python 2.5

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



[issue2126] BaseHTTPServer.py and long POST from IE

2008-02-16 Thread June Kim

New submission from June Kim:

http://bugs.python.org/issue430160
http://bugs.python.org/issue427345

These two issues refer to the same bug, which occurs when there is a
POST from an Internet Explorer and the POST's content is long enough.
The issue was resolved by changing the CGIHTTPServer.py to consume the
remaining garbage. However, the bug potentially remains with
BaseHTTPServer.py(and hence its descendants like SimpleHTTPServer, and
3rd party libraries like MoinMoin's stand alone server).

People should have the knowledge of the IE POST bug and put the code
for treating it everytime when they use BaseHTTPServer.

Simple way to solve this is inserting the garbage consuming code in
the "finish" method:

while select.select([self.rfile], [],[],0)[0]:
   if not self.rfile.read(1): break

--
title: BaseHTTPServer.py -> BaseHTTPServer.py and long POST from IE

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



[issue2126] BaseHTTPServer.py fails long POST from IE

2008-02-16 Thread June Kim

Changes by June Kim:


--
title: BaseHTTPServer.py and long POST from IE -> BaseHTTPServer.py fails long 
POST from IE

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



[issue2129] Link error of gethostbyaddr and gethostname in Python Manuals (the chm file)

2008-02-16 Thread June Kim

New submission from June Kim:

Finding gethostname and gethostbyaddr entities from the index tab and 
clicking them in Python25.chm results in showing up the wrong section 
of 14.1.1 Process Parameters, instead of the proper section 17.2 
socket.

--
components: Documentation
messages: 62459
nosy: juneaftn
severity: minor
status: open
title: Link error of gethostbyaddr and gethostname in Python Manuals (the chm 
file)
type: behavior
versions: Python 2.5

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



[issue35627] multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1

2018-12-31 Thread June Kim


Change by June Kim :


--
components: Library (Lib)
nosy: June Kim
priority: normal
severity: normal
status: open
title: multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1
type: behavior
versions: Python 3.7

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



[issue35627] multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1

2018-12-31 Thread June Kim


New submission from June Kim :

## Test code ##
## Modified a bit from the original written by Doug Hellmann
## https://pymotw.com/3/multiprocessing/communication.html

import multiprocessing
import time


class Consumer(multiprocessing.Process):
def __init__(self, task_queue, result_queue):
multiprocessing.Process.__init__(self)
self.task_queue = task_queue
self.result_queue = result_queue

def run(self):
proc_name = self.name
while True:
print('Getting task')
next_task = self.task_queue.get()
print(f'task got: {next_task}')
if next_task is None:
print('{}: Exiting'.format(proc_name))
self.task_queue.task_done()
break
print('{}: {}'.format(proc_name, next_task))
answer = next_task()
self.task_queue.task_done()
self.result_queue.put(answer)


class Task:
def __init__(self, a, b):
self.a = a
self.b = b

def __call__(self):
time.sleep(0.1)
return '{self.a} * {self.b} = {product}'.format(
self=self, product=self.a * self.b)

def __str__(self):
return '{self.a} * {self.b}'.format(self=self)


def test():
tasks = multiprocessing.JoinableQueue()
results = multiprocessing.Queue()
num_consumers = multiprocessing.cpu_count() * 2
print('Creating {} consumers'.format(num_consumers))
consumers = [Consumer(tasks, results) for i in range(num_consumers)]
[w.start() for w in consumers]
num_jobs = 10
print('Putting')
[tasks.put(Task(i, i)) for i in range(num_jobs)]
print('Poisoning')
[tasks.put(None) for i in range(num_consumers)]
print('Joining')
tasks.join()
while num_jobs:
result = results.get()
print('Result:', result)
num_jobs -= 1

###
1. This code works perfectly in 3.7.1 but halts the main process in 3.7.2
2. It seems the JoinableQueue is empty when it is accessed by processes.
3. IMHO, resource sharing mechanism in multiprocessing.queue seems not working 
properly.

--

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



[issue35627] multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1

2018-12-31 Thread June Kim


June Kim  added the comment:

Here is my environment

---system
CPU: Intel i5 @2.67GHz
RAM: 8G
OS: Windows 10 Home (64bit)
OS version: 1803
OS build: 17134.472

---python
version1: 3.7.1 AMD64 on win32
version2: 3.7.2 AMD64 on win32
Python path: (venv)/Scripts/python.exe
IDE: VS Code(1.30.1)
Terminal: Git Bash

--

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