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

[2.7] Distutils msvc9 win81 #4242

Closed
wants to merge 3,568 commits into from
Closed

[2.7] Distutils msvc9 win81 #4242

wants to merge 3,568 commits into from

Conversation

laranzu
Copy link

@laranzu laranzu commented Nov 2, 2017

Fix bug: setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user AppData

I could not build a native extension for Python 2.7 on my MS Windows 8.1 system because VCVARSALL.BAT could not be found, even after restarting everything. Eventually worked out that the Python 2.7 CLI compiler tools installer had put the files in a subdirectory of the invisible user AppData instead of a system wide directory. (Possibly because I did not run the installer as administrator?)

Pull request adds a couple of lines of code to look for vcvarsall.bat under AppData if not fould elsewhere.

zhangyangyu and others added 30 commits May 15, 2017 13:17
Also backport new functions temp_dir() and python_is_optimized().
temp_cwd() now accepts None as a name (means using tempfile.mkdtemp).
check_syntax_error() now accepts arguments lineno and offset.
Use more specific error messages in get_attribute().
…nish (#1583)

* bpo-30357 each test in test_thread waits until all spawn threads finish

* bpo-30357 each test in test_thread waits until all spawn threads finish

* bpo-30357: test_thread now uses threading_cleanup() (#1592)

test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.

Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>

* bpo-30357: test_thread now uses threading_cleanup() (#1592)

test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.

Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>
* Use explicit numbering for footnotes referred by explicit number.
* Fix literal strings formatting in howto/urllib2.rst.
* Add `:noindex:` to duplicated definition of list.
* Update susp-ignored.csv for reference/expressions.rst.
(cherry picked from commit d97b7dc)
Catch the Windows socket WSAEINVAL error (code 10022) in imaplib
on shutdown(SHUT_RDWR): An invalid operation was attempted

This error occurs sometimes on SSL connections.
(cherry picked from commit 83a2c28)
Running Python with the -3 option now emits deprecation warnings for
getchildren() and getiterator() methods of the Element class in the
xml.etree.cElementTree module and when pass the html argument to
xml.etree.ElementTree.XMLParser().

Fixed a deprecation warning about the doctype() method of the
xml.etree.ElementTree.XMLParser class.  Now it is emitted only when
define the doctype() method in the subclass of XMLParser.

Fixed a bug in the test_bug_200708_close test method.  An EchoTarget
instance was incorrectly passed to XMLParser() as the html argument and
silently ignored.

Tests no longer failed when use the -m option for running only selected
test methods. Checking warnings now is more specific, warnings are
expected only when use deprecated features.
Running Python with the -3 option now warns about regular expression
syntax that is invalid or has different semantic in Python 3
or will change the behavior in future Python versions.
…1595) (#1648)

Warnings emitted when compile a regular expression now always point
to the line in the user code.  Previously they could point into inners
of the re module if emitted from inside of groups or conditionals.

(cherry picked from commit c7ac728)
… attribute names. (GH-1652) (#1675)

Based on patch by Eryk Sun.
(cherry picked from commit d896985)
Based on patches by Duane Griffin and Tim Mitchell.
(cherry picked from commit 753bca3)
Ran the docstrings through spell checker, and fixed spelling issues.
…oop on exc (GH-1683) (#1817)

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored..
(cherry picked from commit bc50f03)
…H-1898)

The "iterable iterable" phrasing created confusion between the term
reference and the parameter name.

This simplifies the phrasing to just use the parameter name
without linking directly to the term definition..
(cherry picked from commit 08e2f35)
@laranzu laranzu requested a review from a team November 2, 2017 23:54
@laranzu laranzu requested a review from a team as a code owner November 2, 2017 23:54
@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 might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). 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!

@Mariatta
Copy link
Member

Mariatta commented Nov 2, 2017

Thanks for the PR. A couple issues:

  1. Does this need to have the target base branch 2.7 instead of master?
  2. I haven't looked at your changes, but from what you described it doesn't seem trivial, so you'll need to create an issue in https://bugs.python.org

@terryjreedy
Copy link
Member

This PR is drastically wrong. After getting a tracker username, signing the contributor agreement, opening an issue, nosying the windows experts, and getting approval from one of them, most likely Zach Ware, it needs to be redone properly as a small patch to the appropriate branches. If it is a good thing to do, it might be applicable to all current branches. Or one of the experts might point out how to do what you want without a patch. This is not my field of expertise.

@terryjreedy terryjreedy closed this Nov 3, 2017
@laranzu
Copy link
Author

laranzu commented Nov 3, 2017 via email

@Mariatta Mariatta changed the base branch from master to 2.7 November 3, 2017 04:11
@Mariatta Mariatta changed the base branch from 2.7 to master November 3, 2017 04:12
@Mariatta Mariatta changed the base branch from master to 2.7 November 3, 2017 04:14
@pfmoore
Copy link
Member

pfmoore commented Nov 3, 2017

To compile Python 2.7 extensions with the Visual C Tools for Python 2.7, you should be using setuptools in your setup.py. The support needed for the Visual C tools was added to setuptools rather than to core distutils, as I understand it, and that was a deliberate choice (as it means users don't need to upgrade their Python simply to build extensions.

At least that's my understanding - @zooba may be able to clarify further.

Sorry if I've misunderstood the intention of this PR, it's currently showing as changing 2000+ files (probably because of the switch of target from master to 2.7), so it's not really reviewable in its current form.

@skrah
Copy link
Contributor

skrah commented Nov 3, 2017

Perhaps patches are easier after all than GitHub ... This would of course contradict the official doctrine so it cannot be true.

@laranzu
Copy link
Author

laranzu commented Nov 3, 2017 via email

@laranzu
Copy link
Author

laranzu commented Nov 3, 2017 via email

@skrah
Copy link
Contributor

skrah commented Nov 3, 2017 via email

@1st1 1st1 removed their request for review November 3, 2017 12:22
@zooba
Copy link
Member

zooba commented Nov 3, 2017

Discussions of PR process aside, I can only guess what the change here is meant to be, but I'd suggest searching bugs.python.org for existing bugs. Especially those that are closed as rejected or have extended discussion after they were completed. If you don't find anything, or aren't satisfied with the responses, open a new bug and we can discuss it there.

@terryjreedy
Copy link
Member

Steve: The intended change here is commit c59773e with comment 'Look for vcvarsall...', The message is just above your comment. Clicking either the comment or hash shows just the 3 line diff, isolated from the 300000+ line total diff.

Hugh: When you click the Create PR button, github lists all the commits that would be included in the PR. It there is anything other than your commit or commits, something is wrong and one should stop and not continue.

@Mariatta
Copy link
Member

Mariatta commented Nov 3, 2017

I'm guessing the commit was made against an outdated local 2.7 branch.
The local branch needs to be fast-forwarded first.

Even though the change is only 2 lines, it's a code change, and will require a news entry.
Anything that needs news entry will need an issue number, created in the bugtracker.

Most of the times, only typo fixes are considered as "trivial".

@laranzu
Copy link
Author

laranzu commented Nov 3, 2017

New issue created 31932, with reference to previous issue where this bug may have been identified but not fixed.
New pull request 4249 created that only modifies the one intended file instead of a gazillion.
CLA signed and presumably working its way through the system.

Thank you everybody for telling me what I did wrong. Valuable learning experience and I hope to make different mistakes next time.

Next step I believe is for a core developer to reject this request?

@terryjreedy
Copy link
Member

I already did when I closed it. And by the way, my advice to carefully look at the list of commits to be included is based on experience ;-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet