[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-01-17 Thread Hynek Schlawack


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/tests/test_slots.py#L309-L334

--

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



[issue46404] 3.11a4: a small attrs regression

2022-01-16 Thread Hynek Schlawack


Change by Hynek Schlawack :


--
nosy: +hynek

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



[issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv

2021-11-12 Thread Hynek Schlawack


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/issue45792>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv

2021-11-11 Thread Hynek Schlawack


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 `.. class:: contextvars.Token` instead of just `.. class:: 
Token` which means that the recorded intersphinx symbol is 
`contextvars.contextvars.Token`. I have noticed this because sphinx couldn't 
find `contextvars.Token` in structlog's docs.

AFAICT, this only affects contextvars.Token.

--
assignee: hynek
components: Documentation
messages: 406192
nosy: hynek, yselivanov
priority: low
severity: normal
stage: needs patch
status: open
title: contextvars.Token has wrong module name in Sphinx's objects.inv
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

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



[issue42600] Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: Lock is not acquired.

2020-12-08 Thread Hynek Schlawack


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 def tf(con):
async with con:
await asyncio.wait_for(con.wait(), 60)


async def f(loop):
con = asyncio.Condition()

t = loop.create_task(tf(con))

await asyncio.sleep(1)
t.cancel()

async with con:
con.notify_all()

await t


loop = asyncio.get_event_loop()
loop.run_until_complete(f(loop))
```

(I'm using old-school APIs because I wanted to verify whether it was a 
regression. I ran into the bug with new-style APIs: 
https://gist.github.com/hynek/387f44672722171c901b8422320e8f9b)

`await t` will crash with:


```
Traceback (most recent call last):
  File "/Users/hynek/t.py", line 6, in tf
await asyncio.wait_for(con.wait(), 60)
  File 
"/Users/hynek/.asdf/installs/python/3.9.0/lib/python3.9/asyncio/tasks.py", line 
466, in wait_for
await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/hynek/t.py", line 24, in 
loop.run_until_complete(f(loop))
  File 
"/Users/hynek/.asdf/installs/python/3.9.0/lib/python3.9/asyncio/base_events.py",
 line 642, in run_until_complete
return future.result()
  File "/Users/hynek/t.py", line 20, in f
await t
  File "/Users/hynek/t.py", line 6, in tf
await asyncio.wait_for(con.wait(), 60)
  File 
"/Users/hynek/.asdf/installs/python/3.9.0/lib/python3.9/asyncio/locks.py", line 
20, in __aexit__
self.release()
  File 
"/Users/hynek/.asdf/installs/python/3.9.0/lib/python3.9/asyncio/locks.py", line 
146, in release
raise RuntimeError('Lock is not acquired.')
RuntimeError: Lock is not acquired.

```

If you replace wait_for with a simple await, it works and raises an 
asyncio.exceptions.CancelledError:

```
Traceback (most recent call last):
  File "/Users/hynek/t.py", line 6, in tf
await con.wait()
  File 
"/Users/hynek/.asdf/installs/python/3.9.0/lib/python3.9/asyncio/locks.py", line 
290, in wait
await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/hynek/t.py", line 20, in f
await t
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/hynek/t.py", line 24, in 
loop.run_until_complete(f(loop))
  File 
"/Users/hynek/.asdf/installs/python/3.9.0/lib/python3.9/asyncio/base_events.py",
 line 642, in run_until_complete
return future.result()
asyncio.exceptions.CancelledError
```

I have verified, that this has been broken at least since 3.5.10. The current 
3.10.0a3 is affected too.

--
components: asyncio
messages: 382732
nosy: asvetlov, hynek, lukasz.langa, yselivanov
priority: normal
severity: normal
status: open
title: Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: 
Lock is not acquired.
versions: Python 3.10, Python 3.8, Python 3.9

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



[issue42014] shutil.rmtree calls onerror with different function than failed

2020-11-11 Thread Hynek Schlawack


Change by Hynek Schlawack :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

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



[issue33734] asyncio/ssl: Fix AttributeError, increase default handshake timeout

2018-06-01 Thread Hynek Schlawack


Hynek Schlawack  added the comment:

> Previous timeout was effectively infinite.

Oi, well then 60s are an improvement indeed. :)

--

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



[issue33734] asyncio/ssl: Fix AttributeError, increase default handshake timeout

2018-06-01 Thread Hynek Schlawack

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 10s at least a regression 
that should be fixed.

What was the effective timeout before? Depending on the old value, 60s could be 
excessive for clients and might lead to self-DoS on the client side…

P.S. I tried to reply on my phone and now I fully support Mariatta’s proposal 
of moving to GitHub issues.

--

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



[issue31997] SSL lib does not handle trailing dot (period) in hostname or certificate

2017-11-11 Thread Hynek Schlawack

Change by Hynek Schlawack <h...@ox.cx>:


--
nosy: +hynek

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



[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2017-11-11 Thread Hynek Schlawack

Change by Hynek Schlawack <h...@ox.cx>:


--
nosy: +hynek

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



[issue27589] asyncio doc: issue in as_completed() doc

2016-11-08 Thread Hynek Schlawack

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

That’s *super* useful if you’re coordinating multiple independent external 
systems and need to process their results as soon as they arrive (and not once 
they’re *all* done).

Maybe it always worked by accident for me but it’s my understanding, that that 
is what this function is for (and I haven’t found another way to achieve it).

That’s why it would be nice if there’d be authoritative docs on what it’s 
supposed to do. :)

--

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-24 Thread Hynek Schlawack

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 <rep...@bugs.python.org>
<http://bugs.python.org/issue27850>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27589] asyncio doc: issue in as_completed() doc

2016-08-01 Thread Hynek Schlawack

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; not the documentation.

--
nosy: +hynek

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



[issue21859] Add Python implementation of FileIO

2015-03-23 Thread Hynek Schlawack

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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1610654] cgi.py multipart/form-data

2014-07-08 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Hynek Schlawack

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
http://bugs.python.org/issue20207
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18959] Create a Superseded modules section in standard library ToC

2013-09-07 Thread Hynek Schlawack

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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-17 Thread Hynek Schlawack

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 fine thing to have.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-11 Thread Hynek Schlawack

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-05 Thread Hynek Schlawack

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
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18652] Add a “first” function to the stdlib

2013-08-04 Thread Hynek Schlawack

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 extremely handy in production.

***

It returns the first true value from an iterable or a default:

 first([0, None, False, [], (), 42])
42

 first([0, None, False, [], ()], default=42)
42

Additionally it also allows for a key function:

 first([1, 1, 3, 4, 5], key=lambda x: x % 2 == 0)
4

***

First happens to be especially useful together with the re module:

import re

from first import first


re1 = re.compile('b(.*)')
re2 = re.compile('a(.*)')

m = first(regexp.match('abc') for regexp in [re1, re2])
if not m:
   print('no match!')
elif m.re is re1:
   print('re1', m.group(1))
elif m.re is re2:
   print('re2', m.group(1))


All the knee-jerk alternatives to it have some shortcomings:

next(itertools.ifilter(None, (regexp.match('abc') for regexp in [re1, re2])), 
None)
next((regexp.match('abc') for regexp in [re1, re2] if regexp.match('abc')), 
None)

None of them is Pythonic and the second one even has to call match() twice, 
which is *not* a cheap method to call.

Here the first version for comparison again:

first(regexp.match('abc') for regexp in [re1, re2])

It doesn’t even exhaust the iterator if not necessary.

***

I don’t cling to neither the name or the exact function signature (although it 
got polished with the help of several people, two of them core developers).  I 
also don’t really care whether it gets added along of any() or put into 
itertools.  I just know that I and several other people would appreciate to 
have such a handy function in the stdlib – I even got an e-mail from OpenStack 
folks asking when it will be added because they would like to use it and 
there’s even a debian package by now: 
http://packages.debian.org/unstable/python-first

There’s also this question on StackOverflow: 
http://stackoverflow.com/questions/1077307/why-is-there-no-firstiterable-built-in-function-in-python
 which is nice but doesn’t fix the subtleties like when there is no true value 
etc which makes it useless for production code and one has to write boilerplate 
code every single time.

It was even one of five Python packages Lukasz Langa deemed worthy to be 
highlighted in his PyCon 2013 lightning talk: 
http://youtu.be/1vui-LupKJI?t=20m40s

FWIW, SQL has a similar function called COALESCE ( 
https://en.wikipedia.org/wiki/Null_(SQL)#COALESCE ) which only handles NULL 
though.

***

I’ll happily respond to any questions or concerns that may arise and supply a 
patch as soon as we agree on a place to add it.

--
assignee: hynek
components: Library (Lib)
messages: 194338
nosy: hynek, lukasz.langa, ncoghlan, rhettinger
priority: normal
severity: normal
status: open
title: Add a “first” function to the stdlib
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18652] Add a “first” function to the stdlib

2013-08-04 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18652] Add a “first” function to the stdlib

2013-08-04 Thread Hynek Schlawack

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18652] Add a “first”-like function to the stdlib

2013-08-04 Thread Hynek Schlawack

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 function to 
the stdlib

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18652] Add itertools.coalesce

2013-08-04 Thread Hynek Schlawack

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 this one-line function in 
every other project or a PyPI dependency.  I’m certain there are other short 
but useful functions in the stdlib.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18652] Add itertools.coalesce

2013-08-04 Thread Hynek Schlawack

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 not a common problem to you but that doesn't make it 
less useful.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments

2013-05-31 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17538] Document XML Vulnerabilties

2013-03-25 Thread Hynek Schlawack

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 didn’t speak up on when this was discussed on the ML but I found 
the discussion…depressing.

--
assignee:  - docs@python
components: +Documentation -Library (Lib), XML
nosy: +docs@python, hynek
type:  - security
versions: +Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17538
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11063] uuid.py module import has heavy side effects

2013-02-24 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits

2013-02-13 Thread Hynek Schlawack

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/issue17180
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits

2013-02-13 Thread Hynek Schlawack

Hynek Schlawack added the comment:

Yeah, I’m thinking about backup scripts etc.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17180
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits

2013-02-13 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17153] tarfile extract fails when Unicode in pathname

2013-02-08 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17076] shutil.copytree failing on xattr-less filesystems (like NFS)

2013-02-05 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17121] SSH upload for distutils

2013-02-04 Thread Hynek Schlawack

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 attacks can be counted as a 
security bug and this seems the most practical resolve.

--
nosy: +hynek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17121
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17076] shutil.copytree failing on xattr-less filesystems (like NFS)

2013-02-04 Thread Hynek Schlawack

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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17076] shutil.copytree failing on xattr-less filesystems (like NFS)

2013-01-29 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17006] Warn users about hashing secrets?

2013-01-21 Thread Hynek Schlawack

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/issue17006
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2013-01-20 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6975] symlinks incorrectly resolved on POSIX platforms

2013-01-10 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6975] symlinks incorrectly resolved on Linux

2013-01-09 Thread Hynek Schlawack

Hynek Schlawack added the comment:

I will review this first thing tomorrow.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6975
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16591] RUNSHARED wrong for OSX no framework

2012-12-31 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16591] RUNSHARED wrong for OSX no framework

2012-12-31 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16815] Is all OK!!

2012-12-29 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16618] Different glob() results for strings and bytes

2012-12-27 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance

2012-12-27 Thread Hynek Schlawack

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15840
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15594] test_copyfile_named_pipe() fails on Mac OS X Snow Leopard: OSError: [Errno 22] Invalid argument

2012-12-27 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14870] Descriptions of os.utime() and os.utimensat() use wrong notation

2012-12-27 Thread Hynek Schlawack

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/issue14870
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2012-12-27 Thread Hynek Schlawack

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, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7325
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1610654] cgi.py multipart/form-data

2012-12-27 Thread Hynek Schlawack

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 tracker rep...@bugs.python.org
http://bugs.python.org/issue1610654
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11063] uuid.py module import has heavy side effects

2012-12-27 Thread Hynek Schlawack

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 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11063
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15450] Allow dircmp.subdirs to behave well under subclassing

2012-12-27 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16618] Different glob() results for strings and bytes

2012-12-22 Thread Hynek Schlawack

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/issue16618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16706] Get rid of os.error. Use OSError instead

2012-12-18 Thread Hynek Schlawack

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 it exists. I would like to get rid of it.

Do you have any concrete plans or should I just wade through shutil and make it 
pretty for 3.4?

 The reason to get rid of other OSError aliases to make cleaner code 
 (especially considering situations like `except (os.error, IOError):` and use 
 best practices in stdlib.

Sure.

 I think the later is very important because stdlib is first class example of 
 coding style for many users.

I hope not. :-/

 After stdlib we can cleanup C code to that unification and use concrete 
 exception classes instead of errno checking (#16705).

Awesome.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16706] Get rid of os.error. Use OSError instead

2012-12-17 Thread Hynek Schlawack

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16695] Clarify fnmatch glob docs about the handling of leading .s

2012-12-16 Thread Hynek Schlawack

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 about the handling of leading .s
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16695
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16664] Test Glob: files starting with .

2012-12-16 Thread Hynek Schlawack

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: files starting with . - Test Glob: files starting 
with .
type:  - enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16664
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16618] Different glob() results for strings and bytes

2012-12-16 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16664] Test Glob: files starting with .

2012-12-16 Thread Hynek Schlawack

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 name in the bug tracker in return. ;)

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16664
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Hynek Schlawack

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 - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15001] segmentation fault with del sys.modules['__main__']

2012-11-07 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5411] Add xz support to shutil

2012-11-02 Thread Hynek Schlawack

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5411
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16381] Introduce option to force the interpreter to exit upon MemoryErrors

2012-11-02 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14794] slice.indices raises OverflowError

2012-11-02 Thread Hynek Schlawack

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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15001] segmentation fault with del sys.module['__main__']

2012-11-02 Thread Hynek Schlawack

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 tracker rep...@bugs.python.org
http://bugs.python.org/issue15001
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15148] shutil.which() docstring could be clearer

2012-11-02 Thread Hynek Schlawack

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-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15104] Unclear language in __main__ description

2012-11-02 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15490] Correct __sizeof__ support for StringIO

2012-11-02 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2012-11-02 Thread Hynek Schlawack

Changes by Hynek Schlawack h...@ox.cx:


--
nosy: +orsenthil

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16099
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-10-29 Thread Hynek Schlawack

Hynek Schlawack added the comment:

You're welcome. :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1492704
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16307] multiprocess.pool.map_async callables not working

2012-10-27 Thread Hynek Schlawack

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. ;)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16307
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16307] multiprocess.pool.map_async callables not working

2012-10-27 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16313] Support xz compression in shutil module

2012-10-26 Thread Hynek Schlawack

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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16307] multiprocess.pool.map_async callables not working

2012-10-26 Thread Hynek Schlawack

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 that.

Not sure, but the tests look rather complex to me. I’d humbly propose the the 
simplified test attached, which also ensures that error_callback get only 
called on errors and callback on success.

Opinions?

--
Added file: http://bugs.python.org/file27724/map-async-fix-with-tests.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16307
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16307] multiprocess.pool.map_async callables not working

2012-10-26 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16307] multiprocess.pool.map_async callables not working

2012-10-24 Thread Hynek Schlawack

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-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-10-23 Thread Hynek Schlawack

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13498
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Hynek Schlawack

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 meant as a best-effort cleanup.

Regardless both Eric  Serhiy are right: it’s a programmer error to call it on 
files and it may shadow bugs catching it. OTOH the implementation is 
inconsistent and not backward compatible now, so we have to fix it 
unfortunately.

The patch needs to address Giampaolo’s (bug tracker)  Serhiy’s (Rietveld) 
comments before it can be merged though – thanks. :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16244] TimedRotatingFileHandler forces write mode, should use append

2012-10-16 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16202] sys.path[0] security issues

2012-10-12 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16179] hashlib.md5 / json inconsistency

2012-10-10 Thread Hynek Schlawack

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).encode()
b{'key1': 'value1', 'key2': 'value2'}

`str(jsonData)` doesn’t return JSON because it’s a simple dict():

 type(jsonData)
class 'dict'

If you wanted to have JSON again, you’d have to use `json.dumps()`:

 json.dumps(jsonData)
'{key1: value1, key2: value2}'

HOWEVER: This string _also_ differs from yours due to additional whitespace, 
ie. the sum would differ again.

Additionally, as David pointed out, you can’t rely on the order of the dict. 
json.dump() could just as well return `'{key2: value2, key1: value1}'`.

--
nosy: +hynek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16179
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2012-10-08 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-10-07 Thread Hynek Schlawack

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; and os.makedirs()

   Recursive directory creation function.  Like :func:`mkdir`, but makes all
   intermediate-level directories needed to contain the leaf directory.

   The default *mode* is ``0o777`` (octal).  On some systems, *mode* is
   ignored.  Where it is used, the current umask value is first masked out.

   If *exists_ok* is ``False`` (the default), an :exc:`OSError` is raised if
   the target directory already exists.  If *exists_ok* is ``True`` an
   :exc:`OSError` is still raised if the umask-masked *mode* is different from
   the existing mode, on systems where the mode is used.  :exc:`OSError` will
   also be raised if the directory creation fails.
 
   .. note::

  :func:`makedirs` will become confused if the path elements to create
  include :data:`pardir` (eg. .. on UNIX systems).

   This function handles UNC paths correctly.

   .. versionadded:: 3.2
  The *exist_ok* parameter.

~~~

Opinions?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13498
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16040] nntplib: unlimited readline() from connection

2012-10-07 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13837] test_shutil fails with symlinks enabled under Windows

2012-10-07 Thread Hynek Schlawack

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13837
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15411] os.chmod() does not follow symlinks on Windows

2012-10-07 Thread Hynek Schlawack

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-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16040] nntplib: unlimited readline() from connection

2012-09-25 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs

2012-08-28 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs

2012-08-28 Thread Hynek Schlawack

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))
return NULL;

Therefore going to commit.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14880
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs

2012-08-28 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15760] make install should generate grammar file

2012-08-22 Thread Hynek Schlawack

Hynek Schlawack added the comment:

Seems related to #15645, no?

--
nosy: +hynek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15760
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-08-18 Thread Hynek Schlawack

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 all
   intermediate-level directories needed to contain the leaf directory.

   The default *mode* is ``0o777`` (octal).  On some systems, *mode* is
   ignored.  Where it is used, the current umask value is first masked out.

   If the target directory exists, :exc:`OSError` is raised unless *exist_ok*
   is set to ``True`` and the mode doesn't contradict the designated mode as
   discussed in the previous paragraph.  If the mode doesn't match,
   :exc:`OSError` is raised regardless of the value of *exist_ok*.  If the
   directory cannot be created in other cases, an :exc:`OSError` exception is
   raised too.

   .. note::

  :func:`makedirs` will become confused if the path elements to create
  include :data:`pardir`.

   This function handles UNC paths correctly.

   .. versionadded:: 3.2
  The *exist_ok* parameter.


Python is so much easier than English. :'(

--
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13498
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-08-13 Thread Hynek Schlawack

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
Added file: http://bugs.python.org/file26781/os-makedirs.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13498
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-08-13 Thread Hynek Schlawack

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 themselves don't 
 have to be fully qualified.

I thought about that but found them pretty...generic.

Anyway, that's 3.4-fodder. Could you have a look at the doc fix please?
It applies against 3.2.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13498
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-08-05 Thread Hynek Schlawack

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 tracker rep...@bugs.python.org
http://bugs.python.org/issue13498
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-08-04 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-07-31 Thread Hynek Schlawack

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:

FileExistsError: [Errno 17] File exists (mode 777 != expected mode 755): 'foo'

and it also handles the sticky issue gracefully: 
http://hg.python.org/cpython/file/3a08d766eee3/Lib/os.py#l270 

So this are an non-issues for 3.3. I'm not sure if it's severe enough to be 
back ported to 3.2.

So there’s only one thing left: the docs are wrong and should be fixed about 
exist_ok's behavior for both 3.2  3.3.


That said, I see the rationale for fixing the permissions but we can't just 
change os.makedirs at this point.

So I'd propose to add a fix_permissions bool flag that would allow the no 
matter what the state is now, I want dir x with permissions y, do whatever is 
necessary workflow.

Opinions?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13498
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15487] Correct __sizeof__ support for buffered I/O

2012-07-29 Thread Hynek Schlawack

Hynek Schlawack added the comment:

There is no patch.

--
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15487
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15461] os.stat() 's inappropriate behavior when dealing with a broken link in linux systems.

2012-07-27 Thread Hynek Schlawack

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15406] Deprecation Warnings fixes on test suite

2012-07-20 Thread Hynek Schlawack

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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   >