Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Test project on Windows with MINGW git (conda2.7&3.4/cpy-3.5)#519

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 42 commits intogitpython-developers:masterfromankostis:appveyor
Oct 1, 2016

Conversation

ankostis
Copy link
Contributor

@ankostisankostis commentedSep 25, 2016
edited
Loading

  • UseAppveyor integration servers;
  • Copy part of the travis logic, to speed-up test-time (no flake8, site & coverage), the only extra is wheel-packaging;
  • Limit combination of Anaconda, CPython and MINGW/Cygwin in only 6 variations.
  • Replacedpoll/select buffer-assembly code with pump-threads (Win TCs faling 90-->20!) and rework unicode handling in many places.
  • Popen() procs it withsubprocess.CREATE_NEW_PROCESS_GROUP so that they can be killed.
  • Invoke MINGWgit-daemon (instead ofgit daemon); otherwise it detaches (unix-ism here) from parent git cmd, and then CANNOT DIE!
  • Stop reading directlyPopen().proc.stdout/stderr from the launching-thread, it freezes due to GIL/buffering.
    • Unslurp diff consumption code (but not raw-patch) to handle it line-by line to support arbitrary big output.
  • Ensure read-only files do delete on Windows.
    +Rework GitCommandError.str() and add TCs on unicode handling.
  • Fixed TCs on config-reader/writer:
    • Modify lock/read-config-file code to ensure files closed.
    • Usewith GitConfigarser() more systematically in TCs.
    • Clean up any locks left hanging from prev TCs.
    • Util: mark lock-files as SHORT_LIVED; save some SSDs...
  • Fixed TestRepo.test_submodule_update():
    • submod: del.git file prior overwrite; Windows denied otherwise!
  • FIX TestRepo.test_untracked_files():
    • In thegit add <file> case, PY2 fails when args are unicode.
      Must encode them withlocale.getpreferredencoding() AND use SHELL.
  • cmd: addshell intoexecute() kwds, for overriding USE_SHELL per
    command.
  • repo: replace blockycommunicate() in_clone() with thread-pumps (UNNECESSARY, seethis later discussion).
  • test_repo.py: unittestize (almost all) assertions.
  • Fixed file-access problems by usingwith... construct (not complete).
    • Replace open --> with open for index (base and TC).
  • Enabled some TCs, more remain dormant (ie the Hook TC never runs on Linux).
    • test_index.py: Enabled dormant fake-symlink assertion.
  • Various encoding issues.
  • Debug-log allPopen() calls, to collect cmd usage.

Apveyor results

  • Py27: FAILED (SKIP=3, errors=1)
  • Py34: FAILED (SKIP=3, errors=3)
  • Py35 : FAILED (SKIP=3, errors=3)

Byron reacted with heart emoji
@Byron
Copy link
Member

@ankostis Totally awesome ! Even though I won't be of much help, I do hope that fixing the windows issues work out in the end. That would restore windows platform support and keep it, after all these years of supporting it just on a best-effort basis, which meant not to obviously use non-windows APIs.

@ankostisankostisforce-pushed theappveyor branch 2 times, most recently from1774f98 tod773d40CompareSeptember 25, 2016 16:31
@ankostis
Copy link
ContributorAuthor

Yes, that's a start.
I wish that today this PR become "ready", but currently, it keeps on failing,
and addinggc.collect() in various places...

@ankostisankostisforce-pushed theappveyor branch 3 times, most recently from5899c59 tod12fdcaCompareSeptember 25, 2016 22:01
@ankostis
Copy link
ContributorAuthor

@Byron thegit.testtest_git:TestGit.test_handle_process_output() TC hangs almost on every combination under Windows.
Can you help unstuck it?

ankostis added a commit to ankostis/GitPython that referenced this pull requestSep 25, 2016
+ Pump once, so when input larger than `mmap.PAGESIZE`, stream is notemptied.
ankostis added a commit to ankostis/GitPython that referenced this pull requestSep 25, 2016
+ Pump once, so when input larger than `mmap.PAGESIZE`, stream is notemptied.
ankostis added a commit to ankostis/GitPython that referenced this pull requestSep 25, 2016
+ Pump once, so when input larger than `mmap.PAGESIZE`, stream is notemptied.
ankostis added a commit to ankostis/GitPython that referenced this pull requestSep 26, 2016
+ Pump code reads only once streams per `_read_lines_from_fno()`invocation, so when input larger than `mmap.PAGESIZE`, bytes areforgotten in the stream.
ankostis added a commit to ankostis/GitPython that referenced this pull requestSep 26, 2016
+ The code in `_read_lines_from_fno()` was reading the stream only onceper invocation, so when input was larger than `mmap.PAGESIZE`, byteswere forgotten in the stream.+ Also set deamon-threads.
ankostis added a commit to ankostis/GitPython that referenced this pull requestSep 26, 2016
+ The code in `_read_lines_from_fno()` was reading the stream only onceper invocation, so when input was larger than `mmap.PAGESIZE`, byteswere forgotten in the stream.+ Replaced buffer-banging code with iterate-on-file-descriptors.+ Also set deamon-threads.
ankostis added a commit to ankostis/GitPython that referenced this pull requestSep 26, 2016
+ The code in `_read_lines_from_fno()` was reading the stream only onceper invocation, so when input was larger than `mmap.PAGESIZE`, byteswere forgotten in the stream.+ Replaced buffer-building code with iterate-on-file-descriptors.+ Also set deamon-threads.
@ankostis
Copy link
ContributorAuthor

ankostis commentedSep 26, 2016
edited
Loading

@Byron that was a tough one!
The pump code incmd:handle_process_output() was crafted for the select/poll and was reading the stream only once per_read_lines_from_fno() invocation; so when input was larger thanmmap.PAGESIZE, bytes were forgotten in the stream, and the child-process hang.

I replaced the buffer-assembly code with iterate-on-file-descriptors. Actually the code is so simple that it maybe worth to replace theselect-poll with the 2-pumps code, for all OSs?

Manymore bugs remain in Windows, but no hangs.
[edit]Actually with this bug fixed, the failed TCs on Windows dropped from ~90-->20!!

A side question:
Incmd.handle_process_output() you write:

NOTE: Just joining threads can possibly fail as there is a gap between .start() and when it's
actually started, which could make the wait() call to just return because the thread is not yet
active

Is that possible? I would expect any language allowing such "gap" to be considered outright broken.
But I couldnt google anything relevant?

ankostis added a commit to ankostis/GitPython that referenced this pull requestSep 26, 2016
ankostis added a commit to ankostis/GitPython that referenced this pull requestSep 26, 2016
@ankostis
Copy link
ContributorAuthor

Just pushed one last commit with those 3 TCs appropriately skipped.
-- ALL GREEN now --

Especially the one with the incompatible type appears like something that is relatively easy reproduce and fix via smmap.

Actually quite the contrary: I can only reproduce it when i run the full harness; if i launch these 2 TCs alone, they pass! So practically, I cannot enter debug-mode - I have to wait 2' just to reach this point.

PS: You have been invited to become a contributor/maintainer.

Have not received an invitation yet.

@Byron
Copy link
Member

This is odd:
screen shot 2016-10-01 at 20 54 24

I have just re-invited you, maybe it comes through. Otherwise you would just have to visithttps://github.com/gitpython-developers to see the invitation.

Your last commit was not part of my merge, I will fetch it separately.

Byron pushed a commit that referenced this pull requestOct 1, 2016
+ Just to see Apveyor all green and merge; the TCs HAVE TO BE FIXED.
@Byron
Copy link
Member

@ankostis I think it worked ! The last commit has been cherry-picked and AppVeyor is on its way to all-green ! Even though it's not the real thing just yet, I call it an impressive piece of work! Thanks so much !

Right now I wouldn't know how to tackle the smmap issue, just as it's hard to fix anything in a project that is installed as a dependency. Probably it would be easiest if it would be reproducible locally, which I can't even do.
Just so you know, I will probably go to read-only mode for the next days due to my travels, but should be back with replies by the coming weekend.

@ankostis
Copy link
ContributorAuthor

ankostis commentedOct 1, 2016
edited
Loading

@Byron many of the fixes in this PR can be applied also ongitdb, and as you said (haven't checked) onsmmp. Is there a chance to tackle these issues in these projects? Or are they "frozen" somehow?

I mean, a lot of problems just go away if resource classes are retrofitted aswith .... context resources - but this means API forward compatibility is broken for future clients (existing code should work with the modified libs though).

What do you think, is it worth the effort (but cna't promise anything)?

@ankostisankostis changed the titleTest project on Windows with MINGW/Cygwin git (conda2.7&3.4/cpy-3.5)Test project on Windows with MINGW git (conda2.7&3.4/cpy-3.5)Oct 1, 2016
ankostis added a commit to ankostis/GitPython that referenced this pull requestOct 2, 2016
ankostis added a commit to ankostis/GitPython that referenced this pull requestOct 2, 2016
ankostis added a commit to ankostis/GitPython that referenced this pull requestOct 2, 2016
…rs#519+ Regression introduced ind84b960, by a wrong commentinterpretation.
@ankostis
Copy link
ContributorAuthor

For reference, reporting the CORRECTAppveyor results after#521 fixes by yarikoptic & ankostis restored skipped TCs:

PY27: 5 errors:
PY34: 4 errors:
PY35: 7 errors:
conda35: 7 errors:

ankostis added a commit to ankostis/GitPython that referenced this pull requestOct 2, 2016
…preferredencoding()`+ On Windows, this is the default encoding (usually, the mate-encoding`mcbs' which points to the current code-page (i.e. `cp1252` for Europe).
@ankostisankostis mentioned this pull requestOct 11, 2016
@ankostisankostis modified the milestone:v2.1.0 - proper windows supportOct 15, 2016
@Byron
Copy link
Member

@ankostis With the latest upgrade of gitdb and smmap to 2.0, it's finally possible again to make new releases. This would allow the changes you talk about to be retro-fitted indeed, and given all the subtle problems GitPython has, it would certainly be worth doing that.

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull requestOct 18, 2023
In the git.diff.Diff class, the _index_from_patch_format and_index_from_raw_format methods' docstrings had still described themas reading from streams, even though they have instead read fromprocesses (and taken "proc", not "stream", arguments) sincegitpython-developers#519when the change was made ina5db3d3 to fix a freezing bug.This updates the docstrings to reflect that they read fromprocesses.
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull requestOct 18, 2023
In the git.diff.Diff class, the _index_from_patch_format and_index_from_raw_format methods' docstrings had still described themas reading from streams, even though they have instead read fromprocesses (and taken "proc", not "stream", arguments) sincegitpython-developers#519when the change was made ina5db3d3 to fix a freezing bug.This updates the docstrings to reflect that they read fromprocesses.
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull requestOct 18, 2023
In the git.diff.Diff class, the _index_from_patch_format and_index_from_raw_format methods' docstrings had still described themas reading from streams, even though they have instead read fromprocesses (and taken "proc", not "stream", arguments) sincegitpython-developers#519when the change was made ina5db3d3 to fix a freezing bug.This updates the docstrings to reflect that they read fromprocesses.
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull requestOct 22, 2023
In the git.diff.Diff class, the _index_from_patch_format and_index_from_raw_format methods' docstrings had still described themas reading from streams, even though they have instead read fromprocesses (and taken "proc", not "stream", arguments) sincegitpython-developers#519when the change was made ina5db3d3 to fix a freezing bug.This updates the docstrings to reflect that they read fromprocesses.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Development

Successfully merging this pull request may close these issues.

2 participants
@ankostis@Byron

[8]ページ先頭

©2009-2025 Movatter.jp