[issue21314] Document '/' in signatures

2018-10-31 Thread Pradyun Gedam


Pradyun Gedam  added the comment:

We now have a PEP for this; just noting this here since I don't see a cross 
reference between them.

https://www.python.org/dev/peps/pep-0570/

--
nosy: +pradyunsg

___
Python tracker 

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



[issue35123] Add style guide for sentinel usage

2018-10-31 Thread Robert Wright


New submission from Robert Wright :

Sentinel values are used inconsistently in the Python code base.

It would be helpful to have a style guide (about eg. casing, placement, and 
sentinel reuse) to prevent arguments about their use in future code.

--
messages: 328984
nosy: madman bob
priority: normal
severity: normal
status: open
title: Add style guide for sentinel usage

___
Python tracker 

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



[issue35121] Cookie domain check returns incorrect results

2018-10-31 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the confirmation. I have created a PR 
(https://github.com/python/cpython/pull/10258) with test and added 3.8 as 
affected version. Please add in if I have missed anything in the PR.

--
versions: +Python 3.8

___
Python tracker 

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



[issue35123] Add style guide for sentinel usage

2018-10-31 Thread Eric V. Smith


Eric V. Smith  added the comment:

Could you give some examples of problems caused by inconsistent usage of 
sentinels?

I do often wish modules exposed their sentinel values, since it makes writing 
wrappers easier. It's one of the reasons I ended up exposing 
dataclasses.MISSING.

--
nosy: +eric.smith

___
Python tracker 

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



[issue35122] Process not exiting on unhandled exception when using multiprocessing module

2018-10-31 Thread akhi singhania


New submission from akhi singhania :

I am not sure if this is an implementation bug or just a documentation bug.  
When using the multiprocessing module, I have come across a scenario where the 
process fails to exit when it throws an unhandled exception because it is 
waiting for the feeder thread to join forever.  Sending SIGINT doesn't cause 
the process to exit either but sending SIGTERM does cause it to exit.

I have attached a simple reproducer.

When main() raises the unhandled exception, the process does not exit.  
However, if the size of data that is enqueued is reduced or the child process 
closes the queue on exiting, then the process exits fine.  

In the scenario, when the process exits successfully, I see the following 
output:

 creating queue
[DEBUG/MainProcess] created semlock with handle 140197742751744
[DEBUG/MainProcess] created semlock with handle 140197742747648
[DEBUG/MainProcess] created semlock with handle 140197742743552
[DEBUG/MainProcess] Queue._after_fork()
 created queue
 creating process
 starting process
 started process
 starting enqueue
[DEBUG/MainProcess] Queue._start_thread()
[DEBUG/MainProcess] doing self._thread.start()
[DEBUG/Process-1] Queue._after_fork()
[INFO/Process-1] child process calling self.run()
[DEBUG/MainProcess] starting thread to feed data to pipe
[DEBUG/MainProcess] ... done self._thread.start()
 done enqueue
 starting sleep
 done sleep
Traceback (most recent call last):
  File "example.py", line 58, in 
main()
  File "example.py", line 54, in main
raise Exception('foo')
Exception: foo
[INFO/MainProcess] process shutting down
[DEBUG/MainProcess] running all "atexit" finalizers with priority >= 0
[DEBUG/MainProcess] telling queue thread to quit
[DEBUG/MainProcess] running the remaining "atexit" finalizers
[DEBUG/MainProcess] joining queue thread
[DEBUG/MainProcess] feeder thread got sentinel -- exiting
[DEBUG/MainProcess] ... queue thread joined


In the scenario when the process does not exit successfully, I see the 
following output:

 creating queue
[DEBUG/MainProcess] created semlock with handle 139683574689792
[DEBUG/MainProcess] created semlock with handle 139683574685696
[DEBUG/MainProcess] created semlock with handle 139683574681600
[DEBUG/MainProcess] Queue._after_fork()
 created queue
 creating process
 starting process
 started process
 starting enqueue
[DEBUG/MainProcess] Queue._start_thread()
[DEBUG/MainProcess] doing self._thread.start()
[DEBUG/Process-1] Queue._after_fork()
[INFO/Process-1] child process calling self.run()
[DEBUG/MainProcess] starting thread to feed data to pipe
[DEBUG/MainProcess] ... done self._thread.start()
 done enqueue
 starting sleep
 done sleep
Traceback (most recent call last):
  File "example.py", line 58, in 
main()
  File "example.py", line 54, in main
raise Exception('foo')
Exception: foo
[INFO/MainProcess] process shutting down
[DEBUG/MainProcess] running all "atexit" finalizers with priority >= 0
[DEBUG/MainProcess] telling queue thread to quit
[DEBUG/MainProcess] running the remaining "atexit" finalizers
[DEBUG/MainProcess] joining queue thread
 Process hangs here 



I found the "solution" of closing the queue in the child by trial and error and 
looking through the code.  The current documentation suggests that 
multiprocessing.Queue.close() and multiprocessing.Queue.join_thread() are 
"usually unnecessary for most code".  I am not sure if the attached code can be 
classified as normal code.  I believe that at the very least, the documentation 
should be updated or maybe it should be investigated if some code changes can 
address this.

--
components: Extension Modules
files: example.py
messages: 328983
nosy: akhi singhania
priority: normal
severity: normal
status: open
title: Process not exiting on unhandled exception when using multiprocessing 
module
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47896/example.py

___
Python tracker 

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



[issue35124] Add style guide for unit tests

2018-10-31 Thread Robert Wright


New submission from Robert Wright :

There should be a style guide for tests, to prevent arguments about their use 
in future code.

--
messages: 328986
nosy: madman bob
priority: normal
severity: normal
status: open
title: Add style guide for unit tests

___
Python tracker 

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



[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-31 Thread miss-islington


miss-islington  added the comment:


New changeset 907b07ee31a657914dafb0a6b7fa724be0f8d8ac by Miss Islington (bot) 
in branch '3.6':
bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. 
(GH-10217)
https://github.com/python/cpython/commit/907b07ee31a657914dafb0a6b7fa724be0f8d8ac


--

___
Python tracker 

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



[issue35121] Cookie domain check returns incorrect results

2018-10-31 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +martin.panter, orsenthil

___
Python tracker 

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



[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-31 Thread Xiang Zhang


Change by Xiang Zhang :


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

___
Python tracker 

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



[issue35119] Customizing module attribute access example raises RecursionError

2018-10-31 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report Denis. Would you like to propose a PR for this? The file 
is at https://github.com/python/cpython/blob/master/Doc/reference/datamodel.rst 
. This was added as part of 5364b5cd757. I am adding Ivan who added the example 
for confirmation and review.

--
nosy: +levkivskyi, xtreak

___
Python tracker 

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



[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-31 Thread miss-islington


miss-islington  added the comment:


New changeset 05acd44ad6b61adb24571eb0203de7b25c7e869b by Miss Islington (bot) 
in branch '2.7':
bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. 
(GH-10217)
https://github.com/python/cpython/commit/05acd44ad6b61adb24571eb0203de7b25c7e869b


--

___
Python tracker 

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



[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-31 Thread miss-islington


miss-islington  added the comment:


New changeset 71b6c1af727fbe13525fb734568057d78cea33f3 by Miss Islington (bot) 
in branch '3.7':
bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. 
(GH-10217)
https://github.com/python/cpython/commit/71b6c1af727fbe13525fb734568057d78cea33f3


--
nosy: +miss-islington

___
Python tracker 

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



[issue35115] UUID objects can't be casted by `hex()`

2018-10-31 Thread fcurella


fcurella  added the comment:

I'm not sure what can be done to make UUIDs work with `hex()`. The only way I 
see is to add back something _like_ `__hex__`, but with a different name.

But in that case, I can see how the same arguments that were originally brought 
up against `__hex__` could apply to the new dunder method.

I'm closing the issue as 'wont fix'.

--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue35119] Customizing module attribute access example raises RecursionError

2018-10-31 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm not convinced that any change is needed, this is completely expected 
behaviour (and not special to modules).

The following code also raises RecursionError:

class VerboseObject:
def __setattr__(self, nm, value):
print(f"Setting {nm} to {value}")
setattr(self, nm, value)

o = VerboseObject()
o.a = 42

This is because setattr() calls the __setattr__ method, which calls setattr() 
again, ... .


The fix is to call super().__setattr__ instead:

class VerboseObject:
def __setattr__(self, nm, value):
print(f"Setting {nm} to {value}")
super().__setattr__(nm, value)

o = VerboseObject()
o.a = 42

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue35033] Column or row spanning cells are not implemented.

2018-10-31 Thread Julien Palard


Julien Palard  added the comment:

https://github.com/sphinx-doc/sphinx/pull/5559 has been merged, let's wait for 
a release of Sphinx and we'll be able to build Python 3.8 documentation as text 
again.

--

___
Python tracker 

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



[issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year

2018-10-31 Thread Tal Einat


Tal Einat  added the comment:

> I think for starters we should document the behavior of strptime when no 
> year, month or day are specified. As part of that documentation, we can add a 
> footnote about Feb 29th.

This sounds good to me.

We could also improve the exception raised in the specific case of Feb 29th; 
IMO this should be a separate PR.

--

___
Python tracker 

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



[issue35125] asyncio shield: remove inner callback on outer cancellation

2018-10-31 Thread mainro


New submission from mainro :

When the future returned by shield is cancelled, its completion callback of the 
inner future is not removed. This makes the callback list of inner inner future 
grow each time a shield is created.

--
components: asyncio
files: shield_cancel.patch
keywords: patch
messages: 328997
nosy: asvetlov, mainro, yselivanov
priority: normal
severity: normal
status: open
title: asyncio shield: remove inner callback on outer cancellation
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file47897/shield_cancel.patch

___
Python tracker 

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



[issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker

2018-10-31 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

The issue with the 3.6 branch is https://bugs.python.org/issue31625 which 
hasn't been backported to 3.6. Would it make sense to backport it?

I have the backports ready locally but not sure if pushing 
https://bugs.python.org/issue31625 to 3.6 is desirable.

--
nosy: +cstratak

___
Python tracker 

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



[issue35111] Make Custom Object Classes JSON Serializable

2018-10-31 Thread andrew c


andrew c  added the comment:

Bob,

I understand what you are saying, but having a built-in is way easier than 
encoder/decoders.  You can still have both actually.  Even if you didn't have 
two way, a one way would be amazingly helpful.  For large development systems, 
a __json__ method would make serialization super easy.

class foo(object):
 a = 1
 b = [1,2,3]
 def __json__(self): return {'a':self.a,'b':self.b}

--

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2018-10-31 Thread Pawel


New submission from Pawel :

In this question:
https://docs.python.org/2.7/faq/programming.html#how-do-i-convert-a-number-to-a-string

There is a statement:
"{:.3f}".format(1/3) yields '0.333'

While

In [2]: "{:.3f}".format(1/3)
Out[2]: '0.000'

In [3]: "{:.3f}".format(1/3.0)
Out[3]: '0.333'

--
assignee: docs@python
components: Documentation
messages: 329000
nosy: docs@python, grottrumsel
priority: normal
severity: normal
status: open
title: Mistake in FAQ about converting number to string.
versions: Python 2.7

___
Python tracker 

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



[issue35111] Make Custom Object Classes JSON Serializable

2018-10-31 Thread Bob Ippolito


Bob Ippolito  added the comment:

That's what the for_json method is in simplejson, it does not have widespread 
usage.

You can implement that when encoding:

```
def json_default(obj):
try:
return obj.__json__()
except AttributeError:
raise TypeError("{} can not be JSON encoded".format(type(obj)))


json.dumps(foo(), default=json_default)
```

This way, you can choose precisely how the output needs to work when encoding. 
It's not ideal for every use case, but nothing is. The point is that it doesn't 
get in your way, whatever you need to do can be done without any awful tricks, 
so long as you have control over the dumps call site.

--

___
Python tracker 

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



[issue35127] pyurandom() fails if user does not have an entropy device

2018-10-31 Thread Gyff Mjord


New submission from Gyff Mjord :

Because of [reasons], I installed a FreeBSD and recompiled it to provide a 
minimalist kernel. Thus, it does not have the entropy devices /dev/urandom and 
/dev/random

It is a FreeBSD-10-0 running in a Hyper-V virutalization platform.

I kinda recompiled python-3.7.1 from the source code to get my own version of 
python running, but I got stuck in this part. So looking at the 
Modules/bootstrap_hash.c file I do not see the code of pyurandom() falling back 
to a something silly.

Plus, there is a problem that happens only in Unix at least in this version of 
python. Looking at the code of the same file. we can see:

static int pyurandom(...)
{
...
int res
...
if (res < 0){
  return -1
}
if (res == 1){
  return 0
}
...
}

I am sorry for the laziness but I believe my point is clear.

The thing is. If the random function returns 0 it will return 0 but if it 
returns 1 it will also return 0.

In other words, the number 1 is out of the scope of the random numbers. It is a 
small prejudice for the random function, but it is not mathematically right. 
This issue with the number 1, does not happen if the user does not have 
/dev/random (But it still needs /dev/urandom)

--
components: FreeBSD
messages: 329005
nosy: koobs, pehdrah
priority: normal
severity: normal
status: open
title: pyurandom() fails if user does not have an entropy device
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue31625] stop using ranlib

2018-10-31 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

Would it make sense to backport that to 3.6 as well? Currently this blocks 
https://bugs.python.org/issue28015 from being backported to 3.6

--
nosy: +cstratak

___
Python tracker 

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



[issue35123] Add style guide for sentinel usage

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:

Context: https://github.com/python/cpython/pull/8548#pullrequestreview-166711603

--
nosy: +vstinner

___
Python tracker 

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



[issue34912] Update overflow checks in resize_buffer

2018-10-31 Thread Windson Yang


Windson Yang  added the comment:

Sorry, Stefan Behnel, I still don't get it. alloc will always bigger than size 
after the if else case:
 
if (size < alloc / 2) {
/* Major downsize; resize down to exact size. */
alloc = size + 1;
}
else if (size < alloc) {
/* Within allocated size; quick exit */
return 0;
}
else if (size <= alloc * 1.125) {
/* Moderate upsize; overallocate similar to list_resize() */
alloc = size + (size >> 3) + (size < 9 ? 3 : 6);
}
else {
/* Major upsize; resize up to exact size */
alloc = size + 1;
}

Since we limit the alloc at:

if (alloc > PY_SIZE_MAX / sizeof(Py_UCS4))
goto overflow;

whenever size > PY_SIZE_MAX / sizeof(Py_UCS4) at first will cause alloc 
overflow. So why not limit size to PY_SIZE_MAX / sizeof(Py_UCS4) at the 
beginning?

--

___
Python tracker 

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



[issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9578

___
Python tracker 

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



[issue35128] warning.warn messages with spacing issues

2018-10-31 Thread Pablo Santiago Blum de Aguiar


Pablo Santiago Blum de Aguiar  added the comment:

Sorry, only when creating the PR I read that trivial changes like this  need no 
issue.

--
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue35129] Different behaviour comparing versions (distutils.version.LooseVersion) between python2.7 and python3.x

2018-10-31 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

There is no need to split the relevant code into a third-party website, 
especially when it is so small and can be included in-line here.


Python 2.7:

py> import distutils.version
py> distutils.version.LooseVersion('7') > distutils.version.LooseVersion('XP')
False




Python 3.6:

py> import distutils.version
py> distutils.version.LooseVersion('7') > distutils.version.LooseVersion('XP')
Traceback (most recent call last):
  File "", line 1, in 
  File "/storage/python/Python-3.6.4/Lib/distutils/version.py", line 64, in 
__gt__
c = self._cmp(other)
  File "/storage/python/Python-3.6.4/Lib/distutils/version.py", line 337, in 
_cmp
if self.version < other.version:
TypeError: '<' not supported between instances of 'int' and 'str'



(By the way, you appear to have a bug in your sys.excepthook handler. At least 
I can't reproduce the ModuleNotFoundError you are getting.)

--
nosy: +steven.daprano

___
Python tracker 

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



[issue35124] Add style guide for unit tests

2018-10-31 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I think this is being excessively prescriptive and solving a problem that isn't 
a problem.

But perhaps if you start by proposing a concrete style guide, I can judge 
better.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2be00d987d37682a55db67c298e82c405d01b868 by Victor Stinner in 
branch 'master':
bpo-35081: Move Py_BUILD_CORE code to internal/mem.h (GH-10249)
https://github.com/python/cpython/commit/2be00d987d37682a55db67c298e82c405d01b868


--

___
Python tracker 

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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9574

___
Python tracker 

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



[issue35129] Different behaviour comparing versions (distutils.version.LooseVersion) between python2.7 and python3.x

2018-10-31 Thread davide moro


New submission from davide moro :

I noticed that with the python2.7 version of distutils.version.LooseVersion let 
you compare '7' with 'xp' without exceptions (e.g., LooseVersion('7') > 
LooseVersion('xp')).

If you do the same with python3.6 or python3.7, you'll get the following 
exception:

*  TypeError: '<' not supported between instances of 'int' and 'str'

You can see the full example with complete traceback and differences between 
python2.x and python3.x here:

* https://pastebin.com/kAwUTihe

Thanks,

davide

--
components: Distutils
messages: 329018
nosy: davide moro, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Different behaviour comparing versions (distutils.version.LooseVersion) 
between python2.7 and python3.x
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue30410] Documentation for sys.stdout encoding does not reflect the new Windows behavior in Python 3.6+

2018-10-31 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
keywords: +patch
pull_requests: +9575
stage:  -> patch review

___
Python tracker 

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



[issue34965] Python on Docker container using flask is going down after sometime

2018-10-31 Thread Windson Yang


Windson Yang  added the comment:

Hello, Srikanth, I think you have to look through the docker documents like 
https://docs.docker.com/config/containers/logging/

--

___
Python tracker 

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



[issue35124] Add style guide for unit tests

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:

Context: https://github.com/python/cpython/pull/8548#pullrequestreview-166712031

--
nosy: +vstinner

___
Python tracker 

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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:

> Include/internal/pystate.h uses #include "pystate.h" to include 
> Include/pystate.h, but it tries to include itself 
> (Include/internal/pystate.h) which does nothing because of "#ifndef 
> Py_INTERNAL_PYSTATE_H #define Py_INTERNAL_PYSTATE_H ... #endif".

I proposed to rename internal header files, add an "internal_" prefix, to avoid 
this issue: PR 10263.

--

___
Python tracker 

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



[issue35113] inspect.getsource returns incorrect source for classes when class definition is part of multiline strings

2018-10-31 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue34965] Python on Docker container using flask is going down after sometime

2018-10-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

What version of Python are you using? 

There is very few things we can do on out side if you don't provide some 
reproducer or some evidence that CPython is the source of this problem and not 
your application code or a third party module.

Could you try to attach a reproducer?

--
components: +Interpreter Core -Tests
nosy: +pablogsal

___
Python tracker 

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



[issue35105] Document that CPython accepts "invalid" identifiers

2018-10-31 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue35119] Customizing module attribute access example raises RecursionError

2018-10-31 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

Yes, this is expected, you should use ``super().__setattr__()``.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue35122] Process not exiting on unhandled exception when using multiprocessing module

2018-10-31 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Unless I don't understand the issue correctly, this is documented here:

https://docs.python.org/3/library/multiprocessing.html#multiprocessing-programming

Bear in mind that a process that has put items in a queue will wait before 
terminating until all the buffered items are fed by the “feeder” thread to the 
underlying pipe. (The child process can call the Queue.cancel_join_thread 
method of the queue to avoid this behaviour.)

This means that whenever you use a queue you need to make sure that all items 
which have been put on the queue will eventually be removed before the process 
is joined. Otherwise you cannot be sure that processes which have put items on 
the queue will terminate. Remember also that non-daemonic processes will be 
joined automatically.


In you example, if you add:

ch._queue.get()

before raising the exception, the program does not hang anymore once the item 
is taken out of the queue.

--
nosy: +pablogsal

___
Python tracker 

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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9577

___
Python tracker 

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



[issue35128] warning.warn messages with spacing issues

2018-10-31 Thread Pablo Santiago Blum de Aguiar


New submission from Pablo Santiago Blum de Aguiar :

Some warn messages miss space between words, such as:

Use of 'buffering' argument is deprecated  and ignoredsince Python 3.0.

in bz2 library, and:

keyfile and certfile are deprecated, use acustom context instead

in many libraries, such as poplib and smtplib.

Other warn messages contain too much spaces between words, such as:

The 'filename' attribute will be removed in future versions.  Use 'source' 
instead.

in configparser library.

I'm not sure if such issues affect older versions of Python. I might need help 
on that.

--
messages: 329016
nosy: scorphus
priority: normal
severity: normal
status: open
title: warning.warn messages with spacing issues
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue35123] Add style guide for sentinel usage

