[issue18844] allow weights in random.choice

2016-04-07 Thread Mark Dickinson

Mark Dickinson added the comment:

> One to make it return a single number if amount == 1 and the other to check 
> that the amount > 1.

I think that's a dangerous API. Any code making a call to "weighted_choice(..., 
amount=n)" for variable n now has to be prepared to deal with two possible 
result types. It would be easy to introduce buggy code that fails in the corner 
case n = 1.

--

___
Python tracker 

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



[issue18844] allow weights in random.choice

2016-04-07 Thread Mark Dickinson

Mark Dickinson added the comment:

> One to make it return a single number if amount == 1 and the other to check 
> that the amount > 1.

Suggestion: if you want to go that way, return a single number if `amount` is 
not provided (so make the default value for `amount` None rather than 1). If 
`amount=1` is explicitly given, a list containing one item should be returned.

I also think there's no reason to raise an exception when `amount = 0`: just 
return an empty list.

For comparison, here's NumPy's "uniform" generator, which generates a scalar if 
the "size" parameter is not given, and an array if "size" is given, even if 
it's 1.

>>> np.random.uniform()
0.4964992470265117
>>> np.random.uniform(size=1)
array([ 0.64817717])
>>> np.random.uniform(size=0)
array([], dtype=float64)

--

___
Python tracker 

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



[issue18844] allow weights in random.choice

2016-04-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Suggestion: if you want to go that way, return a single number if `amount` is 
> not provided (so make the default value for `amount` None rather than 1). If 
> `amount=1` is explicitly given, a list containing one item should be returned.

+1

--

___
Python tracker 

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



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2016-04-07 Thread SilentGhost

SilentGhost added the comment:

Here is the version of the patch suitable for the Rietveld. John, could you 
perhaps provide an example file that uses UID values?

Also, the code is identical to handling of 0x50 token, perhaps it could be 
incorporated into it.

--
nosy: +SilentGhost
stage:  -> patch review
versions: +Python 3.6
Added file: http://bugs.python.org/file42390/issue26707.diff

___
Python tracker 

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



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2016-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

UID is rather int than bytes. And I would use a special UID type.

According to Apple's sources [1], the size of UID data is tokenL+1, not 
self._get_size(tokenL).

[1] http://www.opensource.apple.com/source/CF/CF-1153.18/CFBinaryPList.c

--

___
Python tracker 

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



[issue26709] Year 2038 problem in plistlib

2016-04-07 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Plistlib fails to load dates before year 1901 and after year 2038 in binary 
format on platforms with 32-bit time_t.

>>> data = plistlib.dumps(datetime.datetime(1901, 1, 1), 
>>> fmt=plistlib.FMT_BINARY)
>>> plistlib.loads(data)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 1006, in loads
fp, fmt=fmt, use_builtin_types=use_builtin_types, dict_type=dict_type)
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 997, in load
return p.parse(fp)
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 623, in parse
return self._read_object(self._object_offsets[top_object])
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 688, in _read_object
return datetime.datetime.utcfromtimestamp(f + (31 * 365 + 8) * 86400)
OverflowError: timestamp out of range for platform time_t
>>> data = plistlib.dumps(datetime.datetime(2039, 1, 1), 
>>> fmt=plistlib.FMT_BINARY)
>>> plistlib.loads(data)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 1006, in loads
fp, fmt=fmt, use_builtin_types=use_builtin_types, dict_type=dict_type)
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 997, in load
return p.parse(fp)
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 623, in parse
return self._read_object(self._object_offsets[top_object])
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 688, in _read_object 

   
return datetime.datetime.utcfromtimestamp(f + (31 * 365 + 8) * 86400)   

   
OverflowError: timestamp out of range for platform time_t

Proposed patch fixes this issue.

--
components: Library (Lib)
files: plistlib_large_timestamp.patch
keywords: patch
messages: 262986
nosy: belopolsky, ronaldoussoren, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Year 2038 problem in plistlib
type: behavior
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42391/plistlib_large_timestamp.patch

___
Python tracker 

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



[issue23239] SSL match_hostname does not accept IP Address

