[issue36170] posix_spawn doesn't exist in 3.7

2019-03-02 Thread Mark Williams


Change by Mark Williams :


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

___
Python tracker 

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



[issue36170] posix_spawn doesn't exist in 3.7

2019-03-02 Thread Mark Williams


New submission from Mark Williams :

The 3.8 docs claim that os.posix_spawn was introduced in 3.7, but it wasn't; it 
will be introduced in 3.8.

https://docs.python.org/3.8/library/os.html#os.posix_spawn

--
assignee: docs@python
components: Documentation
messages: 337027
nosy: Mark.Williams, docs@python
priority: normal
severity: normal
status: open
title: posix_spawn doesn't exist in 3.7
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



[issue36169] Add overlap() method to statistics.NormalDist()

2019-03-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Another cross-check can be had with this nomogram: 
https://www.rasch.org/rmt/rmt101r.htm

--

___
Python tracker 

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



[issue26752] Mock(2.0.0).assert_has_calls() raise AssertionError in two same calls

2019-03-02 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

eat_self is also a problem as mentioned and would help in solving issue27715 
where self is not ignored. I tried a patch for issue27715 but that would 
require changing the output of some functions that take _eat_self as a 
parameter to return _eat_self since the functions themselves change the value. 
So some call sites need to be updated to receive actual value for _eat_self 
when the signature is created.

It's a hard issue and there are less tests in this area so it's even harder to 
figure out all the existing cases supported and if the solution is breaking 
existing code. Also the general repr during failure could be improved since it 
just says prints same call object for expected and actual with an assertion 
error making it more confusing (issue25312). 

I think there are currently 3-4 different variants of this issue in the tracker 
due to wrong signature that could be resolved if _call_matcher becomes more 
robust using correct signature.

--

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-02 Thread Nick Coghlan


Nick Coghlan  added the comment:

PEP 432 tweaked: https://github.com/python/peps/pull/904/files

--

___
Python tracker 

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



[issue26752] Mock(2.0.0).assert_has_calls() raise AssertionError in two same calls

2019-03-02 Thread Mario Corchero


Mario Corchero  added the comment:

Quite a tricky bug!

Indeed @xtreak the `_call_matcher` is using the `__init__` signature. I think 
this is a bug introduced in https://bugs.python.org/issue17015. There is a mix 
of the fact that spec in Mock also can accept classes (not instances) whilst 
spec requires the user to say whether what you are passing is a class or an 
instance. This gets messed up when validating the calls as at validation time 
it tries to match the signature as done in issue17015 (something that is useful 
for other cases as outlined in the issue).


You can see how this is clearly a bug with the following reproducer:

```
from unittest.mock import Mock, call
class X(object):
def __init__(self):pass
def foo(self, a):pass
x = Mock(spec=X)
x.foo(20)
x.assert_has_calls(x.mock_calls)
```


Using an instance (`X()`) of the class "hides" the issue, as the right 
signature is used for validation.


I am not sure if there is any easy fix here :/, but it is broken that the 
validation happens in different ways when a class is used in the spec (when 
calling it vs when validating it). Things "work" as if you use a spec of a 
class and then construct it, that passes fine as it does not get validated as 
attribute lookup and then there is no further validation.

Maybe something like this would work:

```
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -384,8 +384,10 @@ class NonCallableMock(Base):
 def __init__(
 self, spec=None, wraps=None, name=None, spec_set=None,
 parent=None, _spec_state=None, _new_name='', _new_parent=None,
-_spec_as_instance=False, _eat_self=None, unsafe=False, **kwargs
+_spec_as_instance=None, _eat_self=None, unsafe=False, **kwargs
 ):
+if _spec_as_instance is None:
+_spec_as_instance = isinstance(spec, type) # We might need to play 
with eat_self as well here.
 if _new_parent is None:
 _new_parent = parent

@@ -2205,8 +2207,8 @@ def create_autospec(spec, spec_set=False, instance=False, 
_parent=None,
 elif spec is None:
 # None we mock with a normal mock without a spec
 _kwargs = {}
-if _kwargs and instance:
-_kwargs['_spec_as_instance'] = True
+if _kwargs:
+_kwargs['_spec_as_instance'] = instance
```

Basically, being explicit on auto_spec and inferring it on the creation of 
Mocks, but that might break some people who (probably badly) rely on the 
signature of the class.

