Change by Giampaolo Rodola' :
--
pull_requests: +12658
stage: resolved -> patch review
___
Python tracker
<https://bugs.python.org/issue17561>
___
___
Python-
Giampaolo Rodola' added the comment:
Patch committed as of:
https://github.com/python/cpython/commit/eb7e29f2a9d075accc1ab3faf3612ac44f5e2183
For posterity, since the API evolved since the original proposal (as per PR
review/suggestions), this is the final incarnation:
# IPv4 only
Change by Giampaolo Rodola' :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Giampaolo Rodola' added the comment:
New changeset eb7e29f2a9d075accc1ab3faf3612ac44f5e2183 by Giampaolo Rodola in
branch 'master':
bpo-35934: Add socket.create_server() utility function (GH-11784)
https://github.com/python/cpython/commit/eb7e29f2a9d075accc1ab3faf3612ac44f5e2183
Giampaolo Rodola' added the comment:
sendfile() on BSD/OSX is complicated by the headers/trailers args. You'll have
to take that into account in the retry logic, adding unnecessary complexity.
Since sendfile() may already return fewer bytes than requested (e.g.
non-blocking sockets or big
Change by Giampaolo Rodola' :
--
nosy: +giampaolo.rodola
___
Python tracker
<https://bugs.python.org/issue32941>
___
___
Python-bugs-list mailing list
Unsub
Change by Giampaolo Rodola' :
--
title: os.sendfile() on BSD OSs and macOS does not return bytes sent on EINTR
-> os.sendfile() on BSD and macOS does not return bytes sent on EINTR
___
Python tracker
<https://bugs.python.org/issu
Change by Giampaolo Rodola' :
--
nosy: +rosslagerwall
___
Python tracker
<https://bugs.python.org/issue36488>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Giampaolo Rodola' :
>From "man sendfile" on both OSX and FreeBSD:
<<[EINTR] A signal interrupted sendfile() before it could be completed. If
specified, the number of bytes successfully sent will be returned in *len.>>
Right now we catch EINTR and
Giampaolo Rodola' added the comment:
Merged. I'm agnostic about backporting IPPROTO_IPV6 (or others) on < 3.8 so
I'll leave it up to somebody else to decide/implement.
--
status: open -> pending
versions: -Python 3.7
___
Python tracker
Giampaolo Rodola' added the comment:
New changeset 3eca28c61363a03b81b9fb12775490d6e42d8ecf by Giampaolo Rodola in
branch 'master':
bpo-29515: add missing socket.IPPROTO_* constants on Windows (GH-12183)
https://github.com/python/cpython/commit/3eca28c61363a03b81b9fb12775490d6e42d8ecf
Giampaolo Rodola' added the comment:
I'd like to move forward with this in order to fix issue17561. If there are no
complaints I'm gonna merge this in ~ a week.
--
___
Python tracker
<https://bugs.python.org/issue29
Change by Giampaolo Rodola' :
--
nosy: -giampaolo.rodola
___
Python tracker
<https://bugs.python.org/issue36256>
___
___
Python-bugs-list mailing list
Unsub
Giampaolo Rodola' added the comment:
Little update about this. According to:
http://man7.org/linux/man-pages/man2/copy_file_range.2.html
...it seems glibc 2.27 released on 2018-02-01 includes copy_file_range(). I'm
not the best candidate for giving advice on C syscalls
definitions
Giampaolo Rodola' added the comment:
Hello. This is something I needed so I decided to implement it by taking
inspiration from pytest's --durations=N argument, which basically does the same
(except that it uses 0.XX precision instead of 0.XXX). PR at:
https://github.com/python/cpython/pull
Change by Giampaolo Rodola' :
--
pull_requests: +12254
___
Python tracker
<https://bugs.python.org/issue4080>
___
___
Python-bugs-list mailing list
Unsubscribe:
Giampaolo Rodola' added the comment:
I'm not sure I understand the issue, but setting IPV6_V6ONLY to 0 by default is
not an option because asyncio wants to serve IPv4 and IPv6 with 2 distinct
sockets on purpose. The reason for that is because when an IPv4 connection
occurs we want
Giampaolo Rodola' added the comment:
IPPROTO_TCP/UDP/RAW/ICMP are already there. AFAICT the only useful one here is
IPPROTO_IPV6, because it's needed for enabling dual-stack. I don't think
IPPROTO_IPV4 is a must (e.g. it's not available on Linux). Same for
IPPROTO_ICMPV6. The only reason we
Giampaolo Rodola' added the comment:
Done:
https://github.com/python/cpython/pull/12183/
This adds quite a bunch of new constants so I would be keen on considering it
an enhancement rather than a bugfix and land it in 3.8 only. As for 3.7 and 3.6
(and 2.7?) it may make sense to fix
Change by Giampaolo Rodola' :
--
nosy: +giampaolo.rodola
___
Python tracker
<https://bugs.python.org/issue27409>
___
___
Python-bugs-list mailing list
Unsub
Change by Giampaolo Rodola' :
--
keywords: +patch
pull_requests: +12179
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue29515>
___
_
Giampaolo Rodola' added the comment:
@Eryk do you mind if I make a PR with your code(I will of course author you)?
Regardless from issue17561 I think this is an important fix because without
IPPROTO_IPV6 is not possible to implement a dual-stack IPv4/6 socket on Windows
Change by Giampaolo Rodola' :
--
nosy: -giampaolo.rodola
___
Python tracker
<https://bugs.python.org/issue31861>
___
___
Python-bugs-list mailing list
Unsub
Giampaolo Rodola' added the comment:
One thing to note is the copy_function parameter: if a path-like object is
given as input should the copy_function receive the same object instead of a
path string?
>>> copytree(path_like_src, path_like_dst, copy_function=foo)
Because of i
Giampaolo Rodola' added the comment:
New changeset c606a9cbd48f69d3f4a09204c781dda9864218b7 by Giampaolo Rodola in
branch 'master':
bpo-35652: shutil.copytree(copy_function=...) erroneously pass DirEntry instead
of path str (GH-11997)
https://github.com/python/cpython/commit
Giampaolo Rodola' added the comment:
@Inada: having played with this in the past I seem to remember that on Linux
the bigger bufsize doesn't make a reasonable difference (but I may be wrong),
that's why I suggest to try some benchmarks. In issue33671 I pasted some
one-liners you can use
Giampaolo Rodola' added the comment:
A BB failed. Looks like it's unrelated with this change:
https://buildbot.python.org/all/#/builders/99/builds/2198
--
nosy: +giampaolo.rodola
___
Python tracker
<https://bugs.python.org/issue35
Giampaolo Rodola' added the comment:
It appears you guys are right. Sorry for the noise.
--
___
Python tracker
<https://bugs.python.org/issue36105>
___
___
Pytho
Giampaolo Rodola' added the comment:
Yes, it's deliberate, see PR-12016.
--
___
Python tracker
<https://bugs.python.org/issue33671>
___
___
Python-bugs-list m
New submission from Giampaolo Rodola' :
This is what MS doc says about GetSystemInfo:
https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getsysteminfo
<>
$ grep -r GetSystemInfo
Modules/_ctypes/malloc_closure.c:GetSystemInfo();
Modules/mmapmo
Change by Giampaolo Rodola' :
--
pull_requests: -7529
___
Python tracker
<https://bugs.python.org/issue33671>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Giampaolo Rodola' :
--
pull_requests: -7536
___
Python tracker
<https://bugs.python.org/issue33671>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Giampaolo Rodola' :
--
pull_requests: -7528
___
Python tracker
<https://bugs.python.org/issue33671>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Giampaolo Rodola' :
--
pull_requests: +12047
___
Python tracker
<https://bugs.python.org/issue33671>
___
___
Python-bugs-list mailing list
Unsubscribe:
Giampaolo Rodola' added the comment:
When user uses copy_function argument, the callback function should always
receive path strings, both for consistency and for not breaking backward
compatibility. This line:
use_srcentry = copy_function is copy2 or copy_function is copy
...makes
Giampaolo Rodola' added the comment:
IMHO given the size of the change and how quickly this evolved I would probably
feel safer to mark the API as experimental (no pun intended, this is great
work), at least in alpha2. I believe we now have a good explanation in the docs
but it still needs
Giampaolo Rodola' added the comment:
> Side note: I’m the author of the sysv_ipc package you found, as well as the
> posix_ipc package.
Sorry, I didn't realize it was you.
> Not true. A manager started by one process can be connected to by another
> process that is
Giampaolo Rodola' added the comment:
It turns out that's a bug I introduced in PR-7874. I'm providing:
https://github.com/python/cpython/pull/11997
...which fixes it without introducing a new parameter. I also verified that
monkey patching shutil.copy2 and shutil.copy doesn't cause any issue
Change by Giampaolo Rodola' :
--
pull_requests: +12024
___
Python tracker
<https://bugs.python.org/issue35652>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Giampaolo Rodola' :
--
pull_requests: +12025
___
Python tracker
<https://bugs.python.org/issue33695>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Giampaolo Rodola' :
--
assignee: docs@python ->
resolution: later ->
status: closed -> open
___
Python tracker
<https://bugs.python.or
Giampaolo Rodola' added the comment:
Not sure why you created 2 identical issues. Closing this one as a duplicate of
issue35648.
--
nosy: +giampaolo.rodola
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
_
Change by Giampaolo Rodola' :
--
pull_requests: -12023
___
Python tracker
<https://bugs.python.org/issue35652>
___
___
Python-bugs-list mailing list
Unsub
Giampaolo Rodola' added the comment:
> We are consciously choosing to not support an atomic "create or attach".
> This significantly simplifies the API and avoids the valid concerns raised
> around user confusion relating to that behavior (including the use of
> dif
Change by Giampaolo Rodola' :
--
pull_requests: +12023
___
Python tracker
<https://bugs.python.org/issue35652>
___
___
Python-bugs-list mailing list
Unsubscribe:
Giampaolo Rodola' added the comment:
Also, there is no way to delete/unwrap memory without using an existing
SharedMemory instance, which is something we may not have on startup. Perhaps
we should have a "shared_memory.unlink(name)" function similar to os.unlink()
which simp
Giampaolo Rodola' added the comment:
Code looks much better now. I'm still not convinced "SharedMemory(name=None,
create=False, size=0)" is the best API. How are you supposed to "create or
attach" atomically? You can do that with O_EXCL but as it stands this is not
t
Giampaolo Rodola' added the comment:
Interesting. Because both errors/conditions are mapped to ERROR_INVALID_HANDLE
we need the creation time. I can work on a patch for that. Potentially I can
also include OSX, Linux and BSD* implementations for methods involving
os.kill(pid). That would
Giampaolo Rodola' added the comment:
On POSIX there is that risk, yes. As for Windows, the termination is based on
the process handle instead of the PID, but I am not sure if that makes a
difference. The risk of reusing the PID/handle is not related to this issue
though. The solution I
Giampaolo Rodola' added the comment:
I think this is somewhat similar to issue14252. The problem I see is that we
should either raise ProcessLookupError or ignore the error (better). This
concept of suppressing errors if process is gone is currently already
established in 2 places:
https
New submission from Giampaolo Rodola' :
Happened in psutil:
https://ci.appveyor.com/project/giampaolo/psutil/builds/22546914/job/rlp112gffyf2o30i
==
ERROR: psutil.tests.test_process.TestProcess.test_halfway_terminated_process
Giampaolo Rodola' added the comment:
@eryksun I tried your patch (https://bugs.python.org/issue29515#msg287477) on
Windows 10 and it looks good. It introduces the following new constants:
IPPROTO_IGMP
IPPROTO_GGP
IPPROTO_PUP
IPPROTO_IDP
IPPROTO_ND
IPPROTO_MAX
IPPROTO_HOPOPTS
IPPROTO_IPV4
Giampaolo Rodola' added the comment:
It turns out having this fix would be useful for proceeding with issue17561,
which right now cannot support dual-stack IPv4/6 on Windows because
IPPROTO_IPV6 is missing, see my comment:
https://github.com/python/cpython/pull/11784#issuecomment-465078646
Change by Giampaolo Rodola' :
--
nosy: +giampaolo.rodola
___
Python tracker
<https://bugs.python.org/issue20215>
___
___
Python-bugs-list mailing list
Unsub
Change by Giampaolo Rodola' :
--
stage: patch review -> commit review
___
Python tracker
<https://bugs.python.org/issue17561>
___
___
Python-bugs-list mai
Giampaolo Rodola' added the comment:
@eryksun
> Using the VSN and file index as if they're the same as POSIX st_dev and
> st_ino is technically wrong. There is no guarantee that this tuple uniquely
> identifies a file in Windows.
I agree. FWIW, I faced the same issue on pyftpdlib
Giampaolo Rodola' added the comment:
> It looks like it does skip calling ftruncate() if size is 0. From
> posixshmem.c:
Let me rephrase: are we forced to specify a value (aka call ftruncate()) on
create ? If we are as I think, could size have a reasonable default value
instea
Giampaolo Rodola' added the comment:
As for *flags* argument "man shm_open" mentions 5 possible flags:
- O_RDONLY, OR_RDWR: these can be served by existing *read_only* arg
- O_CREAT, O_EXCL: dictates whether to raise error if file exists; could be
served via *attach_if_exists* arg
Giampaolo Rodola' added the comment:
> The unlink() method is available on the SharedMemory class. No manager is
> required. This is also captured in the docs.
I missed that, sorry.
>> 3) it seems "size" kwarg cannot be zero (current default)
> From the docs: When
Giampaolo Rodola' added the comment:
Hopefully my last iteration: =)
1) As for SharedMemoryManager, I believe it should live in
multiprocessing.managers, not shared_memory.py. It's a subclass of Manager and
behaves like a manager (start(), shutdown(), get_server(), etc.), so IMO that's
its
Giampaolo Rodola' added the comment:
> Because shared memory blocks are not "owned" by a single process...
> [...]
> I propose a simpler, consistent-across-platforms API like:
> SharedMemory(name=None, create=False, size=0)
Maybe something like this instead?
Giampaolo Rodola' added the comment:
> Because shared memory blocks are not "owned" by a single process, they are
> not destroyed/freed when a process exits.
1) it seems SharedMemory.close() does not destroy the memory region (I'm able
to re-attach to it via name). If I'm n
Change by Giampaolo Rodola' :
--
keywords: +patch
pull_requests: +11908
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36003>
___
_
Giampaolo Rodola' added the comment:
Update: because "request_queue_size" is passed to server_activate() method
which can be subclassed, a better default for not breaking backward
compatibility is 0 (not None).
--
___
Python track
New submission from Giampaolo Rodola' :
socketserver.TCPServer provides the following defaults:
allow_reuse_address = False
request_queue_size = 5
Proposal is to:
* have "allow_reuse_address = True" on POSIX in order to immediately reuse
previous sockets which were bound on the sa
Change by Giampaolo Rodola' :
--
nosy: -giampaolo.rodola
___
Python tracker
<https://bugs.python.org/issue12317>
___
___
Python-bugs-list mailing list
Unsub
Giampaolo Rodola' added the comment:
Correct. Sorry for the typo.
--
___
Python tracker
<https://bugs.python.org/issue35934>
___
___
Python-bugs-list mailin
Giampaolo Rodola' added the comment:
Assigning this to me. FWIW I created a post on python-dev in order to add a
test.support.rmpath() utility function and hopefully cover other os.* functions
which may also be untested or not properly tested:
https://mail.python.org/pipermail/python-dev
Giampaolo Rodola' added the comment:
The proposed change makes the problem a lot less likely to occur, but
technically it doesn't fix it because if the src file/dir disappears between
"os.path.exists(src)" and os.rename(src, dst)" calls you'll end up with a race
condition. We
Giampaolo Rodola' added the comment:
Closing this out as duplicate. Will continue in issue35934.
--
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Giampaolo Rodola' added the comment:
After iterating over this over the last few days I realized it makes more sense
to implement and discuss the whole thing in here and as a single PR, so sorry
about previously splitting this in a separate ticket/PR. Relevant PR is now
this one
Giampaolo Rodola' added the comment:
New changeset 58f05ce059cc5207320fef27a9fbc0ffdc2b1d1a by Giampaolo Rodola
(Miss Islington (bot)) in branch '3.7':
bpo-35918: Remove broken has_key method and add test (GH-11819) (#11824)
https://github.com/python/cpython/commit
Giampaolo Rodola' added the comment:
New changeset a31f4cc881992e84d351957bd9ac1a92f882fa39 by Giampaolo Rodola
(Rémi Lapeyre) in branch 'master':
bpo-35918: Remove broken has_key method and add test (#11819)
https://github.com/python/cpython/commit/a31f4cc881992e84d351957bd9ac1a92f882fa39
Giampaolo Rodola' added the comment:
I submitted an initial review / comments in the PR. I think this is good for a
first iteration in order to understand what APIs to expose publicly (also, keep
in mind I may not have a full picture of how this is intended to be used
precisely
Giampaolo Rodola' added the comment:
Pablo thanks a lot for taking care of this.
--
___
Python tracker
<https://bugs.python.org/issue35940>
___
___
Python-bug
Giampaolo Rodola' added the comment:
After careful thinking I realize I'm not completely sure about how to expose
the IPv4/6 functionality yet. I prefer to defer it for later and start landing
a bind_socket() utility function which serves as a base for this functionality.
See: issue17561
Change by Giampaolo Rodola' :
--
keywords: +patch
pull_requests: +11769
___
Python tracker
<https://bugs.python.org/issue35934>
___
___
Python-bugs-list mailin
Change by Giampaolo Rodola' :
--
keywords: +patch, patch, patch
pull_requests: +11769, 11770, 11771
___
Python tracker
<https://bugs.python.org/issue35
Change by Giampaolo Rodola' :
--
keywords: +patch, patch
pull_requests: +11769, 11770
___
Python tracker
<https://bugs.python.org/issue35934>
___
___
Python-bug
New submission from Giampaolo Rodola' :
The main point of this patch is to automatize all the necessary tasks which are
usually involved when creating a server socket, amongst which:
* determining the right family based on address, similarly to
socket.create_connection()
* whether to use
Giampaolo Rodola' added the comment:
I agree. The problem I have with this is that it introduces a new method
(handle_eof), which ends up in the "new functionality" bucket (even though it's
not backward incompatible per-se, as it defaults on calling handle_close()
anyway,
Giampaolo Rodola' added the comment:
> When recv() return 0 we may still have data to send.
It seems recv() returning b"" is an alias for "connection lost". E.g. in
Twisted:
https://github.com/twisted/twisted/blob/06c891502be9f6389451fcc959cad5485f55d653/src/twisted/in
Giampaolo Rodola' added the comment:
Also, for completeness (since discussion is getting split), please see my
proposal to move SharedMemoryManager and SharedMemoryServer into
multiprocessing.managers namespace and rename shared_memory.py to
_shared_memory.py:
https://mail.python.org
New submission from Giampaolo Rodola' :
import multiprocessing
import multiprocessing.managers
def f(n):
return n * n
def worker(pool):
with pool:
pool.apply_async(f, (10, ))
manager = multiprocessing.managers.SyncManager()
manager.start()
pool = manager.Pool(processes=4
Giampaolo Rodola' added the comment:
Assigning this to me but am not sure 1) when I'll be able to look at this 2)
whether it's worth it as asyncore is deprecated in favor of asyncio.
--
assignee: -> giampaolo.rodola
___
Python tracker
<
New submission from Giampaolo Rodola' :
Related to BPO-35917:
$ ./python
Python 3.8.0a1+ (heads/master:cd90f6a369, Feb 6 2019, 17:16:10)
[GCC 7.3.0] on linux
>>> import multiprocessing.managers
>>> m = multiprocessing.managers.SyncManager()
>>> m.start()
&g
Giampaolo Rodola' added the comment:
Unit-tests at https://bugs.python.org/issue35917.
--
nosy: +giampaolo.rodola
___
Python tracker
<https://bugs.python.org/issue35
Change by Giampaolo Rodola' :
--
keywords: +patch, patch, patch
pull_requests: +11740, 11741, 11742
___
Python tracker
<https://bugs.python.org/issue35
Change by Giampaolo Rodola' :
--
keywords: +patch, patch
pull_requests: +11740, 11741
___
Python tracker
<https://bugs.python.org/issue35917>
___
___
Python-bug
Change by Giampaolo Rodola' :
--
keywords: +patch
pull_requests: +11740
___
Python tracker
<https://bugs.python.org/issue35917>
___
___
Python-bugs-list mailin
New submission from Giampaolo Rodola' :
This is a follow up of BPO-35813 and PR-11664 and it provides unit tests for
SyncManager and SharedMemoryManager classes + all the shareable types which are
supposed to be supported by them. Also, see relevant python-dev discussion at:
https
Change by Giampaolo Rodola' :
--
pull_requests: +11528
___
Python tracker
<https://bugs.python.org/issue35537>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Giampaolo Rodola' :
--
assignee: -> giampaolo.rodola
resolution: -> fixed
stage: patch review -> commit review
status: open -> closed
___
Python tracker
<https://bugs.python
Giampaolo Rodola' added the comment:
New changeset 9e00d9e88fbf943987e4771c753f5ca8f794103e by Giampaolo Rodola
(jab) in branch 'master':
bpo-20849: add dirs_exist_ok arg to shutil.copytree (patch by Josh Bronson)
https://github.com/python/cpython/commit
Change by Giampaolo Rodola' :
--
pull_requests: +10452
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue17561>
___
___
Python-bugs-lis
Giampaolo Rodola' added the comment:
I took a look at your PR. As the PR currently stands it only works with epoll()
selector. For the other selectors this is just an extra argument which does
nothing, so it complicates the API of 2 methods for no real gain. Also, a
single argument
Giampaolo Rodola' added the comment:
I see. Then I would say it's a matter of deciding what's the best API to
provide. Another possibility is to promote the underlying epoll() instance as a
public property, so one can do:
>>> s = selectors.EpollSelector()
>>> s.regis
Giampaolo Rodola' added the comment:
I'm not sure I understand what EPOLLEXCLUSIVE is about. Could you provide a use
case?
Also, there are other constants which may also be useful such as EPOLLWAKEUP
and EPOLLONESHOT:
http://man7.org/linux/man-pages/man2/epoll_ctl.2.html
So perhaps it makes
Giampaolo Rodola' added the comment:
Interesting. Yes, I agree this proposal is still desirable. We can reuse
socket.create_server_sock() in smtpd, ftplib, socketserver (issue20215) and
http.server (issue24209) modules which will inherit dual-stack IPv4/6
capabilities for free. I should
Giampaolo Rodola' added the comment:
My bad. Thanks for fixing it.
--
___
Python tracker
<https://bugs.python.org/issue35434>
___
___
Python-bugs-list mailin
101 - 200 of 1713 matches
Mail list logo