2016-04-07 Thread Marc Abramowitz

Marc Abramowitz added the comment:

`ip_certs_comment.patch` is a simple patch that just removes the verbiage about 
not supporting IP addresses in hostnames, as that restriction was removed by an 
earlier commit from Antoine.

--

___
Python tracker 

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



[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2016-04-07 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +michael.foord
stage:  -> patch review
type: crash -> behavior
versions:  -Python 3.4

___
Python tracker 

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



[issue23239] SSL match_hostname does not accept IP Address

2016-04-07 Thread Christian Heimes

Christian Heimes added the comment:

I'm -1 on the patch for a practical reason: The current API is broken and I 
don't want to have it documented as officially supported.

In fact it is not only broken but also incompatible with more modern releases 
of OpenSSL. Recently OpenSSL got proper implementation of hostname and IP 
checking. Hostname and IP must be set with different API calls:

https://www.openssl.org/docs/manmaster/crypto/X509_VERIFY_PARAM_add1_host.html
https://www.openssl.org/docs/manmaster/crypto/X509_check_host.html

--
stage: resolved -> commit review
versions: +Python 3.6

___
Python tracker 

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



[issue26710] ConfigParser: Values in DEFAULT section override defaults passed to constructor

2016-04-07 Thread Marc Abramowitz

New submission from Marc Abramowitz:

My expectation was that any defaults I passed to ConfigParser when creating one 
would override values in the DEFAULT section of the config file. This is 
because I'd like the DEFAULT section to have the default values, but then I 
want to be able to override those with settings from environment variables.

However, this is not the way it works. The defaults in the file take precedence 
over the defaults passed to the constructor. I didn't see a mention of this in 
the docs, but I might've missed it.

Take this short program (`configparsertest.py`):

```
import configparser

cp = configparser.ConfigParser({'foo': 'dog'})
print(cp.defaults())
cp.read('app.ini')
print(cp.defaults())
```

and this config file (`app.ini`):

```
[DEFAULT]
foo = bar
```

I was expecting that I would see foo equal to dog twice, but what I get is:

```
$ python configparsertest.py
OrderedDict([('foo', 'dog')])
OrderedDict([('foo', 'bar')])
```

The reason that I want the programmatic default values to override the default 
values in the file is that I want the file to have low-precedence defaults that 
are used as a last resort, and I want to be able to override the defaults with 
the values from environment variables.

As a concrete example, imagine that I have a config file for the stdlib 
`logging` module that looks something like this:

```
[DEFAULT]
logging_logger_root_level = WARN
...
[logger_root]
level = %(logging_logger_root_level)s
handlers = console
```

The desired behavior is that normally the app would use the WARN level for 
logging, but I'd like to be able to do something like:

```
$ LOGGING_LOGGER_ROOT_LEVEL=DEBUG python my_app.py
```

to get DEBUG logging.

Maybe there is some other mechanism to accomplish this?

--
components: Library (Lib)
messages: 262989
nosy: Marc.Abramowitz
priority: normal
severity: normal
status: open
title: ConfigParser: Values in DEFAULT section override defaults passed to 
constructor
type: behavior

___
Python tracker 

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



[issue26710] ConfigParser: Values in DEFAULT section override defaults passed to constructor

2016-04-07 Thread SilentGhost

SilentGhost added the comment:

You can override the level if an environmental variable was defined. Not sure 
why it needs to be responsibility of the ConfigParser.

While I'm not going to immediately close this issue, I don't think such a 
backward-incompatible proposal is viable.

--
nosy: +SilentGhost, lukasz.langa
type: behavior -> enhancement

___
Python tracker 

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



[issue25339] sys.stdout.errors is set to "surrogateescape"

2016-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What do you think about this Victor?

--

___
Python tracker 

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



[issue26710] ConfigParser: Values in DEFAULT section override defaults passed to constructor

2016-04-07 Thread Marc Abramowitz

Marc Abramowitz added the comment:

Some more info on the logging example I gave.

So here is a program called `my_app.py`:

```
import os
import logging.config

logging.config.fileConfig('logging.ini', defaults=os.environ)
logger = logging.getLogger(__name__)
logger.debug('debug msg')
logger.info('info msg')
logger.warn('warn msg')
logger.error('error msg')
root_logger = logging.getLogger()
print('root_logger.level = %d; logging.WARN = %d; logging.DEBUG = %d'
  % (root_logger.level, logging.WARN, logging.DEBUG))
```

Note that it calls logging.config.fileConfig with defaults=os.environ so that 
environment variables can be used to affect the logging configuration.


And here is `logging.ini`:

```
###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html
###

[loggers]
keys = root, fakeproject, sqlalchemy

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = %(logging_logger_root_level)s
handlers = console

[logger_fakeproject]
level = DEBUG
handlers =
qualname = fakeproject

[logger_sqlalchemy]
level = INFO
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither.  (Recommended for production systems.)

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] 
%(message)s
```

Note that in the `logger_root` section of `logging.ini`, the variable 
`logging_logger_root_level` is referenced but not defined. For now, we are 
going to rely on getting that from an environment variable.


If I provide an environment variable when running the program:

```
$ LOGGING_LOGGER_ROOT_LEVEL=DEBUG python my_app.py
2016-04-07 08:26:36,184 DEBUG [__main__:6][MainThread] debug msg
2016-04-07 08:26:36,184 INFO  [__main__:7][MainThread] info msg
2016-04-07 08:26:36,184 WARNI [__main__:8][MainThread] warn msg
2016-04-07 08:26:36,184 ERROR [__main__:9][MainThread] error msg
root_logger.level = 10; logging.WARN = 30; logging.DEBUG = 10
```

then it works and the root logger level is DEBUG as expected. Great!

But what happens if the user leaves out the environment variable?

```
$ python my_app.py
Traceback (most recent call last):
  File "my_app.py", line 4, in 
logging.config.fileConfig('logging.ini', defaults=os.environ)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/config.py",
 line 86, in fileConfig
_install_loggers(cp, handlers, disable_existing_loggers)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/config.py",
 line 196, in _install_loggers
level = cp.get(sectname, "level")
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py",
 line 623, in get
return self._interpolate(section, option, value, d)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py",
 line 669, in _interpolate
option, section, rawval, e.args[0])
ConfigParser.InterpolationMissingOptionError: Bad value substitution:
section: [logger_root]
option : level
key: logging_logger_root_level
rawval : %(logging_logger_root_level)s
```

An error occurs as expected. 

But I'd like to be able to provide a default value so that user doesn't have to 
set the environment variable, so let's add this to the top of `logging.ini`:

```
[DEFAULT]
logging_logger_root_level = WARN
```

Now let's run the program again without the environment variable to see if that 
fixed the problem:

```
$ python my_app.py
2016-04-07 08:33:07,101 WARNI [__main__:8][MainThread] warn msg
2016-04-07 08:33:07,101 ERROR [__main__:9][MainThread] error msg
root_logger.level = 30; logging.WARN = 30; logging.DEBUG = 10
```

Awesome! It worked and set the root logger level to the default of WARN, as 
expected.

Now what happens if we try to override the default with an environment variable?

```
$ LOGGING_LOGGER_ROOT_LEVEL=DEBUG python my_app.py
2016-04-07 08:33:56,047 WARNI [__main__:8][MainThread] warn msg
2016-04-07 08:33:56,048 ERROR [__main__:9][MainThread] error msg
root_logger.level = 30; logging.WARN = 30; logging.DEBUG = 10
```

Doh! The root logger level is still WARN. So the default in the ini file took 
precedence over what the user provided. This is unfortunate.

So how does one provide defaults while also allowing overriding those defaults?

--

___
Python tracker 

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



[issue26710] ConfigParser: Values in DEFAULT section override defaults passed to constructor

2016-04-07 Thread Marc Abramowitz

Marc Abramowitz added the comment:

So I think changing the behavior of `defaults` might break backwards 
compatibility for folks who are relying on the old behavior.

So I guess I would propose adding a new parameter called `overrides`. These 
would take precedence over `defaults` and that allows retaining backwards 
compatibility.

--

___
Python tracker 

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



[issue18844] allow weights in random.choice

2016-04-07 Thread Steven Basart

Steven Basart added the comment:

Re-implemented with suggested improvements taken into account. Thanks 
@mark.dickinson and @pitrou for the suggestions.  

I also removed the redundant "fast path" portion for this code since it doesn't 
deal with generators anyways.

Let me know additional thoughts about it.

--
Added file: http://bugs.python.org/file42392/weighted_choice_v5.patch

___
Python tracker 

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



[issue18844] allow weights in random.choice

2016-04-07 Thread Steven Basart

Changes by Steven Basart :


Removed file: http://bugs.python.org/file42392/weighted_choice_v5.patch

___
Python tracker 

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



[issue18844] allow weights in random.choice

2016-04-07 Thread Steven Basart

Steven Basart added the comment:

Left in a line of code that was supposed to be removed. Fixed.

--
Added file: http://bugs.python.org/file42393/weighted_choice_v5.patch

___
Python tracker 

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



[issue26698] Tk DPI awareness

2016-04-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This is not an IDLE issue, and probably not a tkinter issue.  The display of 
characters on a screen is done by the OS font software under direction of 
tcl/tk.

What OS are you running and what version of Tk (see IDLE -> Help -> About IDLE)?

--
components:  -IDLE, Library (Lib)
nosy: +wordtech -kbk, roger.serwy
title: IDLE DPI Awareness -> Tk DPI awareness

___
Python tracker 

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



[issue26693] Exception ignored in: in _shutdown, assert tlock.locked()

2016-04-07 Thread skydoom

skydoom added the comment:

It looks like there is a bug in the _shutdown function of threading.py, that it 
does not check whether the _main_thread.is_alive() or not.  My temporary fix is 
to add the following checking in the beginning of _shutdown and it seems no 
more error message pop up:

if( _main_thread.is_active() is False ):
  return

Please see if this makes sense.

--

___
Python tracker 

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



[issue26693] Exception ignored in: in _shutdown, assert tlock.locked()

2016-04-07 Thread skydoom

skydoom added the comment:

sorry typo above, is_active should be read as is_alive.

--

___
Python tracker 

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



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2016-04-07 Thread John Lehr

John Lehr added the comment:

I’m glad you found it in the Apple specification.  I looked, but missed it.  I 
would absolutely defer to you on your assessment of the decoding.

> On Apr 7, 2016, at 1:46 AM, Serhiy Storchaka  wrote:
> 
> 
> Serhiy Storchaka added the comment:
> 
> UID is rather int than bytes. And I would use a special UID type.
> 
> According to Apple's sources [1], the size of UID data is tokenL+1, not 
> self._get_size(tokenL).
> 
> [1] http://www.opensource.apple.com/source/CF/CF-1153.18/CFBinaryPList.c
> 
> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2016-04-07 Thread John Lehr

John Lehr added the comment:

I’m sorry, but the files in which I detected the problem cannot be circulated.  
I will try to create a test account on Snapchat and generate some test data, 
but I can’t do this anytime soon.

> On Apr 7, 2016, at 12:51 AM, SilentGhost  wrote:
> 
> 
> SilentGhost added the comment:
> 
> Here is the version of the patch suitable for the Rietveld. John, could you 
> perhaps provide an example file that uses UID values?
> 
> Also, the code is identical to handling of 0x50 token, perhaps it could be 
> incorporated into it.
> 
> --
> nosy: +SilentGhost
> stage:  -> patch review
> versions: +Python 3.6
> Added file: http://bugs.python.org/file42390/issue26707.diff
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2016-04-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> ronaldoussoren

___
Python tracker 

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



[issue26711] Fix comparison of plistlib.Data

2016-04-07 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch fixes several bugs in plistlib.Data.__eq__().

* isinstance(other, str) was used instead of isinstance(other, bytes). Data 
always wraps bytes and should be comparable with bytes. str was correct type in 
Python 2.

* id(self) == id(other) is always false, because if other is self, the first 
condition (isinstance(other, self.__class__)) should be true. NotImplemented 
should be returned as fallback. This allows comparing with Data subclasses and 
correct work of __ne__().

* The __eq__() method should be used instead of the equality operator. This is 
needed for correct work in case if value is bytes subclass with overloaded 
__eq__().

--
components: Library (Lib)
files: plistlib_data_eq.patch
keywords: patch
messages: 263001
nosy: ronaldoussoren, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Fix comparison of plistlib.Data
type: behavior
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42394/plistlib_data_eq.patch

___
Python tracker 

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



[issue25320] unittest loader.py TypeError when code directory contains a socket

2016-04-07 Thread Mike Miller

Mike Miller added the comment:

Just as a side note, the patch also works for soft links that point to files 
that don't exist. Thanks for getting this fixed!

--
nosy: +Mike Miller

___
Python tracker 

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



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2016-04-07 Thread John Lehr

John Lehr added the comment:

Based on the format specification pointed to by Serhiy, perhaps this a better 
patch, correcting size from previous patch submission and treating:

706,707c706,708
< # tokenH == 0x80 is documented as 'UID' and appears to be used for
< # keyed-archiving, not in plists.
---
> elif tokenH == 0x80:  # UID
> s = self._get_size(tokenL + 1)
> return int.from_bytes(self._fp.read(s), 'big')

I have compared output with OS X plutil and plistlib.load() with this patch and 
the values are identical for UID fields.

--
Added file: http://bugs.python.org/file42395/plistlib_uid.diff

___
Python tracker 

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



[issue23551] IDLE to provide menu link to PIP gui.

2016-04-07 Thread Eric Khoo Jiun Hooi

Eric Khoo Jiun Hooi added the comment:

The search button of search tab still not done yet, so it still cannot be used 
now

--
Added file: http://bugs.python.org/file42396/pip_gui_v5.py

___
Python tracker 

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



[issue26671] Clean up path_converter in posixmodule.c

2016-04-07 Thread Martin Panter

Martin Panter added the comment:

Looks like the tests may need updating for a changed exception message:

http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/12996/steps/test/logs/stdio
==
FAIL: test_stat (test.test_posix.PosixTester)
--
TypeError: stat: path should be string, bytes or integer, not NoneType

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_posix.py", 
line 415, in test_stat
posix.stat, None)
AssertionError: "can't specify None for path argument" does not match "stat: 
path should be string, bytes or integer, not NoneType"