2018-10-31 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I was not aware that there currently were arguments about the use of sentinels 
in future code. I feel that you are being excessively prescriptive here:

"we should nip it in the bud"

is good advice for gardening, but for programming it just results in a lot of 
pre-emptive arguments about prescriptive rules that aren't needed.

What makes a sentinel a sentinel is *how it is used*, not what it is. As such, 
sentinels are just another type of (pseudo-)constant, and the same style guides 
should apply: in general, they should be in UPPER case, at the top of the 
module. (But remember the rule about foolish consistency.)

And each sentinel should be reused exactly as often as is appropriate. The same 
as any other constant.

As for exposing sentinels, the same applies to any part of the implementation. 
Should we make this a public part of the API or a private implementation 
detail? That has to be judged on a case-by-case basis. Making a rule or even a 
guideline that just because something is a sentinel is "should be" public (or 
private) is precisely the sort of thing I don't want to see. Sentinels should 
be public when it makes sense to make them public and private when it makes 
sense to keep them as private implementation details.

The bottom line is, I don't think we need sentinel-specific rules in the style 
guide. That would be like adding specific rules for "numeric constants", or 
specific rules for "constants used by decorators".

--
nosy: +steven.daprano

___
Python tracker 

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



[issue35127] pyurandom() fails if user does not have an entropy device