This issue probably needs some further work.

--

___
Python tracker 

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



[issue23216] IDLE grep/find/replace source code needs docstrings

2019-03-02 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I've created the first PR for docstrings on replace.  Saimadhav Heblikar had 
added some docstrings under issue 21676, so I expanded on what he did.  I 
referred to Al's diff, but didn't use it much since there were already some 
docstrings.

For readability, I also changed some boolean values from 0 to False and 1 to 
True.  I had to figure out what `ok` did, so that helped.

I also left a note in `show_hit` because it isn't working right.  The text gets 
colorized with the `sel` tag instead of the `hit` tag.  effbot says this about 
tag ordering:
>>> If you attach multiple tags to a range of text, style options from the most 
>>> recently created tag override options from earlier tags. In the following 
>>> example, the resulting text is blue on a yellow background.

>>>text.tag_config("n", background="yellow", foreground="red")
>>>text.tag_config("a", foreground="blue")
>>>text.insert(contents, ("n", "a"))

>>> Note that it doesn’t matter in which order you attach tags to a range; it’s 
>>> the tag creation order that counts.

The note seems to be the important part here as the definition for `sel` is 
done before `hit` in colorizer.

--
stage: patch review -> needs patch

___
Python tracker 

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



[issue23216] IDLE grep/find/replace source code needs docstrings

2019-03-02 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
pull_requests: +12142
stage: needs patch -> patch review

___
Python tracker 

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



[issue36046] support dropping privileges when running subprocesses

2019-03-02 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I like the separate parameters. :)

--

___
Python tracker 

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



[issue36169] Add overlap() method to statistics.NormalDist()

2019-03-02 Thread Raymond Hettinger


New submission from Raymond Hettinger :

-- How to use it --

What percentage of men and women will have the same height in two normally 
distributed populations with known means and standard deviations?

# http://www.usablestats.com/lessons/normal
>>> men = NormalDist(70, 4)
>>> women = NormalDist(65, 3.5)
>>> men.overlap(women)
0.5028719270195425

The result can be confirmed empirically with a Monte Carlo simulation:

>>> from collections import Counter
>>> n = 100_000
>>> overlap = Counter(map(round, men.samples(n))) & Counter(map(round, 
women.samples(n)))
>>> sum(overlap.values()) / n
0.50349

The result can also be confirmed by numeric integration of the probability 
density function:

>>> dx = 0.10
>>> heights = [h * dx for h in range(500, 860)]
>>> sum(min(men.pdf(h), women.pdf(h)) for h in heights) * dx
0.5028920586287203

-- Code --

def overlap(self, other):
'''Compute the overlap coefficient (OVL) between two normal 
distributions.

Measures the agreement between two normal probability distributions.
Returns a value between 0.0 and 1.0 giving the overlapping area in
the two underlying probability density functions.

'''

# See: "The overlapping coefficient as a measure of agreement between
# probability distributions and point estimation of the overlap of two
# normal densities" -- Henry F. Inman and Edwin L. Bradley Jr
# http://dx.doi.org/10.1080/03610928908830127

# Also see:
# 
http://www.iceaaonline.com/ready/wp-content/uploads/2014/06/MM-9-Presentation-Meet-the-Overlapping-Coefficient-A-Measure-for-Elevator-Speeches.pdf

if not isinstance(other, NormalDist):
return NotImplemented
X, Y = self, other
X_var, Y_var = X.variance, Y.variance
if not X_var or not Y_var:
raise StatisticsError('overlap() not defined when sigma is zero')
dv = Y_var - X_var
if not dv:
return 2.0 * NormalDist(fabs(Y.mu - X.mu), 2.0 * X.sigma).cdf(0)
a = X.mu * Y_var - Y.mu * X_var
b = X.sigma * Y.sigma * sqrt((X.mu - Y.mu)**2 + dv * log(Y_var / X_var))
x1 = (a + b) / dv
x2 = (a - b) / dv
return 1.0 - (fabs(Y.cdf(x1) - X.cdf(x1)) + fabs(Y.cdf(x2) - X.cdf(x2)))

 Future 

The concept of an overlap coefficient (OVL) is not specific to normal 
distributions, so it is possible to extend this idea to work with other 
distributions if needed.