==
FAIL: test_stat_dir_fd (test.test_posix.PosixTester)
--
TypeError: argument should be integer or None, not str

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_posix.py", 
line 867, in test_stat_dir_fd
posix.stat, support.TESTFN, dir_fd=posix.getcwd())
AssertionError: "should be integer, not" does not match "argument should be 
integer or None, not str"

--
nosy: +martin.panter
status: closed -> open

___
Python tracker 

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



[issue26257] Eliminate buffer_tests.py

2016-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 197e1f8b28b7 by Martin Panter in branch '3.5':
Issue #26257: Eliminate buffer_tests.py and fix ByteArrayAsStringTest
https://hg.python.org/cpython/rev/197e1f8b28b7

New changeset ea598d69b7d3 by Martin Panter in branch 'default':
Issue #26257: Merge buffer_tests cleanup from 3.5
https://hg.python.org/cpython/rev/ea598d69b7d3

New changeset 26f1543e806c by Martin Panter in branch '2.7':
Issue #26257: Eliminate buffer_tests.py and fix ByteArrayAsStringTest
https://hg.python.org/cpython/rev/26f1543e806c

--
nosy: +python-dev

___
Python tracker 

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



[issue26671] Clean up path_converter in posixmodule.c

2016-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Martin.

--
status: open -> closed

___
Python tracker 

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



[issue26671] Clean up path_converter in posixmodule.c

2016-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 633bb190fb76 by Serhiy Storchaka in branch 'default':
Issue #26671: Fixed tests for changed error messages.
https://hg.python.org/cpython/rev/633bb190fb76

--

___
Python tracker 

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