New submission from Matt Joiner :
set.add can return True to indicate a newly added item to the set, or False if
the item was already present.
The C function PySet_Add returns -1 on error, and 0 on success currently. This
is extended to return 1 if the item is newly added, and 0 if it was
Changes by Matt Joiner :
Added file: http://bugs.python.org/file24863/bench_set_add.py
___
Python tracker
<http://bugs.python.org/issue14320>
___
___
Python-bugs-list m
Matt Joiner added the comment:
Yes it should.
A cursory glance shows that __repr__ returns incorrect if _closed is not
marked, and an unnecessary mop-up call to socket.close is avoided.
--
nosy: +giampaolo.rodola, haypo, stutzbach
___
Python
Matt Joiner added the comment:
I should mention that this failure to set addr is unusual seeing as most socket
instances are wrapping AF_INET* domain sockets, and aren't likely to connect
without blocking. This is quite likely a reason nobody has observed it until
now.
It *is* desirab
Matt Joiner added the comment:
Steven, patch attached. I lost steam in the unittests with all the meta,
suffice it that the names match the file descriptors of the stream sources.
i.e. FileType('rb') would give a file with name=0, and so forth. My chosen
method also allows other
Matt Joiner added the comment:
Is there still some value to at least exposing this in the C API, per the
precedents I mentioned?
The patch also contains some adjustment to the set_add_entry/set_add_key
abstraction dance, and some future proofing of PySet_Add return values that
have merit
New submission from Matt Joiner :
$ python3.3 -m unittest test.test_queue
Generates errors in the unit test code of the form
AttributeError: 'BaseQueueTest' object has no attribute 'type2test'
--
components: Tests
messages: 156006
nosy: anacrolix, benjamin.
Matt Joiner added the comment:
This changeset has broken something. All I get is a confusing backtrace ending
with:
File "/home/matt/src/python-torrent/torrent/bencode.py", line 15, in encode
yield from encode(k)
AttributeError: 'list_iterator' object has no attri
Matt Joiner added the comment:
Yes, FWIW much of the standard library tests are callable this way without
issue. I have patches that fix the discoverability of a few test modules. I'll
submit these in another issue.
--
___
Python tracker
Matt Joiner added the comment:
I will submit a patch for this soon.
--
___
Python tracker
<http://bugs.python.org/issue12684>
___
___
Python-bugs-list mailin
Matt Joiner added the comment:
Doc/library/dis.rst wasn't updated for the extra pop introduced to MAKE_CLOSURE
opcode.
--
nosy: +anacrolix
___
Python tracker
<http://bugs.python.org/is
New submission from Matt Joiner :
functools.lru_cache is optimized to the point that it may benefit from a C
implementation.
--
components: Interpreter Core, Library (Lib)
messages: 156405
nosy: anacrolix, rhettinger
priority: normal
severity: normal
status: open
title: C
Changes by Matt Joiner :
Added file: http://bugs.python.org/file24958/functools.lru_cache-in-c
___
Python tracker
<http://bugs.python.org/issue14373>
___
___
Python-bug
Changes by Matt Joiner :
Added file: http://bugs.python.org/file24961/profiler-unhandled-exceptions.patch
___
Python tracker
<http://bugs.python.org/issue12684>
___
___
Matt Joiner added the comment:
This patch is a shoo-in, can someone review and commit this?
--
___
Python tracker
<http://bugs.python.org/issue13694>
___
___
Matt Joiner added the comment:
I attached a minimal patch that additionally tidies the exception handling for
{cP,p}rofile.runctx.
--
___
Python tracker
<http://bugs.python.org/issue12
Matt Joiner added the comment:
Updated patch to fix a crash if maxsize isn't given, and add a unit test for
that.
Possible issues:
* I've tried to emulate object() by calling PyBaseObject_Type. Not sure if
there's a more lightweight object for this that just provides the n
Changes by Matt Joiner :
--
nosy: +anacrolix
___
Python tracker
<http://bugs.python.org/issue9528>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Matt Joiner :
--
nosy: +anacrolix
___
Python tracker
<http://bugs.python.org/issue4331>
___
___
Python-bugs-list mailing list
Unsubscribe:
Matt Joiner added the comment:
I've attached a patch that implements the descriptor protocol for
functools.partial with minimum changes.
--
Added file: http://bugs.python.org/file25016/functools.partial-descrget.patch
___
Python tracker
New submission from Matt Joiner :
There's a race condition in concurrent.futures in _AllCompletedWaiter, which
affects wait(return_when=ALL_COMPLETED).
The attached test will go into an infinite wait.
--
components: Library (Lib)
files: concurrent.futures._AllCompletedWaiter
Matt Joiner added the comment:
Patch attached.
--
keywords: +patch
Added file:
http://bugs.python.org/file25020/concurrent.futures._AllCompletedWaiter-race-condition.patch
___
Python tracker
<http://bugs.python.org/issue14
Changes by Matt Joiner :
--
nosy: +bquinlan, loewis, pitrou, rosslagerwall
___
Python tracker
<http://bugs.python.org/issue14406>
___
___
Python-bugs-list mailin
New submission from Matt Joiner :
matt@matt-1005P:~/src/cpython$ ./python -m unittest test.test_concurrent_futures
Ran 79 tests in 62.554s
FAILED (errors=18)
Failures are due to test discovery picking up unintentionally exposed tests. By
adhering to the test_cases protocol introduced in 3.2
Changes by Matt Joiner :
--
type: -> enhancement
___
Python tracker
<http://bugs.python.org/issue14407>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Matt Joiner :
--
nosy: +nedbat
___
Python tracker
<http://bugs.python.org/issue14373>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Matt Joiner :
Python 3.2 added the test_cases protocol. Many of the stdlib tests won't run
using the `$ python3 -m unittest test.test_blah` method due to select unit test
class names, and some regrtest arcanity. Defining test_cases makes these tests
work as expecte
Matt Joiner added the comment:
I've fixed the commenting, and cache_info use.
I've left the element management in pure C as it reduces memory use (56 bytes
for 4 element list, vs. 16 for lru_cache_elem), and avoids ref counting
overhead (3 refs per link, plus GC). The difference mi
Changes by Matt Joiner :
Removed file: http://bugs.python.org/file24958/functools.lru_cache-in-c
___
Python tracker
<http://bugs.python.org/issue14373>
___
___
Python-bug
Matt Joiner added the comment:
I think if you can correctly construct the same test case list using discovery
then that's far superior. But I haven't tried this, and don't know if you can
correctly predicate the support classes using only c
Matt Joiner added the comment:
Michael:
The thread setup and cleanup is not required, AFAICT. You are also correct in
that these particular test modules do not run correctly without modification
(although test_queue does now that the bug I reported there was fixed).
Sorry by predicated, I
Matt Joiner added the comment:
I'm working on a patch using TestCase a la test_queue. Perhaps we should create
an issue for a base class test case decorator or something to that effect?
--
___
Python tracker
<http://bugs.python.org/is
Matt Joiner added the comment:
It could in fact be necessary, if the inheritance cannot be juggled to give
the right MRO. Fortunately this is not the case, I should have a patch using
TestCase inheritance for discovery tomorrow.
--
___
Python
New submission from Matt Chaput :
In Python 3.2, if you write several values to a file with multiple calls to
marshal.dump(), and then try to read them back, the first marshal.load()
returns the first value, but reads to the end of the file, so subsequent calls
to marshal.load() raise an
Matt Joiner added the comment:
I'll add this shortly.
--
___
Python tracker
<http://bugs.python.org/issue14406>
___
___
Python-bugs-list mailing list
Unsubsc
Matt Joiner added the comment:
Patch with a test included. Being a nondeterministic bug, please adjust the
thread count, or timing as necessary, the parameters in the patch are as low as
I can get them and still reasonably reproduce the bug (linux 3.2, i386).
There's a few complicatio
Matt Joiner added the comment:
The patch attached, rejigs the TestCase inheritance in test.test_socket so that
tests run correctly using unittest discovery. Recent changes have made
test_queue, and test_threading run without similar fixes, so I don't think
fixes for those are nece
Matt Joiner added the comment:
Attached is a patch for test_concurrent_futures, similar to the patch for
test_socket.
--
Added file:
http://bugs.python.org/file25088/test_concurrent_futures-unittest-discoverability.patch
___
Python tracker
<h
Matt Joiner added the comment:
> * it incorporate the recent lru_cache algorithmic updates (moving the root
> around the circular queue to re-use old links).
The existing C patch already does this.
> * it shows which parts should be implemented in C using a regular type and
>
Changes by Matt Joiner :
Removed file: http://bugs.python.org/file25026/functools.lru_cache-in-c.patch
___
Python tracker
<http://bugs.python.org/issue14373>
___
___
Pytho
Changes by Matt Joiner :
Removed file: http://bugs.python.org/file24984/functools.lru_cache-in-c.patch
___
Python tracker
<http://bugs.python.org/issue14373>
___
___
Pytho
Changes by Matt Joiner :
--
nosy: +anacrolix
___
Python tracker
<http://bugs.python.org/issue9634>
___
___
Python-bugs-list mailing list
Unsubscribe:
Matt Joiner added the comment:
Isn't this fixed in Python>=3.2?
--
nosy: +anacrolix
___
Python tracker
<http://bugs.python.org/issue1360>
___
___
Py
Matt Billenstein added the comment:
I've been debugging this and I can repro on El Capitan on a different machine
as well -- it's an infrequent hang, I've been running in a loop:
mattb@mattb-mbp:~/src/misc/cpython master$ for i in $(seq 1000); do echo "Run:
$i -- $(date)&q
Matt Billenstein added the comment:
It consistently takes between ~61 and ~73 seconds with this setup.
--
___
Python tracker
<http://bugs.python.org/issue30
Matt Billenstein added the comment:
Cool -- do you need me to do something more to help debug this?
--
___
Python tracker
<http://bugs.python.org/issue30
Matt Billenstein added the comment:
I don't see anything odd -- it runs for awhile and then times out once it's
deadlocked:
0:03:18 load avg: 3.20 [224] test_multiprocessing_forkserver
test_many_processes
(test.test_multiprocessing_forkserver.WithProcessesTestProce
Matt Billenstein added the comment:
Yes, I'll email you the details.
--
___
Python tracker
<http://bugs.python.org/issue30703>
___
___
Python-bugs-list m
Matt Billenstein added the comment:
Verified this by letting the test_many_processes loop overnight
(master@42bc8beadd49)-- 34k passes later and no hangs. Nice work!
--
___
Python tracker
<http://bugs.python.org/issue30
Matt Rasband added the comment:
I attempted this myself, it seemed to have too many costs associated for the
stdlib and is something easy enough to wrap myself when I need this
functionality with explicit semantics on how to "stop" the queue (using an
`object()` sentinel). My impl
Matt Groth added the comment:
Thank you Antoine Pitrou, I was able to disable this behavior by commenting out
some lines of code in 'traceback' and replacing them with the appropriate call
to 'sys.excepthook'. Note you also have to comment out a few lines in
"Mo
Matt Wilber added the comment:
Inada-san, I think it's fair to ask for a broader vision about how ABCs are
used. In that respect I'm wondering about some inconsistencies in the existing
functools module about whether wrappers should maintain the wrapped function's
__isa
Change by Matt Joiner :
--
nosy: -anacrolix
___
Python tracker
<https://bugs.python.org/issue12822>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Matt Bogosian:
It looks like there's a problem examining ``.tar`` files with no entries:
```
$ # ==
$ # Extract test cases (attached to this bug report)
$ tar xpvf tarfail.tar.bz2
x tarfail/
x tarfail/tarfa
Matt Bogosian added the comment:
FWIW, the (offending) fix for #24259 was introduced (e.g., in 2.7) via 2.7.10.
I've verified that 2.7.9 works as expected:
```
$ python -V
Python 2.7.9
$ python tarfail.py
opening /…/tarfail/test.tar.bz2
opening /…/tarfail/tes
Matt Bogosian added the comment:
I'm not sure if it helps at this point, but I've tried several "flavors" of
apparently legit tar files with zero entries. All fail.
``tarfile`` module:
```
$ ( set -x ; cd /tmp || exit 1 ; python -V ; rm -fv test.tar ; python -c
Matt Bogosian added the comment:
This patch (also attached) seems to address this particular use case:
```
--- a/Lib/tarfile.py2016-12-17 12:41:21.0 -0800
+++ b/Lib/tarfile.py2017-03-10 12:23:34.0 -0800
@@ -2347,7 +2347,7 @@
# Advance the file pointer
Changes by Matt Bogosian :
Removed file: http://bugs.python.org/file46717/tarfile.patch
___
Python tracker
<http://bugs.python.org/issue29760>
___
___
Python-bugs-list m
Matt Bogosian added the comment:
After some consideration, I think this is probably more correct:
```
--- /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py
2016-12-17 12:41:21.0 -0800
+++ tarfile.py 2017-03-10 14:57:15.0 -0800
@@ -2347,9 +2347,10
New submission from Matt Gilson:
There is some odd behavior when unpacking the groups from an itertools.groupby
result. For example:
from itertools import groupby
from operator import itemgetter
inputs = ((x > 5, x) for x in range(10))
(_, a), (_, b) = groupby(inputs,
New submission from Matt Houglum :
This is a follow-up to https://bugs.python.org/issue33365. The fix for that
issue (see https://github.com/python/cpython/pull/6611) added a statement to
also print header values, but it does not account for the case where multiple
values exist for the same
New submission from matt farrugia :
The json module allows a user to provide an `object_hook` function, which, if
provided, is called to transform the dict that is created as a result of
parsing a JSON Object.
It'd be nice if there was something analogous for JSON Arrays: an `array
Change by matt farrugia :
--
keywords: +patch
pull_requests: +12906
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36738>
___
___
Py
New submission from Matt Martz :
The behavior of how SSL certificate validation is handled was changed in
https://bugs.python.org/issue31399
This introduced a new exception, ssl.SSLCertVerificationError, which is raised
for any certificate validation error, instead of the previous exception
New submission from Matt Ripley :
When I try to use any of the installers downloaded from the website I get the
errors 2203 and 0x80070643:
[2468:1D2C][2018-01-13T20:15:51]e000: Error 0x80070643: Failed to install MSI
package.
[2468:1D2C][2018-01-13T20:15:51]e000: Error 0x80070643: Failed to
Matt Ripley added the comment:
Hi Terry, Thanks for getting back to me on this. I tried all of the suggestions
on the link that you sent to me and the python installer still will not install
for me. I get the same errors.
I can install the conda python distributions. I only have these
Matt Ripley added the comment:
Hi Steve,
Finally sorted this out. I tried all the workarounds that I could find on the
web for similar issues. In the end I needed to re-image windows 10. This was
the only thinkg that sorted it out. So looked like the windows had ccorrupted
preventing the msi
Matt Eaton added the comment:
Using Ubuntu 16.04 with the 3.6.0 tag I was also able to reproduce the same
error reported:
import socket
h =
"0123456789012345678901234567890123456789012345678901234567890123.example.com"
socket.gethostbyname(h)
Traceback (most recent call las
Matt Harvey added the comment:
Hi,
No, using the affinity's not useful to us as, in the general case, the batch
system (PBS Pro in our case) isn't using cgroups or cpusets (it does control
ave cpu use by monitoring rusage of the process group).
Several other batch system I'
Matt Harvey added the comment:
@njs your sketch in msg313406 looks good. Probably better to go with
OMP_NUM_THREADS than NCPUS.
M
--
___
Python tracker
<https://bugs.python.org/issue32
New submission from Matt Eaton :
I was reading through the SSL documentation and noticed a typo on Diffe-Hellman
and wanted to clean it up.
PR is coming soon.
--
assignee: docs@python
components: Documentation
messages: 313559
nosy: agnosticdev, docs@python
priority: normal
severity
Change by Matt Eaton :
--
keywords: +patch
pull_requests: +5826
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33045>
___
___
Python-
Matt Eaton added the comment:
Thank you very much, Berker!!
--
___
Python tracker
<https://bugs.python.org/issue33045>
___
___
Python-bugs-list mailing list
Unsub
Change by Matt Eaton :
--
keywords: +patch
pull_requests: +5837
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33034>
___
___
Python-
Change by Matt Eaton :
--
pull_requests: +5838
___
Python tracker
<https://bugs.python.org/issue33034>
___
___
Python-bugs-list mailing list
Unsubscribe:
Matt Eaton added the comment:
I agree. I think an explicit exception message would be appropriate when the
cast fails to cast from string to int in int(post, 10).
Putting in a PR to fix this now.
https://github.com/python/cpython/pull/6078
--
nosy: +agnosticdev
Matt Eaton added the comment:
"Wouldn't we be better off to catch this error at parse time, instead of just
improve the error message when .port is called?"
I think there could be a case to be made about catching and dealing with this
error in urlparse() / urlsplit() instead o
Matt Eaton added the comment:
Jonathan, thank you very much for your thoughts I appreciate the pros and cons
of each option.
In regards to your option C, if we provided a flag to optionally raise the
error in urlsplit and urlparse were you thinking the default flag to be set to
True?
For
Matt Eaton added the comment:
One more question I would raise based upon a point made earlier by Eric is if
option C would be too large of a change for 3.8? Any thoughts on this?
--
___
Python tracker
<https://bugs.python.org/issue33
Matt Eaton added the comment:
This is a very good point, Eric. For backwards compatibility we would have to
set the default parameter to false, so we be in the same state we are today by
default. Knowing this my vote would be to go with the improvements to the
ValueError message when using
Matt Eaton added the comment:
Yes, my goal for the patch was to provide a more explicit error message for
this situation and to provide a low surface area change to the overall source,
knowing that there are future development goals and backward compatibility to
keep in mind. That way the
Matt Eaton added the comment:
Eric, what is needed to try and reproduce this issue accurately? Would it be
installing websockets and setting up your client to ping to the server forever
(12 hours in this case)? If you are able to provide a client I would be
willing to setup a test case on
Matt Eaton added the comment:
Berker and Eric, thank you very much. I really like the idea of introducing a
new API with more strict parsing rules for this situation. I would be willing
to put some ideas down on a first pass at this
New submission from Matt Eaton :
A recent patch that I worked on resulted in an agreement that there could be a
use case for a new URL API to be added to urllib.parse. See:
https://bugs.python.org/issue33034
In my research to develop this new API I have been looking at the documentation
for
Change by Matt Eaton :
--
keywords: +patch
pull_requests: +6014
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33167>
___
___
Python-
Matt Eaton added the comment:
Oliver,
A possible option that would work for both the client side caching and the
server would be to pass back a Cache-Control header with a max-age attached
when the 301 is returned.
I am thinking something like this:
if os.path.isdir(path):
parts
Matt Eaton added the comment:
It looks like the 301 redirect is in place to emulate the behavior that Apache
provides when it runs into a trailing slash. This is observed when this
condition is met:
parts = urllib.parse.urlsplit(self.path)
if not parts.path.endswith('/'):
Apache
Matt Eaton added the comment:
I agree with you in regards to the statement, "Apache's redirect can be turned
off, whereas this can't." That is why my first thought would be to try and
control this response to the client a bit better by providing a variable
max-age.
sel
Matt Eaton added the comment:
I was able to get some time together today and created a rough draft for the
idea that you had Berker on introducing a new API with more strict parsing
rules.
This will allow the ValueError to be raised when the URL is parsed rather than
when the computed
Matt Eaton added the comment:
Adding some core team members to the nosy list to get their take on this as
well.
--
nosy: +berker.peksag, eric.smith
___
Python tracker
<https://bugs.python.org/issue33
Matt Eaton added the comment:
Wanted to check in on this to see if there was any feedback by any community or
core members?
--
___
Python tracker
<https://bugs.python.org/issue33
Matt Eaton added the comment:
Wanted to check in on this to see if there was any feedback on this topic?
--
___
Python tracker
<https://bugs.python.org/issue33
New submission from Matt Pr :
Doing a cross domain iframe test. `domain1.html` has iframe pointing at
`domain2.html` which has iframe pointing at `domain3.html`.
`domain{1,2,3}.com` are all configured to point at `127.0.0.1` in my
`/etc/hosts` file.
Loaded up `http://domain1.com:8000
Matt Pr added the comment:
It has been pointed out to me that this issue may be related to chrome making
multiple requests in parallel.
A test with wget seems to support this.
wget -E -H -k -K -p http://domain1.com:8000/domain1.html
...does not hang, whereas requests from chrome do hang
Matt Billenstein added the comment:
Did some debugging by sticking a couple prints in support.is_gui_available()
and it appears everything is fine up until the call to
app_services.SetFrontProcess() -- this is returning error code -606 which is
defined in:
/System/Library/Frameworks
Matt Billenstein added the comment:
Note, that's running ./python.exe Lib/tests/test_tk.py from a Terminal when
logged into the gui...
--
___
Python tracker
<https://bugs.python.org/is
Matt Billenstein added the comment:
Reflected on the High Sierra buildbot now:
http://buildbot.python.org/all/#/builders/14/builds/162
--
nosy: +mattbillenstein
___
Python tracker
<https://bugs.python.org/issue31
New submission from Matt Davis :
The current implementation of SSLContext.wrap_socket blindly sends whatever is
passed in server_hostname in the SNI extension, assuming it's a DNS hostname.
RFC6066 describes the SNI TLS extension, and specifically states that 'Literal
IPv4 and IPv6
Matt Billenstein added the comment:
I don't see a conflict in the uids:
mattb@mattb-mbp2:~ $ id -u buildbot
506
mattb@mattb-mbp2:~ $ id -u _timed
266
mattb@mattb-mbp2:~ $ grep _timed /etc/passwd
_timed:*:266:266:Time Sync Daemon:/var/db/timed:/usr/bin/false
mattb@mattb-mbp2:~ $ grep 506
Matt Billenstein added the comment:
Note, I can repro running it by hand from the cli. And I cannot repro on 3.x,
only 3.6 on the same machine.
--
___
Python tracker
<https://bugs.python.org/issue32
301 - 400 of 595 matches
Mail list logo