--
components: Library (Lib)
messages: 337020
nosy: davin, mark.dickinson, rhettinger, steven.daprano, tim.peters
priority: normal
severity: normal
status: open
title: Add overlap() method to statistics.NormalDist()
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



[issue34484] Unicode HOWTO incorrectly refers to Private Use Area for surrogateescape

2019-03-02 Thread A.M. Kuchling


Change by A.M. Kuchling :


--
stage:  -> patch review

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-02 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 96d81583be98cec9728636186ea32b662cb091d5 by Victor Stinner in 
branch 'master':
bpo-36146: Fix inc_dirs in setup.py on macOS (GH-12098)
https://github.com/python/cpython/commit/96d81583be98cec9728636186ea32b662cb091d5


--

___
Python tracker 

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



[issue32129] IDLE app icon is blurry on macOS with Aqua Tk 8.6

2019-03-02 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 59e824b4fc314b10c5d24ff0bf737a15787f0574 by Benjamin Peterson 
(Ned Deily) in branch '2.7':
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Original 
patch by Kevin Walzer. (GH-12034)
https://github.com/python/cpython/commit/59e824b4fc314b10c5d24ff0bf737a15787f0574


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue21314] Document '/' in signatures

2019-03-02 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Ping for review.

--

___
Python tracker 

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



[issue22021] shutil.make_archive() root_dir do not work

2019-03-02 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Pinging once more for review.

--

___
Python tracker 

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



[issue36046] support dropping privileges when running subprocesses

2019-03-02 Thread desbma


Change by desbma :


--
nosy: +desbma

___
Python tracker 

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



[issue36125] Cannot cross-compile to more featureful but same tune

2019-03-02 Thread Xavier de Gaye


Xavier de Gaye  added the comment:

The cross-compilation rely on the fact that the cross-compiled shared libraries 
names are constructed using the configure `--host=HOST-TYPE' command line 
parameter and therefore cannot be loaded by the native compiler that uses a 
different suffix for those names: in a cross compilation the 'build' machine is 
identified with a different name than the 'host' machine or it is not a 
cross-compilation.

Maybe there is a glitch in this assumption ?

--

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2019-03-02 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


--
nosy: +izbyshev

___
Python tracker 

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



[issue34776] Postponed annotations break inspection of dataclasses

2019-03-02 Thread Vlad Shcherbina


Vlad Shcherbina  added the comment:

Any chance this could get into 3.7.3?

--
nosy: +vlad

___
Python tracker 

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



[issue36162] error: implicit declaration of function 'sendfile' is invalid in C99

2019-03-02 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

CPython requires several changes to build for Android < 21. There was an 
attempt in issue32654 but it's abandoned.

--
nosy: +yan12125

___
Python tracker 

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



[issue35100] urllib.parse.unquote_to_bytes: needs "escape plus" option

2019-03-02 Thread SilentGhost


Change by SilentGhost :


--
nosy: +orsenthil
versions: +Python 3.8 -Python 3.5, 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



[issue29440] _dbm requires -lgdbm if gdbm is built as static libraries

2019-03-02 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

I gave up building gdbm as a static library. It brings more headache than 
benefits.

--
resolution:  -> wont fix
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



[issue35100] urllib.parse.unquote_to_bytes: needs "escape plus" option

2019-03-02 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

This issue still stands. The output of all three methods is exactly the same as 
it was when the original question was posted. Would it maybe make sense to add 
a flag to the unquote_to_bytes method to parse the 'plus' symbol as a space? Or 
maybe create a new method(i.e. unquote_to_bytes_plus)?

--
nosy: +lys.nikolaou

___
Python tracker 

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



[issue36081] Cannot set LDFLAGS containing $

2019-03-02 Thread Rolf Eike Beer


Rolf Eike Beer  added the comment:

No, it's not. $ORIGIN is a special value that must be literally in the RPATH 
(i.e. in the ELF), so that the binary is relocatable and will looks for the 
libraries relative to it's location.

I wonder if I could do "export ORIGIN='$ORIGIN'" instead, so the expansions 
will bring back the original value again. This is only a solution for this 
usecase.

--

___
Python tracker 

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



[issue36150] Possible assertion failures due to _ctypes.c's PyCData_reduce()

2019-03-02 Thread Zackery Spytz


Zackery Spytz  added the comment:

I'm sorry. I misunderstood the behavior of Py_BuildValue().

--

___
Python tracker 

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



[issue36168] DOC: Fix capitalization in string.rst

2019-03-02 Thread Cheryl Sabella


New submission from Cheryl Sabella :

In `string.rst`, under get_value(), `Subsequent` shouldn't be capitalized after 
the semi-colon.

For compound field names, these functions are only called for the first 
component of the field name; ---> Subsequent <--- components are handled 
through normal attribute and indexing operations.

Assigning to @Mariatta for the sprints.

--
assignee: Mariatta
components: Documentation
messages: 337008
nosy: Mariatta, cheryl.sabella
priority: normal
severity: normal
stage: needs patch
status: open
title: DOC: Fix capitalization in string.rst
versions: 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



[issue36167] DOC: Incorrect capitalization in Programming FAQ

2019-03-02 Thread Cheryl Sabella


New submission from Cheryl Sabella :

In Programming FAQ under question "How can my code discover the name of an 
object?", in the second sentence, the word 'The' shouldn't be capitalized after 
the semi-colon.

Essentially, assignment always binds a name to a value; ---> The <--- same is 
true of def and class statements, but in that case the value is a callable. 

Assigning to @Mariatta for the sprints.

--
assignee: Mariatta
components: Documentation
messages: 337007
nosy: Mariatta, cheryl.sabella
priority: normal
severity: normal
stage: needs patch
status: open
title: DOC: Incorrect capitalization in Programming FAQ
versions: 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



[issue36125] Cannot cross-compile to more featureful but same tune

2019-03-02 Thread Ross Burton


Ross Burton  added the comment:

strace disagrees.  By putting strace in PYTHON_FOR_BUILD and then invoking make 
sharedmods:

| openat(AT_FDCWD, 
"/data/poky-tmp/master/work/corei7-64-poky-linux/python3/3.7.2-r0/build/build/lib.linux-x86_64-3.7/_heapq.cpython-37m-x86_64-linux-gnu.so",
 O_RDONLY|O_CLOEXEC) = 3
| read(3, 
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\20\0\0\0\0\0\0"..., 832) = 
832
| fstat(3, {st_mode=S_IFREG|0755, st_size=62104, ...}) = 0
| mmap(NULL, 23880, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f93d7cb9000
| mmap(0x7f93d7cba000, 4096, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f93d7cba000
| mmap(0x7f93d7cbb000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 
0x2000) = 0x7f93d7cbb000
| mmap(0x7f93d7cbc000, 12288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f93d7cbc000
| close(3)= 0
| mprotect(0x7f93d7cbc000, 4096, PROT_READ) = 0
| --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPN, si_addr=0x7f93d7cbab10} ---
| +++ killed by SIGILL (core dumped) +++
| Illegal instruction
| Makefile:625: recipe for target 'sharedmods' failed

We do have patches but I don't think they affect this part of the build.

--

___
Python tracker 

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



[issue36166] DOC: Fix markup on function parameter on datamodel.rst

2019-03-02 Thread Cheryl Sabella


New submission from Cheryl Sabella :

In `datamodel.rst`, fix formatting on the format_spec argument in the text 
paragraph of object.__format__() to be italicized instead of marked as a code 
sample.
 

object.__format__(self, format_spec)

The ---> ``format_spec`` <--- argument is a string that contains a description 
of the formatting options desired.


Assigning to @Mariatta for the sprints.

--
assignee: Mariatta
components: Documentation
messages: 337005
nosy: Mariatta, cheryl.sabella
priority: normal
severity: normal
stage: needs patch
status: open
title: DOC: Fix markup on function parameter on datamodel.rst
versions: 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



[issue36162] error: implicit declaration of function 'sendfile' is invalid in C99

2019-03-02 Thread muhzi


muhzi  added the comment:

err, wrong logs sorry... 

configure:11514: checking for truncate
configure:11514: armv7a-linux-androideabi16-clang -o conftest   -pie 
-march=armv7-a -Wl,--fix-cortex-a8 conftest.c -ldl  >&5
configure:11514: $? = 0
configure:11514: result: yes


configure:7954: checking sys/sendfile.h usability
configure:7954: armv7a-linux-androideabi16-clang -c   conftest.c >&5
configure:7954: $? = 0
configure:7954: result: yes
configure:7954: checking sys/sendfile.h presence
configure:7954: armv7a-linux-androideabi16-clang -E  conftest.c
configure:7954: $? = 0
configure:7954: result: yes
configure:7954: checking for sys/sendfile.h
configure:7954: result: yes

--

___
Python tracker 

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



[issue36162] error: implicit declaration of function 'sendfile' is invalid in C99

2019-03-02 Thread muhzi


muhzi  added the comment:

Yes it is detected by configure because they exist.

>From config.log:

configure:11514: checking for truncate
configure:11514: armv7a-linux-androideabi21-clang -o conftest   -pie 
-march=armv7-a -Wl,--fix-cortex-a8 conftest.c -ldl  >&5
configure:11514: $? = 0
configure:11514: result: yes


I can include the corresponding headers in a separate test file and call these 
missing methods and I get no compilation errors. But it seems they don't work 
in posixmodule.c and for some reason when #include  is put 
before #include "Python.h", the compiler doesn't give errors for those 
particular functions. I'm guessing this is an API level < 21 issue, it might 
have propagated from the configuration step (if any faults) but not sure. I use 
the same steps to compile this for API level 21 with no errors.

--

___
Python tracker 

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



[issue36081] Cannot set LDFLAGS containing $

2019-03-02 Thread Christian Heimes


Christian Heimes  added the comment:

There is a simpler solution. How about you use double quotes instead of single 
quotes and let the shell expand the variable before you pass it down into the 
process? 

$ export ORIGIN=/origin
$ echo LDFLAGS=-Wl,-rpath,'$ORIGIN/../lib'
LDFLAGS=-Wl,-rpath,$ORIGIN/../lib
$ echo LDFLAGS=-Wl,-rpath,"$ORIGIN/../lib"
LDFLAGS=-Wl,-rpath,/origin/../lib

--
nosy: +christian.heimes

___
Python tracker 

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



[issue36162] error: implicit declaration of function 'sendfile' is invalid in C99

2019-03-02 Thread Christian Heimes


Christian Heimes  added the comment:

The presence of sendfile and truncate is detected by configure. Your copy of 
configure defines HAVE_SENDFILE and HAVE_SYS_SENDFILE_H. Please check 
config.log and see why configure detects the functions.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue36165] DOC: ssl.rst is missing formatting on two links

2019-03-02 Thread Cheryl Sabella

New submission from Cheryl Sabella :

In `ssl.rst`, formatting for two data links is missing the leading `:`

1.   ssl.PROTOCOL_SSLv23¶

Alias for  ---> data:PROTOCOL_TLS.   <---

2.   Wrap the BIO objects incoming and outgoing and return an instance of ---> 
attr:SSLContext.sslobject_class <--- (default SSLObject). The SSL routines will 
read input data from the incoming BIO and write data to the outgoing BIO.


This would be good for a first time contributor, so I'm assigning to @Mariatta 
for the sprints.

--
assignee: Mariatta
components: Documentation
messages: 337000
nosy: Mariatta, cheryl.sabella
priority: normal
severity: normal
stage: needs patch
status: open
title: DOC: ssl.rst is missing formatting on two links
versions: 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



[issue36158] Regex search behaves differently in list comprehension

2019-03-02 Thread Ma Lin


Ma Lin  added the comment:

Just remind, the pattern r'"{1}', is same as r'"', means " repeats 1 time.

--
nosy: +Ma Lin

___
Python tracker 

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



[issue36125] Cannot cross-compile to more featureful but same tune

2019-03-02 Thread Xavier de Gaye


Xavier de Gaye  added the comment:

@Ross

> The intention appears to be that the sysconfig.py in the build is used.  In 
> my case that directory is also full of shared libraries that Python happily 
> loads, and then fails.

No, the intention is that the native python finds the sysconfigdata module 
named $_PYTHON_SYSCONFIGDATA_NAME that is located in the directory where the 
extensions modules (.so libraries) have been cross-compiled. 
$_PYTHON_SYSCONFIGDATA_NAME is a pure python module, so it can be loaded by the 
native python.

Please note that in your first post PYTHONPATH is missing the first part, i.e. 
the path to this directory obtained with:
$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat 
pybuilddir.txt`:)

When PYTHON_FOR_BUILD runs, it does not load any extension module so the 
Illegal instruction may be caused by some other problem.

--
nosy: +xdegaye

___
Python tracker 

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