Hynek Schlawack added the comment:
>>> @attrs.define
... class C(Base):
... a: int
... b: int
...
>>> C.__slots__
('b', '__weakref__')
We've got a test specifically for this use case:
https://github.com/python-attrs/attrs/blob/5f36ba9b89d4d196f80147d4f2961fb2f97ae2e5/t
Change by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<https://bugs.python.org/issue46404>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Hynek Schlawack :
--
keywords: +patch
pull_requests: +27783
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29533
___
Python tracker
<https://bugs.python.org/issu
New submission from Hynek Schlawack :
Doc/library/contextvars.rst defines a module using `.. module:: contextvars`
which means that all defined symbols are automatically part of the contextvars
module.
The docs added in https://github.com/python/cpython/pull/5685 however
explicitly use
New submission from Hynek Schlawack :
This is something I've been procrastinating on for almost a year and working
around it using my own version of asyncio.Condition because I wasn't sure how
to describe it. So here's my best take:
Consider the following code:
```
import asyncio
async
Change by Hynek Schlawack :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Hynek Schlawack added the comment:
> Previous timeout was effectively infinite.
Oi, well then 60s are an improvement indeed. :)
--
___
Python tracker
<https://bugs.python.org/issu
Hynek Schlawack added the comment:
For some context: 10s seems to be more common than I liked to believe (seems
like Go's http client uses it by default too).
Nevertheless I ran into the 10s after updating uvloop and stopped being able to
connect to a server in India. Therefore I'd consider
Change by Hynek Schlawack <h...@ox.cx>:
--
nosy: +hynek
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31997>
___
___
Python
Change by Hynek Schlawack <h...@ox.cx>:
--
nosy: +hynek
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29587>
___
___
Python
Hynek Schlawack added the comment:
Such an idiom is IMHO not the main usefulness of this function tho.
As an (untested) example, something like
async def f(n):
await asyncio.sleep(n)
return n
for f in asyncio.as_completed([f(3), f(2), f(1)]):
print(await f)
will print:
1
2
3
Hynek Schlawack added the comment:
JFTR the main compatibility impact on the browser side is the loss of IE8 on
WinXP whose last stable release is qua Wikipedia from “February 22, 2011; 5
years ago”.
--
nosy: +hynek
___
Python tracker <
Hynek Schlawack added the comment:
More explicitly:
The doc sells the function short. If you have a bunch of futures and want to
know as soon as one of them is ready: this is the function for you.
The only hint that this is the actual behavior comes from the *name* of the
function
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: -hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21859
___
___
Python-bugs-list mailing list
Hynek Schlawack added the comment:
I would have long ago if I had any domain knowlege on this topic, but alas….
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1610654
Hynek Schlawack added the comment:
I’m +1 too since supporting it serves no other purpose then enabling downgrade
attacks. Shipping a client with SSL 2 on is nothing short a security bug.
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18959
___
___
Python-bugs-list mailing list
Hynek Schlawack added the comment:
Well that's the point: it's extremely handy but simple. I wish Raymond would
pronounce on this. I can keep using the PyPI version for all I care, so I'm
not going fight for it. But with one exception there seems to be an agreement
that it would be a very
Hynek Schlawack added the comment:
So I wanted to provide a first patch to move the discussion on and realized
that itertools appears currently to be completely inside of
`Modules/itertoolsmodule.c`. :-/
Any volunteers? :)
--
assignee: hynek -
stage: - needs patch
Hynek Schlawack added the comment:
+1 on the name 'first_true'. Does exactly what it says on the tin.
I fully agree.
***
I assume what's missing now is a permission from Raymond to mess with his turf?
--
___
Python tracker rep...@bugs.python.org
New submission from Hynek Schlawack:
Let met try to get you sold on adding the “first” function I released on PyPI
roughly a year ago:
https://github.com/hynek/first
It’s a very nice complement to functions like `any()` or itertools. I consists
effectively of 9 lines of code but it proved
Hynek Schlawack added the comment:
`filter()` exhausts the full iterator which is potentially very expensive –
like in conduction with regular expressions.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
Hynek Schlawack added the comment:
Ah ok sorry. Anyhow, it’s just a very common idiom that should be easy and
readable.
As said, I’m not married to any names at all and would happily add a
compatibility package to PyPI with the new names/parameters
Hynek Schlawack added the comment:
Martin, I don’t find the loop easier to read because you have to *remember* the
`break` otherwise “weird stuff happens”.
Coalesce seems common enough, I would +1 on that too.
--
title: Add a “first” function to the stdlib - Add a “first”-like
Hynek Schlawack added the comment:
def coalesce(iterable, default=None, pred=None):
return next(filter(pred, iterable), default)
Are you sure you want add this one-line function to the itertools module
rather then to recipes?
Well, for many – including me – it would mean to have
Hynek Schlawack added the comment:
But why you want to have a separate function instead of just use two builtins?
This question has been answered twice now, once from Nick – please refer above.
It's a clunky and error-prone solution to a common problem. Maybe you can't
emphasize because it's
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18108
Hynek Schlawack added the comment:
I feel like there should be a warning in Doc/library/xml.rst too.
Is there any actual reason why we don’t ship defusedxml with Python and add an
easy way to monkeypatch so there’s as little passive barriers as possible to
use XML “safely”?
I’m sorry I
Hynek Schlawack added the comment:
Jyrki, roundup doesn’t seem to recognize you patch so we can’t review it in
Rietveld. Could you re-try, maybe using hg?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11063
Hynek Schlawack added the comment:
While I agree that it’s a problem, I’m a bit uneasy about changing that back to
2.7. I’m pretty sure this would break numerous programs.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Hynek Schlawack added the comment:
Yeah, I’m thinking about backup scripts etc.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17180
Hynek Schlawack added the comment:
SGTM. I’d like an explicit warning on the security implications in the docs
though.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17180
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17153
___
___
Python-bugs-list mailing list
Hynek Schlawack added the comment:
The buildbots look happy, thank you for spotting the patch Thomas!
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17076
Hynek Schlawack added the comment:
I would strongly prefer to back port certificate validation instead. Is there
anything *practical* that makes it hard/impossible?
If we want to keep features stable, we can add it privately so it’s only usable
by distutils. The susceptibility to (easy!) MITM
Changes by Hynek Schlawack h...@ox.cx:
--
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17076
___
___
Python-bugs-list
Hynek Schlawack added the comment:
Could you add regression tests to your patch please?
--
assignee: - hynek
priority: high - normal
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17076
Hynek Schlawack added the comment:
I think since we ship cryptographic functions, we should take responsibility
and warn against the most common mistakes people do.
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Changes by Hynek Schlawack h...@ox.cx:
--
title: symlinks incorrectly resolved on Linux - symlinks incorrectly resolved
on POSIX platforms
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6975
Hynek Schlawack added the comment:
I will review this first thing tomorrow.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6975
___
___
Python
Hynek Schlawack added the comment:
bikeshed$(pwd)/bikeshed
--
stage: - patch review
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16591
Hynek Schlawack added the comment:
I’m fine with that. My focus was fixing the ticket metadata. :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16591
New submission from Hynek Schlawack:
Glad to hear.
--
nosy: +hynek
resolution: - invalid
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16815
Hynek Schlawack added the comment:
Thanks Serhiy!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16618
Hynek Schlawack added the comment:
I agree that standardize behavior here would be useful. But it sounds like a
candidate for 3.4. Unifying/changing it for existing releases appears rather
hairy to me?
--
assignee: docs@python -
type: - behavior
versions: +Python 3.4
Hynek Schlawack added the comment:
Any news? Wouldn’t Apple give us a license for our buildbots like MSFT does?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15594
Hynek Schlawack added the comment:
Turns out, Larry fixed these two while working on #14626.
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Hynek Schlawack added the comment:
I think we should resolve this one line change.
Jessica’s patch looks just fine, so I tend to apply it. However, I’d like to
document the current behavior in 2.7, 3.2, 3.3 and 3.4.
Am I missing anything?
--
nosy: +hynek
versions: +Python 2.7
Hynek Schlawack added the comment:
It would be great if someone could port this patch to Python 3.4 and verify its
effectiveness.
--
keywords: +easy -patch
stage: test needed - needs patch
versions: +Python 3.4 -Python 3.2, Python 3.3
___
Python
Hynek Schlawack added the comment:
The patch hasn’t incorporated Antoine’s comments AFAICT.
Also I don’t see this fit for back porting to bug fix releases. Correct me if
I’m wrong.
--
nosy: +hynek
stage: patch review - needs patch
versions: +Python 3.4 -Python 2.7, Python 3.2, Python
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15450
___
___
Python-bugs-list mailing list
Hynek Schlawack added the comment:
Serhiy, are you going to update your patches? I can implement the feedback of
our Q4 Community Service Award awardee too in case you’re busy.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Hynek Schlawack added the comment:
I think deprecation makes not big value.
We should continue aliases support and there are no place to raise warning.
What we can do — mention deprecation in the doc.
That’s what I meant. I saw it in shutil code, were confused, looked it up,
wondered why
New submission from Hynek Schlawack:
Ah yeah I support this endeavor, I fixed a few instances in rmtree while
working on it. It’s just confusing.
JFTR, is there any rationale/reason to do it? Last time I checked it wasn’t
deprecated.
--
nosy: +hynek
New submission from Hynek Schlawack:
See issue16664.
--
assignee: docs@python
components: Documentation
keywords: easy
messages: 177584
nosy: Sebastian.Kreft, docs@python, hynek, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Clarify fnmatch glob docs
Hynek Schlawack added the comment:
Patch LGTM and will be applied, I have opened issue16695 for the related update
of the docs.
BTW how did you create the patch? The bugtracker/Rietveld didn't recognize it
for review and applying it took some effort too.
--
title: [PATCH] Test Glob
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16618
___
___
Python-bugs-list mailing list
Hynek Schlawack added the comment:
Thank you for your patch and welcome to CPython core development!
Presuming you want to submit more patches in future, please take the time to
sign a Python contributor agreement: http://www.python.org/psf/contrib/ .
You'll get a pretty star next to your
Hynek Schlawack added the comment:
“I wish I were wrangling inconsistent Windows buildbots.”
Nobody. Ever. *sigh*
It appears they are appeased now, so finally closing. Thanks for the patches
everyone!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open
Hynek Schlawack added the comment:
This should be fixed now, thanks to all who helped!
--
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15001
Hynek Schlawack added the comment:
Éric, what’s your take on this approach (not code)? We have time enough till
3.4 but it seems this doesn't really move forward. Any thoughts how to get this
moving? Unfortunately I'm not invested enough in this to make a educated
decision
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16381
___
___
Python-bugs-list mailing list
Changes by Hynek Schlawack h...@ox.cx:
--
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14794
___
___
Python-bugs-list
Hynek Schlawack added the comment:
Fun fact, on 2.7 3.2 I get infinite loops @ 100% CPU. 3.3 default crash.
Unless someone yells, I'll polish this up and commit next week.
--
stage: - commit review
versions: +Python 3.4 -Python 3.1
___
Python
Hynek Schlawack added the comment:
Any reason why this is still open?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15148
___
___
Python-bugs
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: -hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15104
___
___
Python-bugs-list mailing list
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: -hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15490
___
___
Python-bugs-list mailing list
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16099
___
___
Python-bugs-list mailing
Hynek Schlawack added the comment:
You're welcome. :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1492704
___
___
Python-bugs-list mailing
Hynek Schlawack added the comment:
LGTM.
Presuming you want to submit more patches in future, please take the time to
sign a Python contributor agreement: http://www.python.org/psf/contrib/ .
You'll get a pretty star next to your name in the bug tracker in return
Hynek Schlawack added the comment:
Applied. Thank you for your contribution!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16307
Hynek Schlawack added the comment:
Isn’t this a dupe of #5411?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16313
___
___
Python-bugs-list
Hynek Schlawack added the comment:
Thanks for taking the time! I remember my frustrations when trying to grok how
the mp test suite works. :)
A small nit-pick first: you have a lot of extra white space in your patches.
Just run 'make patchcheck' first, that should warn you about
Hynek Schlawack added the comment:
True, it makes sense to push this assert to the end.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16307
Hynek Schlawack added the comment:
Could you add a test please? Thanks!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16307
___
___
Python-bugs
Hynek Schlawack added the comment:
As announced, I hereby present an idea how to solve this problem for 3.4.
Please have a look at it. :)
--
assignee: docs@python -
versions: -Python 3.2, Python 3.3
Added file: http://bugs.python.org/file27683/makedirs-on_wrong_mode-1.diff
Hynek Schlawack added the comment:
To be honest I don't really understand the point of the ignore_errors flag on
rmtree. If rmtree fails to delete the directory tree (which will happen if
one of the files can't be deleted), why would you want it to return
succesfully?
I presume it’s
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16244
___
___
Python-bugs-list mailing list
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16202
___
___
Python-bugs-list mailing list
Hynek Schlawack added the comment:
Actually, that’s not the point here, the code has a deeper flaw.
You’re computing hashlib.md5() on `data.encode()` and `str(jsonData).encode()`.
Did you have a look how they look like?
data.encode()
b'{key1:value1,key2:value2}'
[71875 refs]
str(jsonData
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16099
___
___
Python-bugs-list mailing list
Hynek Schlawack added the comment:
Let's get this rolling again. First let's fix the docs for 3.2+ first. My
current suggestion would be the following:
~~~
.. function:: makedirs(path, mode=0o777, exist_ok=False)
.. index::
single: directory; creating
single: UNC paths
Hynek Schlawack added the comment:
Any suggestions on the value for _MAXLINE or just steal the 64k from httplib?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16040
Hynek Schlawack added the comment:
Pong? I understand we have to close #15411 #9949 first? Can't help here out
due to lack of Windows.
--
dependencies: +os.chmod() does not follow symlinks on Windows, os.path.realpath
on Windows does not follow symbolic links
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +brian.curtin, tim.golden
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15411
___
___
Python-bugs
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16040
___
___
Python-bugs-list mailing list
Hynek Schlawack added the comment:
What does bother you? Both sigs look like in py3 if I'm looking correctly.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14880
Hynek Schlawack added the comment:
It seems correct like that:
static PyObject *
csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs)
{
PyObject *name_obj, *dialect_obj = NULL;
PyObject *dialect;
if (!PyArg_UnpackTuple(args, , 1, 2, name_obj, dialect_obj
Hynek Schlawack added the comment:
Thank you for your contribution Chris!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14880
Hynek Schlawack added the comment:
Seems related to #15645, no?
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15760
___
___
Python
Hynek Schlawack added the comment:
Ok, let’s do it here, that’s easier:
.. function:: makedirs(path, mode=0o777, exist_ok=False)
.. index::
single: directory; creating
single: UNC paths; and os.makedirs()
Recursive directory creation function. Like :func:`mkdir`, but makes
Hynek Schlawack added the comment:
Silence means consent, so I will supply a patch as soon as 3.4 is open.
Meanwhile, I reworded the docs for os.makedirs, the patch is attached. Please
have a look at it so we can get it in for 3.3.
--
keywords: +patch
stage: needs patch - patch review
Hynek Schlawack added the comment:
Silence doesn't mean consent, but it does mean you can go ahead and see if
anyone complains :)
Well that's what I meant. :)
I think your proposal is fine, but I'd prefer making the sentinels just
IGNORE and FAIL. The module namespace means the names
Hynek Schlawack added the comment:
How about something along of:
new arg on_wrong_perm=
1. WRONG_PERM_IGNORE
2. WRONG_PERM_FAIL
3. callable that gets called with the directory name and maybe the existing
perms to save stat call_
?
--
___
Python
Hynek Schlawack added the comment:
do you want it by default or a new flag? default sounds like a source for
obscure bugs to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13498
Hynek Schlawack added the comment:
So, IMHO if someone calls os.makedirs with a mode != 0o777, they expect to have
the directories having those modes afterward. So raising no error if they exist
and have the wrong mode would be a plain bug.
Python 3.3 already has a helpful error message
Hynek Schlawack added the comment:
There is no patch.
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15487
___
___
Python
Hynek Schlawack h...@ox.cx added the comment:
For the sake of completeness: what you're looking for is os.lstat.
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15461
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15406
___
___
Python-bugs-list mailing list
1 - 100 of 375 matches
Mail list logo