2018-10-31 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue25416] Add encoding aliases from the (HTML5) Encoding Standard

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue24916] In sysconfig, don't rely on sys.version format

2018-10-31 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

I'm working on changing _PY_VERSION to get its value from sys.version_info 
instead of sys.version, but I am not sure what the best way is to map between a 
release stage to the corresponding letter(release->rc). Could someone help me a 
tiny bit with this one?

--
nosy: +lys.nikolaou

___
Python tracker 

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



[issue35118] Add peek() or first() method in queue

2018-10-31 Thread Windson Yang


Change by Windson Yang :


--
keywords: +patch
pull_requests: +9576
stage:  -> patch review

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2018-10-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yep, this is incorrect in Python 2 unless `from __future__ import division` is 
imported at the beginning. Would you want to make a PR against the 2.7 branch 
to correct this?

--
nosy: +pablogsal

___
Python tracker 

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



[issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL

2018-10-31 Thread Eric Snow


Change by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL

2018-10-31 Thread miss-islington


miss-islington  added the comment:


New changeset 192c54713b4c67a8d14b2d98056771feba40ca37 by Miss Islington (bot) 
in branch '3.7':
bpo-26558: Fix Py_FatalError() with GIL released (GH-10267)
https://github.com/python/cpython/commit/192c54713b4c67a8d14b2d98056771feba40ca37


--
nosy: +miss-islington

___
Python tracker 

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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 50b48572d9a90c5bb36e2bef6179548ea927a35a by Victor Stinner in 
branch 'master':
bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266)
https://github.com/python/cpython/commit/50b48572d9a90c5bb36e2bef6179548ea927a35a


