Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-29941: Add --with-assertions configure flag to enable C assertions. #980

Closed
wants to merge 243 commits into from

Conversation

Yhg1s
Copy link
Member

@Yhg1s Yhg1s commented Apr 3, 2017

Defaults to 'no', but as before assertions are implied by --with-pydebug.

'no', but as before assertions are implied by --with-pydebug.
@Yhg1s Yhg1s added the type-feature A feature request or enhancement label Apr 3, 2017
@Yhg1s
Copy link
Member Author

Yhg1s commented Apr 3, 2017

No change in behaviour if the flag isn't passed. Opinions on whether this should be backported to 3.6? (I would like to set up a --with-assertions buildbot for master + 3.6 to prevent regressions.)

csabella and others added 26 commits April 3, 2017 22:16
* bpo-29725: DOC: add text for arraysize in sqlite3.Cursor
* bpo-29972: Fix test_eintr on AIX

On AIX, sigtimedwait(0.2) sleeps 199.8 ms, whereas the test expects
200 ms or longer.

* bpo-29972: Skip some inet_pton() tests on AIX

Skip some inet_pton() tests of test_socket on AIX.

inet_pton() on AIX is less strict than on Linux and doesn't reject
some invalid IP addresses. The unit tests test more the libc than
Python itself.

* bpo-29972: Skip tests known to fail on AIX

* test_locale.test_strcoll_with_diacritic()
* test_locale.test_strxfrm_with_diacritic()
* test_strptime.test_week_of_year_and_day_of_week_calculation()
* test_tools.test_POT_Creation_Date()
* correct parse_qs and parse_qsl test case descriptions.
* Updates B.index documentation.

* Updates str.index documentation, makes it Argument Clinic compatible.

* Removes ArgumentClinic code.

* Finishes string.index documentation.

* Updates string.rindex documentation.

* Documents B.rindex.
This hides unwanted implementation details from tracebacks.
* Implement math.remainder.

* Fix markup for arguments; use double spaces after period.

* Mark up function reference in what's new entry.

* Add comment explaining the calculation in the final branch.

* Fix out-of-order entry in whatsnew.

* Add comment explaining why it's good enough to compare m with c, in spite of possible rounding error.
…_(). (python#843)

object.__reduce__() no longer takes arguments, object.__reduce_ex__() now
requires one argument.
Documents a few omitted classes and adds NamedTuple methods.
…rseTuple*` (python#916)

Also changed format specifier for function name from "%s" to "%.200s"
and exception messages should start with lowercase letter.
The original attempted fix missed an `isdir()` call in
`get_base_branch()`.
pythonGH-461)

conn.set_trace_callback() shouldn't be called multiple times when the
schema is changing.

This has indirectly been fixed by using sqlite3_prepare_v2() in bpo-9303.
The reference to administrative data was confusing to readers,
so this simplifies the note to explain that deep copying may copy
more then you intended, such as data that you expected to be
shared between copies.
…rror (pythonGH-949)

contextlib._GeneratorContextManager.__exit__ includes a special case to deal with
PEP 479 RuntimeErrors created when `StopIteration` is thrown into the context
manager body.

Previously this check was too permissive, and undid one level of chaining on *all*
RuntimeError instances, not just those that wrapped a StopIteration instance.
xdegaye and others added 4 commits May 22, 2017 11:15
…thonGH-1666).

bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (pythonGH-1666).

* Use only the LongLong form for the conversions.
There was an unneeded space before a closing parenthesis in the `unittest.mock` documentation.
Ran the docstrings through spell checker, and fixed spelling issues.
Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your configure.ac change looks good to me (and configure matches it).

@codecov
Copy link

codecov bot commented May 22, 2017

Codecov Report

Merging #980 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #980      +/-   ##
==========================================
+ Coverage   83.42%   83.42%   +<.01%     
==========================================
  Files        1367     1367              
  Lines      345755   345755              
==========================================
+ Hits       288456   288460       +4     
+ Misses      57299    57295       -4
Impacted Files Coverage Δ
Lib/heapq.py 97.32% <0%> (-1.53%) ⬇️
Lib/threading.py 81.83% <0%> (-0.18%) ⬇️
Lib/test/test_random.py 98.44% <0%> (ø) ⬆️
Lib/pydoc.py 62% <0%> (+0.06%) ⬆️
Lib/test/test_buffer.py 96.71% <0%> (+0.17%) ⬆️
Lib/test/lock_tests.py 86.95% <0%> (+0.28%) ⬆️
Lib/test/test_thread.py 66.83% <0%> (+0.51%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf1958a...a5bbccd. Read the comment docs.

@Yhg1s
Copy link
Member Author

Yhg1s commented May 22, 2017

PTAL; I forgot to add a NEWS entry before (or I was hoping the NEWS file refactor would land sooner), so please check the wording.

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA. This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

Misc/NEWS Outdated
@@ -1100,6 +1100,10 @@ Documentation
Build
-----

- bpo-29941: Add ``--with-assertions`` configure flag to explicitly enable
C asertions. Defaults to off, but ``--with-pydebug`` also enables
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C assert() checks via NDEBUG. Defaults to off. --with-pydebug implies --with-assertions.

Side note: are we supposed to put markdown backticks in news entries now? I see others with them so I guess it doesn't hurt. But given I'm used to viewing it as UTF-8 rather than MD it looks suspicious. I don't care either way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think backticks are ok.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted the wording, but avoided mentioning NDEBUG (because it's not using NDEBUG that enables assertions :P). The backticks are reST, not Markdown, and the NEWS file is supposed to be reST.

@Yhg1s
Copy link
Member Author

Yhg1s commented May 22, 2017

Had a chat with @larryhastings and @ned-deily and we'll backport this to 3.6, but not bother with 3.5.

@Yhg1s
Copy link
Member Author

Yhg1s commented May 22, 2017

Closing this PR to get rid of the mess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.