Pierre Lecointre added the comment:
Un grand merci pour cette réponse !
La substitution index par pypi a fonctionné.
Bon week-end
2012/3/15 Alexis Metaireau
>
> Alexis Metaireau added the comment:
>
> The APIs of distutils2 have changed. the "index" module is now
New submission from Pierre Ossman :
These three things do not mix:
- AttributeError
- Threads
- Object methods
An unhandled AttributeError thrown in a thread will not call sys.excepthook if
the thread's start function is a class/object method.
Test case:
import sys
import thread
New submission from Pierre Ossman :
sudo breaks exception handling in Python in some subtle way. The following test
program works fine when run directly, but breaks when run through sudo:
#!/usr/bin/python
import time
def a():
try:
while True
Pierre Ossman added the comment:
Indeed. I assume old style classes are still supported though?
--
___
Python tracker
<http://bugs.python.org/issue14474>
___
___
Pierre Ossman added the comment:
Well that was fast. :)
Sounds very much like the same bug I'm seeing here, yes. Unfortunately I'm not
sure it's sufficient for us to rely on the distributions to update their sudo
packages. A workaround would be preferable. I'll see if I
Change by Pierre Glaser :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue36368>
___
___
Pyth
Change by Pierre Glaser :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35933>
___
___
Pyth
Change by Pierre Glaser :
--
nosy: +pierreglaser
___
Python tracker
<https://bugs.python.org/issue24882>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Pierre Glaser :
--
nosy: +pierreglaser
___
Python tracker
<https://bugs.python.org/issue36950>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pierre Glaser added the comment:
Lib/test/test_asyncio/utils.py defines a similar helper:
def run_until(loop, pred, timeout=30):
deadline = time.monotonic() + timeout
while not pred():
if timeout is not None:
timeout = deadline - time.monotonic()
if
Change by Pierre Glaser :
--
keywords: +patch
pull_requests: +13318
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36950>
___
___
Py
Pierre Glaser added the comment:
Just did so.
--
___
Python tracker
<https://bugs.python.org/issue36950>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Pierre Glaser :
The new multiprocessing.managers.SharedMemoryManager spawns a server that
delivers memory segments to a parent Python process. If the parent process
terminates unexpectedly, we should now make the manager process notice this
termination it using the recent
Change by Pierre Glaser :
--
keywords: +patch
pull_requests: +13360
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36977>
___
___
Py
Pierre Glaser added the comment:
>From a quick skim at the man page of memfd_create, this looks promising.
--
___
Python tracker
<https://bugs.python.org/issu
New submission from Pierre Glaser :
Hi,
Following https://bugs.python.org/issue26836, I started thinking about using
memfd_create instead of shm_open for creating shared-memory segments in
multiprocessing.shared_memory.
The main advantage of memfd_create over shm_open is that the generated
Change by Pierre Glaser :
--
pull_requests: +14108
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/14286
___
Python tracker
<https://bugs.python.org/issu
Change by Pierre Glaser :
--
keywords: +patch
pull_requests: +14110
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14288
___
Python tracker
<https://bugs.python.org/issu
Change by Pierre Glaser :
--
keywords: +patch
pull_requests: +14319
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14503
___
Python tracker
<https://bugs.python.org/issu
New submission from Pierre Chopin :
the imghdr library only checks for the presence of (b'JFIF', b'Exif') in the
header, which is excluding some valid JPEG file. This is an example of not
recognised ile
--
files: e2006bd7-51d7-4554-9738-ea13207fd104.jpg
messages:
Pierre Chopin added the comment:
This is actually a duplicate of bpo-16512, i am closing this.
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Pierre Chopin :
--
pull_requests: +14651
pull_request: https://github.com/python/cpython/pull/14862
___
Python tracker
<https://bugs.python.org/issue16
Pierre Glaser added the comment:
The root of the error is that struct.pack_into starts by memsetting the
underlying memory area with NULL bytes before filling the data with memcpy. If
ShareableList._get_packing_format is called between the two operations (through
a concurrent __getitem__
Pierre Glaser added the comment:
Sure, although I won't be able to merge it. Make sure you ping a core-dev such
as pitrou or davin :-)
--
___
Python tracker
<https://bugs.python.org/is
Change by Pierre Glaser :
--
pull_requests: +14807
pull_request: https://github.com/python/cpython/pull/15058
___
Python tracker
<https://bugs.python.org/issue28
Pierre Quentel added the comment:
Thanks for the comments. I agree with some of them, and have improved the PR
accordingly, but I don't agree on the opinion that HTTP compression is beyond
the scope of http.server : like browser cache (which also implies a negociation
between clien
New submission from Pierre Quentel:
I propose to add a mapping of file extension .json to mime type
"application/json".
This is registered in https://www.iana.org/assignments/media-types
--
components: Library (Lib)
messages: 297494
nosy: quentel, r.david.murray
priori
Pierre Quentel added the comment:
Is Python-ideas the appropriate place to get input from other core devs ?
--
___
Python tracker
<http://bugs.python.org/issue30
Pierre Quentel added the comment:
Thank you Terry and Victor for your comments. I understand that you agree on
adding HTTP compression to http.server, but don't want it to be enabled by
default.
@terry.reedy
With the implementation proposed in the Pull Request, to disable compressi
Pierre Quentel added the comment:
Maybe it's me who is doing things wrong, but when I run
Lib/test/test_httpservers.py I get this strange error :
Traceback (most recent call last):
File "C:\cpython\Lib\test\test_httpservers.py", line 7, in
from http.server import BaseHTT
Pierre Quentel added the comment:
In the latest version of the Pull Request
(https://github.com/python/cpython/pull/2078/commits/6466c93555bec521860c57e832b691fe7f0c6c20)
:
- compression is disabled by default (compressed_types is set to [])
- as suggested by Chris Barker in the discussion on
Pierre Quentel added the comment:
@martin.panter
For HTTP/1.0, since chunked transfer is not supported, and storage in a
temporary file is also not an option, I see 2 possible solutions :
- give up compressing big files - it would be a pity, compression is actually
made for them...
- compress
Pierre Quentel added the comment:
@martin.panter
Please forget my previous message. There is a 3rd solution, and you gave it :
no Content-Length and close the connection when all (compressed) data has been
sent.
--
___
Python tracker
<h
Pierre Quentel added the comment:
Thanks for telling me. I must have run the test hundreds of times now, on a
Windows 7 PC, and this bug never occured.
Just for my information, why do you add temp.flush() in the "with" block ?
I thought the context manager took care of this.
2017-0
Pierre Quentel added the comment:
In the latest version of the PR, following Martin's comments :
- apply Chunk Transfer for HTTP/1.1 only, change implementation of compression
for previous protocols (send gzipped data without Content-Length)
- use http.cookiejar to parse the Accept-Enc
Pierre Quentel added the comment:
On Python-ideas someone asked if other compressions could be supported besides
gzip.
The latest version of the PR adds a mechanism for that :
SimpleHTTPRequestHandler has a new attribute "compressions", a dictionary that
maps compression encodings
Change by Pierre Quentel :
--
nosy: +quentel
___
Python tracker
<https://bugs.python.org/issue20504>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Pierre Quentel :
--
pull_requests: +9881
___
Python tracker
<https://bugs.python.org/issue20504>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Pierre Quentel :
--
pull_requests: +9885
___
Python tracker
<https://bugs.python.org/issue20504>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pierre Quentel added the comment:
I have submitted PR #10638 to fix this issue.
--
___
Python tracker
<https://bugs.python.org/issue20504>
___
___
Python-bug
Change by Pierre Quentel :
--
pull_requests: +10015
___
Python tracker
<https://bugs.python.org/issue2>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pierre Quentel added the comment:
I have submitted another Pull Request (10771) that seems to fix the bug while
passing all the tests in test_cgi.py
--
nosy: +quentel
___
Python tracker
<https://bugs.python.org/issue27
New submission from Pierre Glaser :
Pickler objects provide a dispatch_table attribute, where the user can specify
custom saving functions depending on the object-to-be-saved type. However, for
performance purposes, this table is predated (in the C implementation only) by
a hardcoded switch
Pierre Glaser added the comment:
Pickler objects provide a dispatch_table attribute, where the user can specify
custom saving functions depending on the object-to-be-saved type. However, for
performance purposes, this table is predated (in the C implementation only) by
a hardcoded switch that
New submission from Pierre Glaser :
cell objects are containers for the free variables of functions defined in a
local scope. They are located in a function's __closure__ attribute (when
it is not None). A cell is a very simple object, with a single (optional, e.g
the cell can be
Change by Pierre Glaser :
Added file: https://bugs.python.org/file48106/test_cell.py
___
Python tracker
<https://bugs.python.org/issue35911>
___
___
Python-bugs-list m
Change by Pierre Glaser :
--
pull_requests: +11738, 11739
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35911>
___
___
Python-
Change by Pierre Glaser :
--
pull_requests: +11738
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35911>
___
___
Python-bugs-list mai
New submission from Pierre Glaser :
Hello all,
This 16-year old commit (*) allows an object's state to be updated
using its slots instead of its __dict__ at unpickling time. To use this
functionality, the state keyword-argument of Pickler.save_reduce (which maps to
the third item of the
Pierre Glaser added the comment:
It turns out that both pickle and _pickle implement this feature, but the
behavior is inconsistent.
- As a reminder, instances of slotted classes do not have a dict attribute (1)
- On the other side, when pickling slotted class instances, __getstate__ can
Change by Pierre Glaser :
Added file: https://bugs.python.org/file48112/test_slots.py
___
Python tracker
<https://bugs.python.org/issue35933>
___
___
Python-bugs-list m
Change by Pierre Glaser :
Removed file: https://bugs.python.org/file48111/test_slots.py
___
Python tracker
<https://bugs.python.org/issue35933>
___
___
Python-bugs-list m
Change by Pierre Glaser :
Removed file: https://bugs.python.org/file48112/test_slots.py
___
Python tracker
<https://bugs.python.org/issue35933>
___
___
Python-bugs-list m
Change by Pierre Glaser :
Added file: https://bugs.python.org/file48113/test_slots.py
___
Python tracker
<https://bugs.python.org/issue35933>
___
___
Python-bugs-list m
Pierre Glaser added the comment:
Thanks Antoine and Raymond for the feedback.
Indeed, a subclass of a slotted class can have a dict: I enriched the script,
pickling_depickling instances of such subclasses, with the length-2 tuple
__getstate__ method, and made sure their attributes were
Change by Pierre Glaser :
Removed file: https://bugs.python.org/file48113/test_slots.py
___
Python tracker
<https://bugs.python.org/issue35933>
___
___
Python-bugs-list m
Change by Pierre Glaser :
Added file: https://bugs.python.org/file48114/test_slots.py
___
Python tracker
<https://bugs.python.org/issue35933>
___
___
Python-bugs-list m
Change by Pierre Glaser :
--
keywords: +patch
pull_requests: +11981
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35933>
___
___
Py
Pierre Glaser added the comment:
I added a PR with a small patch to document this behavior and reconcile
_pickle.c and pickle.py
Some explanations on why I am pushing this forward:
Pickling instances of classes/subclasses with slots is done natively for pickle
protocol >= 2. Mention
Pierre Quentel added the comment:
I close this issue and will open a more specific one for the rewriting of
parse_multipart()
--
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bug
New submission from Pierre Quentel:
In the cgi module, the parse_multipart() function duplicates code from
FieldStorage, and the result is not compliant with that of FieldStorage for
requests sent with multipart/form-data : for non-file fields, the value
associated with a key is a list of
Changes by Pierre Quentel :
--
pull_requests: +1162
___
Python tracker
<http://bugs.python.org/issue29979>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Pierre Quentel :
--
pull_requests: +1163
___
Python tracker
<http://bugs.python.org/issue29979>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pierre Quentel added the comment:
Senthil,
Can you take a look at the Pull Request when you have time ? The correct PR is
#991, not #990.
--
___
Python tracker
<http://bugs.python.org/issue29
New submission from Pierre Quentel:
The server in http.server currently doesn't support HTTP compression.
I propose to implement it in the method send_head() of SimpleHTTPRequestHandler
this way : for each GET request, if the request header "Accept-Encoding" is
present and
Changes by Pierre Quentel :
--
type: -> enhancement
___
Python tracker
<http://bugs.python.org/issue30576>
___
___
Python-bugs-list mailing list
Unsubscrib
Pierre Quentel added the comment:
I propose this as a minor improvement to the built-in server, like the support
of browser cache that will be included in Python 3.7 (issue #29654, PR #298). I
understand that the server is not supposed to be full-featured, but HTTP
compression is widespread
Pierre Quentel added the comment:
The compression is done on the fly : if compression criteria are satisfied, the
original content is gzipped, either in memory or on a temporary file on disk,
depending on the file size.
The gzipped content is not cached, but since the server now supports
Changes by Pierre Quentel :
--
pull_requests: +2142
___
Python tracker
<http://bugs.python.org/issue30576>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pierre Glaser added the comment:
Update:
Instead of changing permission on some attributes of function objects
(__globals__ and __closure__), we added an optional argument called
state_setter to save_reduce. This expects a callable that will be saved inside
the object's pickle string
New submission from Pierre Glaser :
The examples of the new shared_memory module using SharedMemoryManager try to
import the class from multiprocessing.shared_memory instead of
multiprocessing.managers, making them fail.
--
assignee: docs@python
components: Documentation
files: 0001
Change by Pierre Glaser :
--
pull_requests: +12394
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36364>
___
___
Python-bugs-list mai
New submission from Pierre Glaser :
When starting a SharedMemoryManager in an interactive session, any
KeyboardInterrupt event will be transmitted to the (sub)process running the
shared memory server, which causes the Manager to be unusable thereafter:
>>> from multiprocessing
Change by Pierre Glaser :
--
keywords: +patch
pull_requests: +12435
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36338>
___
___
Py
Change by Pierre Glaser :
--
pull_requests: +12436
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36368>
___
___
Python-bugs-list mai
Pierre Glaser added the comment:
Done.
--
___
Python tracker
<https://bugs.python.org/issue36368>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Pierre Glaser :
--
pull_requests: +12449
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35900>
___
___
Python-bugs-list mai
Change by Pierre Glaser :
--
pull_requests: +12525
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36338>
___
___
Python-bugs-list mai
Change by Pierre Glaser :
--
pull_requests: +12526
___
Python tracker
<https://bugs.python.org/issue36338>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Pierre Glaser :
--
pull_requests: +12530
___
Python tracker
<https://bugs.python.org/issue35900>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Pierre Glaser :
Hi all,
Olivier Grisel, Thomas Moreau and myself are currently working on increasing
the range of action of the semaphore_tracker in Python.
multiprocessing.semaphore_tracker is a little known module, that launches a
server process used to track the life
Change by Pierre Glaser :
--
keywords: +patch
pull_requests: +13132
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36867>
___
___
Py
Change by Pierre Glaser :
--
pull_requests: +13146
___
Python tracker
<https://bugs.python.org/issue36338>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pierre Glaser added the comment:
Shared memory segments are now tracked by the brand new resource_tracker!
Thanks Antoine for the review.
Does anyone have an opinion on introducing a public API for users to make the
resource_tracker track resources of their choice?
What We have in mind is
Pierre Glaser added the comment:
Yes, one test I wrote in an unrelated commit does not unlink a memory segment.
Now the ResourceTracker complains. Fixing it now.
--
___
Python tracker
<https://bugs.python.org/issue36
Pierre Glaser added the comment:
Actually, I was properly unlinking the shared_memory segments. The warning
messages are due to bad interactions between the ResourceTracker and the
SharedMemoryManager object. In this particular case, it's easy to change a
little bit the problematic te
Change by Pierre Glaser :
--
pull_requests: +13182
___
Python tracker
<https://bugs.python.org/issue36867>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pierre Glaser added the comment:
We can do that, or maybe we can try to wait on the `resource_tracker's` pid?
--
___
Python tracker
<https://bugs.python.org/is
Change by Pierre Glaser :
--
pull_requests: +13203
___
Python tracker
<https://bugs.python.org/issue36867>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pierre Glaser added the comment:
Thanks for the fix Antoine.
--
___
Python tracker
<https://bugs.python.org/issue36894>
___
___
Python-bugs-list mailin
New submission from Pierre Thibault :
> help(filter)
Help on built-in function filter in module __builtin__:
filter(...)
filter(function or None, sequence) -> list, tuple, or string
Return those items of sequence for which function(item) is true. If
function is None, retu
Pierre Thibault added the comment:
I guess it does since it gives false information.
2018-04-30 18:05 GMT-04:00 Anthony Flury :
>
> Anthony Flury added the comment:
>
> Strictly speaking the official Python2 reference document isn't a great
> example - for instance:
>
Pierre Quentel added the comment:
According to PEP 492, async and await should have been deprecated in 3.5 and
3.6, but I don't think they have been :
await = 1
def f(async=True):
...
don't raise any deprecation warning in 3.6.
Since version 3.7 will break existing c
Pierre Quentel added the comment:
I think I have made all the changes requested in the code review (many thanks
to the reviewer !).
I see that the Pull Request has been flagged "awaiting core review". With the
deadline for Python 3.7 coming soon (11 weeks), is there a chanc
Pierre Quentel added the comment:
On the Github site Raymond Hettinger is mentioned as the reviewer. I don't know
how to contact him, can anyone ask him if he can review the PR on time for
inclusion in Python 3.7 ?
I understand that it's difficult to find time for this and that
New submission from Pierre Denis :
Python returns inconsistent results when negative infinity is raised to a
non-integer power. This happens with the ** operator as well as with the pow
and math.pow functions. The most blatant symptom occurs with power 0.5, which
is expectedly equivalent to a
Pierre Denis added the comment:
Thanks, Tim & Mark. This indeed clarifies and gives a good rationale on Python
implementation. Nevertheless, despite the authority arguments, I continue to
wonder what is the rationale for these specifications. Probably the debate
should move to the stand
Pierre Denis added the comment:
> So this justifies things like `sqrt(-0.0)` giving a zero result (rather than
> being considered invalid)
Well, I didn’t noticed that the wolf was already in the henhouse! This choice
seems disputable for me because it is precisely a case where f(-0.0)
New submission from Pierre Chatelier :
Delay-loading of the python DLL is impossible when using some C macros.
For instance, PyLong_Check() is OK, but PyBool_Check() or PyFunc_Check()
will eventually raise a link error.
This is due to the fact that PyBool_Check() directly use the PyBool_Type
Pierre Quentel added the comment:
Brett,
Thanks for taking the time, you and other core devs, to review the PR and to
explain why you took this decision. I am disappointed by the result, but I
understand the reasons, having to face the same maintenance issues, on a much
smaller scale, with
101 - 200 of 281 matches
Mail list logo