--

___
Python tracker 

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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9583

___
Python tracker 

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



[issue35120] SSH tunnel support to ftp lib

2018-10-31 Thread Windson Yang


Windson Yang  added the comment:

Hello, Mohit Sharma. Would you mind adding more details about the bug?

--
nosy: +Windson Yang

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9585

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9586

___
Python tracker 

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



[issue35130] add same file name to zipfile , result two files and same md5

2018-10-31 Thread MasterZ


New submission from MasterZ :

step 1.I have one file named "1",then add this file to zipfile A.zip
step 2.then I have another file named "1" too but different content, and add 
this file to zipfile A.zip
result:in the A.zip exist 2 files both named "1" and both of their md5 is the 
name with step2's file

--
components: IO
files: a.py
messages: 329041
nosy: MasterZ
priority: normal
severity: normal
status: open
title: add same file name to zipfile ,result two files and same md5
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47898/a.py

___
Python tracker 

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



[issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3a228ab17c2a9cffd1a2f15f30d6209768de20a6 by Victor Stinner in 
branch 'master':
bpo-26558: Fix Py_FatalError() with GIL released (GH-10267)
https://github.com/python/cpython/commit/3a228ab17c2a9cffd1a2f15f30d6209768de20a6


--

___
Python tracker 

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



[issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL

2018-10-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9579

___
Python tracker 

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



[issue35123] Add style guide for sentinel usage

2018-10-31 Thread Eric V. Smith


Eric V. Smith  added the comment:

I don't see any problems that need solving.

My only interest in this is that I tend to think sentinels that are used for 
missing parameters should be exposed, and this isn't always an obvious 
consideration when designing an API.

For example, say there's a library that has a function:
open(name, type, [mode])

That is, mode is optional. I realize that in pure Python, I could find out what 
sentinel value they're using, unless they're playing tricks with args and 
kwargs. But maybe this is written in C.

Now, say I want to write a wrapper around this, called myopen, and always pass 
in "foo" for type.

I'd need to use my own sentinel:
_MISSING= object()
def myopen(name, mode=_MISSING)

But, how do I call open? In the past, I've done things like:
if mode is _MISSING:
  return open(name, "foo")
else:
  return open(name, "foo", mode)

That doesn't scale well if there are multiple optional parameters.

In any event, this just seems like a guideline we should be aware of when 
adding APIs.

Absent any concrete proposals for a "sentinel style guide", I don't think 
there's anything actionable here. I agree with Steven that it's a case-by-case 
thing. One size need not fit all.

As to the issue referenced by Victor: I'm not sure what a style guide would 
bring to the table. I think the issue of whether to use a second sentinel or 
not could be decided in this file alone, without needed a global decision.

--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-31 Thread Eric Snow


Change by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue32804] urllib.retrieve documentation doesn't mention context parameter

2018-10-31 Thread Xiang Zhang


Change by Xiang Zhang :


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

___
Python tracker 

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



[issue35105] Document that CPython accepts "invalid" identifiers

2018-10-31 Thread orlnub123


orlnub123  added the comment:

I'd argue that it's an implementation detail. Documenting it might be nice as 
some projects such as pytest do use it but I don't think it would make sense in 
setattr() or getattr() since all they do (at least in this case) is 
assign/retrieve from the __dict__. One thing to note is that __slots__ doesn't 
accept them.

--
nosy: +orlnub123

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9588

___
Python tracker 

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



[issue35105] Document that CPython accepts "invalid" identifiers

2018-10-31 Thread orlnub123


orlnub123  added the comment:

The customizing attribute access section of the data model might be a suitable 
place.

--

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9584

___
Python tracker 

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



[issue35101] inspect.findsource breaks on class frame objects

2018-10-31 Thread orlnub123


orlnub123  added the comment:

Added the requested test cases. They aren't an exact match but they should 
serve the same purpose.

--

___
Python tracker 

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



[issue35128] warning.warn messages with spacing issues

2018-10-31 Thread Pablo Santiago Blum de Aguiar


Change by Pablo Santiago Blum de Aguiar :


--
pull_requests: +9581

___
Python tracker 

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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9582

___
Python tracker 

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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e281f7d80ce2584a7e6a36acffb5a9cd796a0fe2 by Victor Stinner in 
branch 'master':
bpo-35081: Move accu.h to Include/internal/pycore_accu.h (GH-10271)
https://github.com/python/cpython/commit/e281f7d80ce2584a7e6a36acffb5a9cd796a0fe2


--

___
Python tracker 

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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:

Copy of my comment on PR 10271:
https://github.com/python/cpython/pull/10271#issuecomment-434897408

I tried to enforce to require Py_BUILD_CORE in pycore_accu.h to be defined 
using:

#ifndef Py_BUILD_CORE
#  error "Py_BUILD_CORE must be defined to include this header"
#endif

But the compilation of the _json module failed, because it isn't compiled with 
Py_BUILD_CORE. Moreover, _json.c contains:

/* Core extension modules are built-in on some platforms (e.g. Windows). */
#ifdef Py_BUILD_CORE
#define Py_BUILD_CORE_BUILTIN
#undef Py_BUILD_CORE
#endif

--

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
title: Rename Include/internals/ to Include/pycore/ -> Move internal headers to 
Include/internal/

___
Python tracker 

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



[issue32804] urllib.retrieve documentation doesn't mention context parameter

2018-10-31 Thread Xiang Zhang


Xiang Zhang  added the comment:


New changeset aa39c1ab6de6d3fb0204741efdde9b7eed25b093 by Xiang Zhang 
(Lysandros Nikolaou) in branch '2.7':
[2.7] bpo-32804: Include the context parameter in urlretrieve documentation 
(GH-10203)
https://github.com/python/cpython/commit/aa39c1ab6de6d3fb0204741efdde9b7eed25b093


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-35081: And pycore_lifecycle.h and pycore_pathconfig.h (GH-10273)

I tried to add the Py_BUILD_CORE guard in pycore_pathconfig.h:

+#ifndef Py_BUILD_CORE
+#  error "Py_BUILD_CORE must be defined to include this header"
+#endif

But it breaks the compilation of _testcapimodule.c: get_coreconfig() uses 
_Py_wstrlist_as_pylist(), and _Py_wstrlist_as_pylist() is defined in 
pycore_pathconfig.h.

IMHO _testcapi should be compiled with Py_BUILD_CORE defined. I wrote PR 10274 
but then _testcapi fails because of datetime.h: this bug should be fixed by PR 
10238.

--

___
Python tracker 

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



[issue35105] Document that CPython accepts "invalid" identifiers

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:

> I'd argue that it's an implementation detail. Documenting it might be nice as 
> some projects such as pytest do use it but I don't think it would make sense 
> in setattr() or getattr() since all they do (at least in this case) is 
> assign/retrieve from the __dict__. One thing to note is that __slots__ 
> doesn't accept them.

Maybe it's obvious to you, but the question is asked again and again, at least 
once per year. So it seems like we need to document it somewhere.

--

___
Python tracker 

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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-31 Thread Eric Snow


Change by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue35105] Document that CPython accepts "invalid" identifiers

2018-10-31 Thread Windson Yang


Windson Yang  added the comment:

I agreed we should document it, it' not obvious to me at least.

--
nosy: +Windson Yang

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9587

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9589

___
Python tracker 

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



[issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9580

___
Python tracker 

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



[issue35129] Different behaviour comparing versions (distutils.version.LooseVersion) between python2.7 and python3.x

2018-10-31 Thread Éric Araujo

Éric Araujo  added the comment:

Please discuss on #14894

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> distutils.LooseVersion fails to compare number and a word

___
Python tracker 

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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 27e2d1f21975dfb8c0ddcb192fa0f45a51b7977e by Victor Stinner in 
branch 'master':
bpo-35081: Add pycore_ prefix to internal header files (GH-10263)
https://github.com/python/cpython/commit/27e2d1f21975dfb8c0ddcb192fa0f45a51b7977e


--

___
Python tracker 

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



[issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ff56597151206a03ce421712516323430b7749c8 by Victor Stinner in 
branch '3.6':
bpo-26558: Fix Py_FatalError() with GIL released (GH-10267) (GH-10270)
https://github.com/python/cpython/commit/ff56597151206a03ce421712516323430b7749c8


--

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-10-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a1c249c40517917d2e0971d55aea8d14a44b2cc8 by Victor Stinner in 
branch 'master':
bpo-35081: And pycore_lifecycle.h and pycore_pathconfig.h (GH-10273)
https://github.com/python/cpython/commit/a1c249c40517917d2e0971d55aea8d14a44b2cc8


--

___
Python tracker 

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid -> process mapping.

2018-10-31 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +9590

___
Python tracker 

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



[issue35128] warning.warn messages with spacing issues

2018-10-31 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue35128] warning.warn messages with spacing issues

2018-10-31 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Library (Lib)
type:  -> behavior

___
Python tracker 

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



[issue35128] warning.warn messages with spacing issues

2018-10-31 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think double space after a period is not a bug.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid -> process mapping.

2018-10-31 Thread Mike Frysinger


Mike Frysinger  added the comment:

that's highlighting the SemLock._make_name func which doesn't have retry logic 
in it.  did you mean to highlight SemLock.__init__ which has a retry loop that 
looks similar to the C code ?
https://github.com/python/cpython/blob/a1c249c40517917d2e0971d55aea8d14a44b2cc8/Lib/multiprocessing/synchronize.py#L55-L65

--

___
Python tracker 

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



[issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker

2018-10-31 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Probably that's fine, but can #31625 be easily worked around by, e.g., using 
make AR=llvm-ar RANLIB=llvm-ranlib?

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid -> process mapping.

2018-10-31 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Yes

On Wed, Oct 31, 2018, at 22:40, Mike Frysinger wrote:
>
> Mike Frysinger  added the comment:
>
> that's highlighting the SemLock._make_name func which doesn't
> have retry> logic in it.  did you mean to highlight SemLock.__init__ which 
> has a
> retry loop that looks similar to the C code ?
> https://github.com/python/cpython/blob/a1c249c40517917d2e0971d55aea8d14a44b2cc8/Lib/multiprocessing/synchronize.py#L55-L65>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid -> process mapping.

2018-10-31 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

The retry logic is implemented at a different layer in Python 3: 
https://github.com/python/cpython/blob/a1c249c40517917d2e0971d55aea8d14a44b2cc8/Lib/multiprocessing/synchronize.py#L115-L117

--

___
Python tracker 

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



[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-31 Thread Xiang Zhang


Xiang Zhang  added the comment:


New changeset b08746bfdf64e55ce33516f2065fa2aa4f51be95 by Xiang Zhang in branch 
'master':
bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. 
(GH-10217)
https://github.com/python/cpython/commit/b08746bfdf64e55ce33516f2065fa2aa4f51be95


--

___
Python tracker 

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



[issue31354] Fixing a bug related to LTO only build

2018-10-31 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
pull_requests: +9572

___
Python tracker 

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



[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9573

___
Python tracker 

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



[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9571

___
Python tracker 

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



[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9570

___
Python tracker 

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



[issue35123] Add style guide for sentinel usage

2018-10-31 Thread Robert Wright


Robert Wright  added the comment:

Just the classic problems caused by inconsistency in code - confusion when 
reading, and disagreements when writing.

For reading: Where should I look in a file for the sentinels? Is this value a 
sentinel, or is it some other type of variable?

For writing, there will always be disagreements in PRs, so we should nip it in 
the bud.

You raise a good point about exposing sentinel values. I was previously on the 
fence about whether sentinels should (in general) be private, or public.

--

___
Python tracker 

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



[issue25416] Add encoding aliases from the (HTML5) Encoding Standard

2018-10-31 Thread Ezio Melotti


Ezio Melotti  added the comment:

Adding those aliases sounds good to me.  I think it would be good to add some 
tests first (possibly as a separate issue/pr), even though I'm not sure what 
would be the best way to test the aliases.

Testing if the list is complete/correct should be done against the 
HTML5/Unicode specs, but that, if automated, would require downloading/parsing 
the specs and is probably not worth doing it.

We can also check that all the aliases are accepted by str.encode/decode, and 
all corresponding aliases should give the same result, however if 
str.encode/decode use the aliases dict, the test is nothing more than a sanity 
check and won't detect e.g. typos in the aliases names, or wrongly assigned 
aliases.

--
nosy: +fbidu
stage: patch review -> test needed
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue35121] Cookie domain check returns incorrect results

2018-10-31 Thread 西田雄治

New submission from 西田雄治 :

http.cookiejar.DefaultPolicy.domain_return_ok returns incorrect results.

So, HTTP clients send cookies which issued from wrong server.

policy = http.cookiejar.DefaultCookiePolicy()
req = urllib.request.Request('https://xxxfoo.co.jp/')
print(policy.domain_return_ok('foo.co.jp', req)   # should be False, but it 
returns True

--
components: Library (Lib)
messages: 328973
nosy: 西田雄治
priority: normal
severity: normal
status: open
title: Cookie domain check returns incorrect results
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



  1   2   >